Sorting Classic BADI Implementations
This is a self help Blog showcasing how to achieve sequence order for classic BADI Implementation’s. The Sequence of implementations can be achieved using 2 approach in case of classic BADI’s. The second approach has some restriction
Approach 1 via Sort Technique
Ok here I have a Classic BADI ZDEMO_CLASSIC_BADI and an corresponding Interface ZIF_EX_DEMO_CLASSIC_BADI
Implementation 1
Implementation 2
Implementation 3
There are 3 Implementations for the BADI. Lets try giving a implementation sequence via Sort.
To Sort, click Utilities -> Sort
If asked provide an Transport Request. That’s all !
Ok now the sorting criteria is available for multiple Implementations. Check as shown below.
Implement the sorting order. Enter a sorting value in the implementation, save and activate.
Ok lets do a quick test to verify the implementation sorting order.
After report execution, we see the implementation order sequence
Approach 2 via Filter values
The sorting can be achieved also via using Filter Type.
2 Options :
1) For a custom BADI, no issues.
2) For standard BADI, check if the filter values are enhanceable. If yes, you can add a new value to the value table of the Filter Type Data Element/Domain by calling the respective implementation. For more info, press F1 on the field enhanceable.
Create a filter for the BADI ZBADI_WITH_FILTER.
I have created a Data Element ZORDER_SEQUENCE (CHAR10) and used in in the Filter Type
BADI ZDEMO_CLASSIC_BADI with filter type ZORDER_SEQUENCE
Save the BADI.
Ok lets move to the Implementation part. We have 3 implementations.
Time for a quick test.
Result
So we can use the two approach’s with a careful considerations for the BADI implementations order sequence. Hope this was helpful.
Thank you So much....
Its really helpful. 🙂
Regards,
sachin.
Sujin,
I doubt if using a Data element with a value range as a FILTER can really be considered as "Execution of IMPL in a defined order".
Awaiting a few more experts opinion.
K.Kiran.
Thanks for a nice blog
it's very nice blog. Thanks a lot !!