MDG Derivation (BADI)
In this blog, we will see how to derive MDG attributes using BADI.
Derivations can be divided into two types.
- Single-entity derivation: Automatically populating some attribute value in one entity based on an attribute value from same entity. For this, we use 'USMD_RULE_SERVICE' BADI definition.
- Cross-entity derivation: Automatically populating some attribute value in one entity based on an attribute value from another entity. For this, we use 'USMD_RULE_SERVICE_CROSS_ET' BADI definition.
First, we will see a single entity derivation.
Scenario: We are going to make language English as the default if the user gives the country as India.
Steps:
1. Go to SE18.
2. In 'USMD_RULE_SERVICE' BADI defination, create BADI Implementation.
3. For creating BADI Implementation, first we need to create Enhancement Implementation.
4. Give the properties as below.
5. Now, create BADI Implmentation and give following properties.
6. Maintain the filter values. Here, we are going to perform derivation on the address entity, so we maintained the entity as AD_POSTAL and the data model as BP. (Note: To get the technical entity and attribute name, we can put debugger in empty method implementation and trigger it by opening MDG UI and there you can get the technical names, which we can use in our code)
7. Now, implement method DERIVE_ENTITY.
8. Write code as follows.
9. Finally, test this derivation on Customer or Supplier Governance UI.
Comments
Post a Comment