Background
One of our customers requested the “Alternate Permitted Payees” information to be added into the MDG-BP data model on S/4HANA 1909/2022. This is available under transaction code BP in the backend system but not in the MDG-BP data model for these HANA releases.
Remark: we know that this part is available with S/4HANA 2023.
The desired result should look like this:

Figure 1 – New UIBB for Alternate Permitted Payees for S/4HANA 1909 or 2022
Introduction
Alternate Permitted Payee fields exist in the BP transaction code but not in the MDG-BP data model for S/4HANA 1909 and 2022. But with S/4HANA 2023, this information has been added accordingly to MDG as well. We have tried to fulfill our customer demand and added it accordingly to the MDG-BP data model.
The purpose of this document is to provide a possible solution for the enhancement of the data model, the UI and the Generic Interaction Layer (GenIL). so that the Alternate Permitted Payee entity is reflected properly.
It is located below the Vendor Company Code. Please see below figure 2:

Figure 2 – Alternate Permitted Payee in backend system

Figure 3 - UIBB
Following adjustments will be carried out:
- Extend the MDG-BP Data Model
- Create and Implement Handler Class
- Extend the GenIL Model
- Connect the MDG Data Model with the genIL Data Model
- Extend User Interface
- Enhancement of UI Configuration
- Extend the MDG-BP Data Model
Start by creating two new entity types. In the next step, establish a relationship between these entity types and the BP_COMPANY entity type. In the last step of this section, generate additional data model-specific structures.
- Create new entity types
A crucial characteristic of an entity type is the Storage/Usage Type, which dictates whether entities within the type can be modified through a change request or by different entity types, specifies the nature of the stored information, and determines whether database tables are newly created or repurposed from the active area.
Entity Type: ZBPVENAPC
Storage/Usage Type: Changeable via Other Entity Type; Generated Database Tables
Structure Table: CVIS_EI_ALP_PAYEE_KEY

Figure 4 – Entity Type: ZBPVENAPC
Entity Type: ZALT_PAYE
Storage/Usage Type: Not Changeable via MDG; No Generated Tables
Data Element: EMPFK

Figure 5 – Entity Type: ZALTPAYE

Figure 6 – Final List of Attributes of Entity ZBPVENAPC
- Relationships
Relationship types determine whether one entity type (from-entity type) is at a higher level than another entity type (to-entity type) or whether it is to be copied as an attribute of the other entity type in the check table.
Then add the relationships of these entity types.
Relationships Type: Qualifying
This relationship type is similar to the leading relationship type with the exception that the qualifying relationship is possible when the to-entity type is of storage/usage ‘Changeable via Other Entity Type; Generated Database Tables’.

Figure 7 – Relationship between ZALT_PAYE and ZBPVENAPC entities
Relationships Type: Leading
If this relationship type is used, then the from-entity type is on a higher level than the to-entity type.

Figure 8 – Relationship between ZBPVENAPC and BP_COMPNY entities
- Generate Data Model-Specific Structures

Figure 9 – Data Model-Specific Structures for ZBPVENAPC Entity
- Create and Implement Your Own Handler Class
- Create Your Own Handler Class
Create your own handler class by inheriting from class CL_MDG_BS_ECC_HANDLER.

Figure 10 – Handler Class Creation
- Implement Your Own Handler Class
Redefine these Methods:
• SET_OBJECT_TASKS
• IF_MDG_BS_BP_ACCESS_HANDLER~GET_OBJECT_DATA_BY_ENTITY
• IF_MDG_BS_BP_ACCESS_HANDLER~MAP_DATA_2API
• IF_MDG_BS_BP_ACCESS_HANDLER~PREPARE_EI_HEADER_MAP_2API
• IF_MDG_BS_BP_ACCESS_HANDLER~READ_OBJECT_DATA
• IF_MDG_BS_BP_ACCESS_HANDLER~SORT_ENTITIES
Write these methods:
• MAP_BP_VENAPC_2API
• MAP_BP_VENAPC_2STA
• READ_VENDOR
• IS_SUPPLIER_ENTITY
• READ_VENDOR_BY_LIFNR

Figure 11 – Handler Class Methods
- Add the Handler Class in Specify Handler Processed by Access Class
Go to transaction code MDGIMG-> Central Governance for Business Partner-> Specify Handler Processed by Access Class

Figure 12 – Maintenance of handler processed by access class
- Extend the GenIL Model
In preparation of expanding the User Interface functionalities, it is necessary to develop an enhancement for the BUPA_CUSP genIL model.
- Create Data Dictionary Objects
As part of extending the genIL model, it is essential to furnish a structure with attributes and the other one with keys.

Figure 13 – Key Structure

Figure 14 – Attribute Structure
- Create Enhancement
Start with transaction GENIL_MODEL_BROWSER. Create a new enhancement. In the Create Enhancement dialog enter BUPA_CUSP as Super enhancement.

Figure 15 – Enhancement Creation
- Create Dependent Object
Create a new Dependent Object with the name ZSP_AlternativePayeeCC.

Figure 16 – Dependent Object Creation
- Create Relation
Create a new Relation below the SP_CompanyCode element. As a name for the relation we use ZSP_CompAltPayeeRel

Figure 17 – Relation Creation below the SP_CompanyCode
- Connect the MDG Data Model with the genIL Data Model
Start the view cluster maintenance with transaction SM34.
View Cluster: VC_MDG_BS_GENIL_C
- Extend the Wiew Cluster

Figure 18 – View Cluster
Model Customizing
• Component Name: BUPA
• Object Type: BUS1006
• External Object Name: BP_Root

Figure 19 – Component – Model Customizing
Node Customizing
• Component Name: BUPA
• External Object Name: ZSP_AlternativePayeeCC
• Entity Type: ZBPVENAPC

Figure 20 – Component – GenIL – Node Customizing
- Extend User Interface
- - Create a Feeder Class
Create a feeder class using CL_BS_BP_GUIBB_LIST as superclass.

Figure 21 – Feeder Class
- Create Web Dynpro Component

Figure 22 – Create New Component Configuration
- Add feeder class and feeder class parameters
Feeder Class: ZCL_BS_SP_GUIBB_ALT_PAYEE_CC
Component Name: BUPA
Object Name: ZSP_AlternativePayeeCC
Editable: Yes

Figure 23 – Feeder Class and Feeder Class Parameters
- Enhancement of UI Configuration
- Add your list UIBB to Page Schema

Figure 24 – Overview Page Schema
- Add a reference to the List UIBB to the Wiring

Figure 25 – Wire Schema