Skip to Content

Can I use Logic Script conditions to determine whether to CALL A BADI or not?

Hi Experts,

I have a requirement; there is this input template which contains a hidden EPMSAVEDATA which essentially saves a flag (1, -1, or 0) to that members combination and we would like to leverage that saved value (1, -1, or 0 ) and use it as a "condition" in the a Logic Script file to determine whether or not we call a BADI.

Essentially the logic script file will scoop the parameters from that EPMSAVEDATA on the input template and if the result is "1" it will call the BADI otherwirse don't do anything.

Based on my experience it is not doable at all, but I figured there may be somebody out there who has had this or a similar requirement. Any help will be much appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 25 at 10:17 PM

    Doable!

    But you need to explain sequence of events!

    Are you talking about default.lgf?

    May be it's better to think about write back badi that will see write to some specific intersection and perform required calculations?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Vadim,

      Thanks for your response. Not really, we were actually talking about writing this potential Logic into a separate Logic Script file not the Default.lgf

      we are planning the sequence of events as following;

      1- Enter the data in the template and save it back to the server. Data in the data intersections gets saved as well as the flag (1, -1, or 0) coming from the EPMSAVEDATA function based of a different set of members combination.

      2- The supervisor then opens the report and verifies the numbers, if he agrees with it he'll then click a Macros button (APPROVE) to approve

      The MACROS (APPROVE) when clicked would execute a DM which would contain that potential Script Logic that evaluates the flag previously saved with EPMSAVEDATA (1,-1,or 0) and decides whether or not to execute the BADI we have written.

      If the BADI is executed it will tell the system to move this set of data that has previously been saved from one CATEGORY member to the next one at a higher level in the hierarchy.

      Note; The next category level for which the data needs to be moved varies based on the current member selection. It is not simply following the hierarchy order, that is what the BADI takes care of.

      Thanks

  • Jan 26 at 03:02 PM

    After looking on the sequence of events I don't understand the issue!

    Your custom logic badi can read this flag inside badi and depending on this flag - do nothing!

    P.S. There is no way in script logic to perform conditional badi execution depending on transactional data. But why not to check flag in the badi???

    Add comment
    10|10000 characters needed characters exceeded