Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

Sorting home made BADI

$
0
0

Hi,

 

Recently I am involve in a very big project and we are discussing ways to code in old fashion user exit (form exit ,functions).

 

One of the options is to use BADI within the enhancement framework .

 

I became aware of this idea from  A framework for local/region specific requirements in user-exits using BAdIs and the new enhancement framework (revisited). by Bruno Esperança

 

This small blog post will present an idea how to sort the BADI implementation prior to execution.

 

For code See attache program Y_R_EITAN_TEST_51_18

 

The basis of the idea is based on the fact that internal table IMPS that contains the implementations is public.

 

2014-10-07_06h41_39.png

2014-10-07_06h41_56.png

 

In the BADI interface we can create a method that will give the implementation the option to return its sorting value .

2014-10-07_08h36_29.png

 

FORM test_01 is "regular" call .

And the result:

 

2014-10-07_08h44_20.png


FORM test_02 is "sorted" call .

 

From each implementation we get the result of get_sort_value to create the a sorting table .

2014-10-07_08h59_08.png

 

We sort the implementation in descending order .

 

And the result:

 

2014-10-07_08h46_03.png


It seems to be working .

 

Mind you that this sorting code was not tested in actual production environment .


Regards.


Viewing all articles
Browse latest Browse all 948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>