SAP MDG · DATA MODEL UI

How do I create an SAP MDG Change Request UIBB feeder class for an additional Business Area field?

Create feeder class `ZCL_USMD_CR_GUIBB_REQ_BUS_AREA` by inheriting from `CL_GUIBB_BOL_FORM`, redefine `IF_FPM_GUIBB_FORM~GET_DATA`, `IF_FPM_GUIBB_FORM~GET_DEFINITION`, and `GET_ATTR_VALUE_SET`, then supply Business Area values from `TGSB` and language-dependent text from `TGSBT`. Enhance GenIL component `CR` with dependent object `ZCR_REQ_BUSINESS_AREA` and relation `ZCR_ReqBusAreaRel`, and bind the feeder through the Change Request UIBB configuration.

Create feeder class `ZCL_USMD_CR_GUIBB_REQ_BUS_AREA` by inheriting from `CL_GUIBB_BOL_FORM`, redefine `IF_FPM_GUIBB_FORM~GET_DATA`, `IF_FPM_GUIBB_FORM~GET_DEFINITION`, and `GET_ATTR_VALUE_SET`, then supply Business Area values from `TGSB` and language-dependent text from `TGSBT`. Enhance GenIL component `CR` with dependent object `ZCR_REQ_BUSINESS_AREA` and relation `ZCR_ReqBusAreaRel`, and bind the feeder through the Change Request UIBB configuration.

Create `ZCL_USMD_CR_GUIBB_REQ_BUS_AREA` as a subclass of `CL_GUIBB_BOL_FORM`, let the standard BOL form processing provide the data, and use `GET_DEFINITION` to wire the `BUS_AREA` field to the feeder’s OVS/value-help logic. In `GET_ATTR_VALUE_SET`, read Business Area keys from `TGSB` and their language-dependent descriptions from `TGSBT`, then return them so the UI can show `BUS_AREA` as a dropdown/F4 help. On the GenIL side, enhance component `CR` by adding dependent object `ZCR_REQ_BUSINESS_AREA` and relation `ZCR_ReqBusAreaRel` so the field can be sourced from the Change Request root context.

Process flow

  1. Create feeder class `ZCL_USMD_CR_GUIBB_REQ_BUS_AREA`.
  2. Inherit from `CL_GUIBB_BOL_FORM`.
  3. Redefine `IF_FPM_GUIBB_FORM~GET_DATA` and keep superclass processing.
  4. Redefine `IF_FPM_GUIBB_FORM~GET_DEFINITION` and assign `BUS_AREA` to the feeder value help/OVS.
  5. Redefine `GET_ATTR_VALUE_SET` to build the Business Area value list.
  6. Read Business Area keys from `TGSB` and descriptions from `TGSBT`.
  7. Enhance GenIL component `CR` in `GENIL_MODEL_BROWSER`.
  8. Create enhancement `ZMDG_CR_ADDITIONAL_FIELDS` and add dependent object `ZCR_REQ_BUSINESS_AREA`.','Create relation `ZCR_ReqBusAreaRel` from `CR_Root` to the dependent object.','Bind the feeder class in the UIBB configuration and test the UI
GENIL_MODEL_BROWSER

Component `CR`

Inspect and enhance the Change Request GenIL component

GENIL_MODEL_BROWSER

`ZMDG_CR_ADDITIONAL_FIELDS`

Enhancement container for custom CR dependent objects

Referenced tables

ObjectPurpose
TGSBBusiness Area values (`GSBER`)
TGSBTLanguage-dependent Business Area texts

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example

Exact relevant implementation excerpt from the knowledge document.

