Author: Christian Gradolf

ProNovia Produkte Korrekturanleitung
Knowledge Base ID / Version | OBJ-227 / V9.25.3
Ausgabe Korrekturanleitung | I / CG / 13.03.2023
Farblegende Korrekturen | INSERT | REPLACE THIS | REPLACE WITH | DELETE

Klasse | /PCH/CL_BO_MARA
Methode | /PCH/IF_BO_GENERIC_OBJECT_LINK~GET_DOWN_LINKS

METHOD /pch/if_bo_generic_object_link~get_down_links.

. . .

  CASE iv_link_type.

. . .
    WHEN c_gen_link_types-organizational_units.
. . .

      "{CG/ID10798
      IF lt_sales IS NOT INITIAL.
        ls_gen_link-object_key_ext = TEXT-001.
        ls_gen_link-identification = 'MSTAV'.
        ls_gen_link-business_object = me. "also MARA, siehe Model der OrgUnits
        APPEND ls_gen_link TO rt_subordinate_objects.
        "CG/ID10798}
        LOOP AT lt_sales ASSIGNING <ls_sales>.
          TRY.
              ls_gen_link-business_object = /pch/cl_bo_mvke=>get_mvke_instance(
                                     io_owner                = io_owner
                                     iv_material_number      = mv_material_number
                                     iv_sales_organisation   = <ls_sales>-vkorg
                                     iv_distribution_channel = <ls_sales>-vtweg ).
>>>REPLACE THIS
              ls_gen_link-identification = ls_gen_link-business_object->get_external_key( ).
              SPLIT ls_gen_link-identification AT '/' INTO lv_dummy ls_gen_link-identification.
>>>REPLACE WITH
              ls_gen_link-identification = <ls_sales>-vkorg && '/' && <ls_sales>-vtweg. "CG/OBJ-227
>>>END REPLACE
              APPEND ls_gen_link TO rt_subordinate_objects.

. . .

      LOOP AT lt_lgnum ASSIGNING <lv_lgnum>.
        TRY.
            ls_gen_link-business_object = /pch/cl_bo_mlgn=>get_mlgn_instance(
                                   io_owner                = io_owner
                                   iv_material_number      = mv_material_number
                                   iv_warehouse_number     = <lv_lgnum> ).

>>>REPLACE THIS
            ls_gen_link-identification = ls_gen_link-business_object->get_external_key( ).
            SPLIT ls_gen_link-identification AT '/' INTO lv_dummy ls_gen_link-identification.
>>>REPLACE WITH
            ls_gen_link-identification = <lv_lgnum>.        "CG/OBJ-227
>>>END REPLACE
            APPEND ls_gen_link TO rt_subordinate_objects.

. . .

        LOOP AT lt_bwkey ASSIGNING  <ls_bwkey>.
          TRY.
              ls_gen_link-business_object = /pch/cl_bo_mbew=>get_mbew_instance(
                                     io_owner            = io_owner
                                     iv_material_number  = mv_material_number
                                     iv_valuation_area   = <ls_bwkey>-bwkey
                                     iv_valuation_type   = <ls_bwkey>-bwtar ).
>>>REPLACE THIS
              ls_gen_link-identification = ls_gen_link-business_object->get_external_key( ).
              SPLIT ls_gen_link-identification AT '/' INTO lv_dummy ls_gen_link-identification.
>>>REPLACE WITH
              ls_gen_link-identification = <ls_bwkey>-bwkey && '/' && <ls_bwkey>-bwtar. "CG/OBJ-227
>>>END REPLACE
              APPEND ls_gen_link TO rt_subordinate_objects.

            CATCH /pronovia/cx_obj_not_found
                  /pch/cx_no_authority ##no_handler.
          ENDTRY.
        ENDLOOP.

      ENDIF.
      "{CG/ID10742
    WHEN c_gen_link_types-prt_usage.

. . .

Klasse | /PCH/CL_BO_MARC
Methode | /PCH/IF_BO_GENERIC_OBJECT_LINK~GET_DOWN_LINKS

METHOD /pch/if_bo_generic_object_link~get_down_links.

. . .

  CASE iv_link_type.

. . .

    WHEN c_gen_link_types-organizational_units.             "CG/ID9139

. . .

      LOOP AT lt_lgort ASSIGNING <lv_lgort>.
        TRY.
            ls_gen_link-business_object = /pch/cl_bo_mard=>get_mard_instance(
                                   io_owner            = io_owner
                                   iv_material_number  = mo_bo_mara->mv_material_number
                                   iv_plant            = mv_plant
                                   iv_storage_location = <lv_lgort> ).

            SPLIT ls_gen_link-business_object->get_external_key( ) AT '/' INTO TABLE lt_split.
            DESCRIBE TABLE lt_split.
>>>REPLACE THIS
            READ TABLE lt_split INTO ls_gen_link-identification INDEX sy-tfill.
>>>REPLACE WITH
            ls_gen_link-identification = <lv_lgort>. 
>>>END REPLACE
            APPEND ls_gen_link TO rt_subordinate_objects.

. . .

        LOOP AT lt_bwkey ASSIGNING  <ls_bwkey>.
          TRY.
              ls_gen_link-business_object = /pch/cl_bo_mbew=>get_mbew_instance(
                                     io_owner            = io_owner
                                     iv_material_number  = mo_bo_mara->mv_material_number
                                     iv_valuation_area   = <ls_bwkey>-bwkey
                                     iv_valuation_type   = <ls_bwkey>-bwtar ).
>>>REPLACE THIS
              ls_gen_link-identification = ls_gen_link-business_object->get_external_key( ).
              SPLIT ls_gen_link-identification AT '/' INTO lv_dummy ls_gen_link-identification.
>>>REPLACE WITH
              ls_gen_link-identification = <ls_bwkey>-bwkey && '/' && <ls_bwkey>-bwtar.
>>>END REPLACE
              APPEND ls_gen_link TO rt_subordinate_objects.

. . .

<ENDE>

ProNovia Produkte Korrekturanleitung		Template  Version B.00