Derivation type: Enchancement
Deriation type “Enchancement” is usefull when all other derivation types are not able to cope with a derivation-task. With ABAP code you can get any data you need.
Scenario: we will take as example scenario from Derivation type: Table lookup.
In Analyzer we use some characteristics. One of them is WYQ14S “Country”. We need it to set as “Country of Organization’s Registered Office” of Business partner while Automatic integration TRM and Analyzers.
IMG -> Financial Supply Chain Management -> Treasury and Risk Management -> Basic Analyzer Settings -> Automatic Integration of Financial Objects in Transaction Master Data -> Money Market -> Define Derivation Strategy (tr. AFO_FOI_DER_MONEY)
Select “Enchancement” step.
Pay attention to Ehchancement ID – RMDRM001 – we will need it later.
Press “Project management” button.
Enter Project Id – “ZDERIVAT” and press “Create” button
Enter project short text and press “Enchancement assighnments”.
Enter Enchancement ID (from the first screen of newly created derivation step), save and press “Components” button.
Activate project and make a double click on Function exit.
Here you can find Function EXIT_SAPLCFADMM_001declaration – we will use it.
I_DATASTR – Analysis Structure id.
I_STEP_ID – derivation step id.
I_DATA – date of execution.
This is our Source field declaration. We use them in our select as they have values we need to get data for Target fields.
This is Target field declaration. You have to put values that you will get through ABAP code into this fields.
E_EXIT_IS_ACTIVE – always set this field as “X” in order to pass data from variable to target fields in derivation.
E_FAILED – if you failed to obtain data – set this field as “X”.
Make a double click on include ZXRMDMMU01. The system will ask you if you want to create new include.
Create include and enter type of programm – “I Include programm”.
Enter ABAP code into include.
SELECT SINGLE CNTRY_COMP FROM BP001 INTO E_RM_CHAR WHERE PARTNER = I_MONEY_MARKET-KONTRH. IF sy-subrc <> 0. E_FAILED = 'X'. ELSEIF E_EXIT_IS_ACTIVE = 'X'. ENDIF.
After all you have to activate newly created data.
Activation our include.
Enter Source field and Target field.
Derivation step is ready.
For other Derivation topics reffer toTRM Derivation (index)