SAP MDG · REPLICATION INBOUND

How do I implement the INIT_SELECTION selection-screen value help for mass key mapping in SAP MDG?

Use form `INIT_SELECTION` to copy `mdgi_idstc_t_bs` and `mdgi_otc_t_bs` into a `VRM_VALUE` table and pass them to `VRM_SET_VALUES` for the two dropdown parameters. In the mass key-mapping report, this is done during `INITIALIZATION` after reading the language-dependent customizing lists.

Use form `INIT_SELECTION` to copy `mdgi_idstc_t_bs` and `mdgi_otc_t_bs` into a `VRM_VALUE` table and pass them to `VRM_SET_VALUES` for the two dropdown parameters. In the mass key-mapping report, this is done during `INITIALIZATION` after reading the language-dependent customizing lists.

`INIT_SELECTION` is the selection-screen helper that fills the two dropdowns in the mass key-mapping report. It reads the language-dependent MDG customizing tables, converts each entry into `VRM_VALUE` lines, and pushes them to the screen fields with `VRM_SET_VALUES`.

Process flow

  1. Read the language-dependent ID type table `mdgi_idstc_t_bs` into a local table.
  2. Read the language-dependent object type table `mdgi_otc_t_bs` into a local table.
  3. Copy both tables into the dropdown helper form `INIT_SELECTION`.
  4. Append initial lines to `gt_types` and fill each line's `key` with the description text.
  5. Call `VRM_SET_VALUES` for `gv_param1` to populate the first dropdown.
  6. Clear `gt_types` and repeat the process for the second dropdown.
  7. Call `VRM_SET_VALUES` for `gv_param2` to populate the second dropdown.

Referenced tables

ObjectPurpose
mdgi_idstc_t_bsLanguage-dependent MDG ID object type code texts used to fill the first dropdown.
mdgi_otc_t_bsLanguage-dependent MDG object type texts used to fill the second dropdown.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example

Exact relevant implementation excerpt from the knowledge document.

1*----------------------------------------------------------------------* 2***INCLUDE CREATE_MASS_KEY_MAPPING_INIT . 3*----------------------------------------------------------------------* 4*&---------------------------------------------------------------------* 5*& Form INIT_SELECTION 6*&---------------------------------------------------------------------* 7* text 8*----------------------------------------------------------------------* 9* -->P_LT_IDS_CODES text 10* -->P_LT_OBJ_TYPES text 11*----------------------------------------------------------------------* 12form INIT_SELECTION tables p_lt_ids_codes 13 p_lt_obj_types. 14 15DATA: lt_id_types TYPE TABLE OF mdgi_idstc_t_bs, 16 ls_id_type TYPE mdgi_idstc_t_bs, 17 lt_obj_types TYPE TABLE OF mdgi_otc_t_bs, 18 ls_obj_type TYPE mdgi_otc_t_bs. 19 20 FIELD-SYMBOLS: <ls_type> TYPE vrm_value."like line of gt_types. 21 22 lt_id_types = p_lt_ids_codes[]. 23 lt_obj_types = p_lt_obj_types[]. 24 25 APPEND INITIAL LINE TO gt_types ASSIGNING <ls_type>. 26 27 LOOP AT lt_id_types INTO ls_id_type. 28 APPEND INITIAL LINE TO gt_types ASSIGNING <ls_type>. 29 <ls_type>-key = ls_id_type-description. 30 ENDLOOP. 31 CALL FUNCTION 'VRM_SET_VALUES' 32 EXPORTING 33 id = gv_param1 34 values = gt_types 35 EXCEPTIONS 36 id_illegal_name = 1 37 OTHERS = 2. 38 39 40 CLEAR gt_types[]. 41 UNASSIGN <ls_type>. 42 43 LOOP AT lt_obj_types INTO ls_obj_type. 44 APPEND INITIAL LINE TO gt_types ASSIGNING <ls_type>. 45 <ls_type>-key = ls_obj_type-description. 46 ENDLOOP. 47 48 CALL FUNCTION 'VRM_SET_VALUES' 49 EXPORTING 50 id = gv_param2 51 values = gt_types 52 EXCEPTIONS 53 id_illegal_name = 1 54 OTHERS = 2. 55 56endform. " INIT_SELECTION

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How does the mass key-mapping report populate object type and ID type dropdowns?
  • What is the ABAP pattern behind VRM_SET_VALUES in the mass key mapping init include?
  • How do I fill selection-screen values for MDG object types and ID object types?

Possible questions

  • How do I implement the INIT_SELECTION selection-screen value help for mass key mapping in SAP MDG?
  • How does the mass key-mapping report populate object type and ID type dropdowns?
  • What is the ABAP pattern behind VRM_SET_VALUES in the mass key mapping init include?
  • How do I fill selection-screen values for MDG object types and ID object types?
  • How can I adapt this pattern for my own MDG report?

Keywords

SAP MDGABAPselection screenVRM_SET_VALUESmdgi_idstc_t_bsmdgi_otc_t_bsBusiness PartnerMaterialEquipment Resourcemass key mapping