1*---------------------------------------------------------------------* 2* TITLE: Create or Redefine a UI Feeder Class 3* SOURCE: SAP How-To Guide 4*---------------------------------------------------------------------* 5* TAGS: 6* SAP MDG 7* SAP Master Data Governance 8* UI Feeder Class 9* FPM 10* Floorplan Manager 11* Web Dynpro ABAP 12* UIBB 13* Form UIBB 14* CL_BS_BP_GUIBB_FORM 15* CL_BS_BP_GUIBB_LIST 16* CL_BS_CU_GUIBB_GENERAL_DATA 17* ZCL_BS_CU_GUIBB_GENERAL_DATA 18* IF_FPM_GUIBB_FORM~GET_DEFINITION 19* OVS_HANDLE_PHASE_2 20* GET_JOIN_ENTITY_DATA 21* GET_ENTITY_DATA 22* OVS Search Help 23* KDKG1 24* KDKG1__TEXT 25* TVKGG 26* TVKGGT 27* genIL 28* BUPA 29* BUPA_CUSP 30* CL_BS_CUSTOMER_GENIL 31* ZCL_BS_GENIL_CUSTOM 32* GENIL_MODEL_BROWSER 33* USMD_TXT_FLD_EXC 34* USMD_TXT_FLD_MAP_DELETE 35*---------------------------------------------------------------------* 36 37*---------------------------------------------------------------------* 38* CLASS: ZCL_BS_CU_GUIBB_GENERAL_DATA 39* METHOD: IF_FPM_GUIBB_FORM~GET_DEFINITION 40*---------------------------------------------------------------------* 41METHOD if_fpm_guibb_form~get_definition. 42 43*! Get the definition of the feeder class / UIBB. 44 45 "inherit first 46 super->if_fpm_guibb_form~get_definition( 47 IMPORTING 48 eo_field_catalog = eo_field_catalog 49 et_field_description = et_field_description 50 et_action_definition = et_action_definition 51 et_special_groups = et_special_groups 52 et_dnd_definition = et_dnd_definition 53 es_options = es_options 54 es_message = es_message 55 ev_additional_error_info = ev_additional_error_info ). 56 57 "set the OVS search help for field Condition Group 1 (KDKG1) to the 58 "current class 59 READ TABLE et_field_description ASSIGNING FIELD-SYMBOL(<description>) 60 WITH KEY name = 'KDKG1'. 61 62 IF sy-subrc = 0. 63 <description>-ovs_name = me->class_name. 64 ENDIF. 65 66ENDMETHOD. 67 68*---------------------------------------------------------------------* 69* CLASS: ZCL_BS_CU_GUIBB_GENERAL_DATA 70* METHOD: OVS_HANDLE_PHASE_2 71*---------------------------------------------------------------------* 72METHOD ovs_handle_phase_2. 73 74 CASE iv_field_name. 75 WHEN 'KDKG1'. 76 "Implement the OVS search result for the Condition Group 1. 77 "The corresponding customizing tables are TVKGG & TVKGGT. 78 TYPES: 79 BEGIN OF ty_s_ovs_condition, 80 kdkg1 TYPE kdkgr, 81 kdkg1__text TYPE vtext, 82 END OF ty_s_ovs_condition, 83 ty_t_ovs_condition TYPE STANDARD TABLE OF ty_s_ovs_condition. 84 85 CREATE DATA er_output TYPE ty_t_ovs_condition. 86 FIELD-SYMBOLS <output> TYPE ty_t_ovs_condition. 87 ASSIGN er_output->* TO <output>. 88 89 SELECT * FROM tvkgg INTO TABLE @DATA(conditions). 90 91 IF conditions IS NOT INITIAL. 92 SELECT * FROM tvkggt INTO TABLE @DATA(texts) 93 FOR ALL ENTRIES IN @conditions 94 WHERE kdkgr = @conditions-kdkgr 95 AND spras = @sy-langu. 96 ENDIF. 97 98 LOOP AT conditions ASSIGNING FIELD-SYMBOL(<condition>). 99 APPEND INITIAL LINE TO <output> ASSIGNING FIELD-SYMBOL(<line>). 100 <line>-kdkg1 = <condition>-kdkgr. 101 <line>-kdkg1__text = <condition>-kdkgr. 102 103 READ TABLE texts ASSIGNING FIELD-SYMBOL(<text>) 104 WITH KEY kdkgr = <condition>-kdkgr 105 spras = sy-langu. 106 107 CHECK sy-subrc = 0 108 AND <text>-vtext IS NOT INITIAL. 109 110 <line>-kdkg1__text = <text>-vtext. 111 ENDLOOP. 112 113 WHEN OTHERS. 114 "The method is called for each field using an OVS. To support 115 "SAP owned fields with their standard logic, the OTHERS simply 116 "calls the parent class. 117 super->ovs_handle_phase_2( 118 EXPORTING 119 iv_field_name = iv_field_name 120 ir_query_parameter = ir_query_parameter

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

Related questions and keywords

Alternative questions

  • Which feeder class is used for the Requesting Business Area UIBB?
  • What superclass should the feeder class use?
  • Which feeder methods are redefined?

Possible questions

  • How are Business Area values provided to the dropdown/F4 help?
  • How is TGSB used in the feeder class?
  • How is the Business Area description read?
  • How does the UIBB obtain its field definition and data?
  • How do I link the feeder class to the Change Request UIBB?

Keywords

ZCL_USMD_CR_GUIBB_REQ_BUS_AREACL_GUIBB_BOL_FORMIF_FPM_GUIBB_FORM~GET_DATAIF_FPM_GUIBB_FORM~GET_DEFINITIONGET_ATTR_VALUE_SETTGSBTGSBTF4 helpdropdownBUS_AREAGENIL_MODEL_BROWSERCRZMDG_CR_ADDITIONAL_FIELDSCR_RootZCR_REQ_BUSINESS_AREAZCR_ReqBusAreaRel