cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a script from BADI

aditya_ponnala
Participant
0 Kudos

Hello

We are having issues to use Runlogic_Ph to call a logic script and hence we want to implement a custom BADI that would call the script using BADI.

Did anyone implement a custom BADI that would call logic script?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Sorry, but runlogic_ph badi is exactly the solution for your requirements! What issues do you have with this badi?

aditya_ponnala
Participant
0 Kudos

Hi Vadim

About the error: We discussed this in the thread

https://answers.sap.com/questions/486965/error-with-run-logic-badi.html?childToView=487028#comment-4...

We tried to debug but still couldn't find the reason why RUNLOGIC BADI is failing when combined with our other BADI.

Thanks!

former_member186338
Active Contributor
0 Kudos

Sorry, but you have incorrect code in your own badi! The runlogic badi is working absolutely fine!

aditya_ponnala
Participant
0 Kudos

Well, the BADI is working fine and when we debugged it, RUNLOGIC is throwing errors.

Again to keep it simple: We have Model 1 and Model 2 in one Environment. We have default logic in both models. Existing BADI pushes data from Model 2 to Model 1. We want RUN LOGIC to run a script in Model 1 after existing BADI finishes pushing data to Model 1. Here is where the RUNLOGIC BADI is throwing error and our existing BADI is not showing any issue.

*INCLUDE EXISTING_BADI


*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
DEBUG = ON
VALIDATION = OFF


LOGIC = SL01.LGF
APP = MODEL1
DIMENSION COMMON_DIMENSION 1 = DIM 1
DIMENSION COMMON_DIMENSION 2 = DIM 2

...(Other common dimensions)

DIMENSION MODEL1_ONLY_DIMENSION = NO_DIM2

...(Other Model 1 dimensions)

DIMENSION MODEL2_DIMENSION_ONLY = <NONE>

...(Other Model 2 dimensions and are not needed in MODEL 1)

*END_BADI

Error: Dimension: MODEL2_ONLY_DIMENSION does not exist in MODEL 1.

Without RUNLOGIC, the existing BADI works fine and without BADI Run Logic works fine.


former_member186338
Active Contributor
0 Kudos

Have to repeat again - your badi has incorrect code (global parameters changing!). This incorrect code create issues for RUNLOGIC_PH (and will also create issues for the script code after executing this badi). Correct code of your badi and it will run fine with RUNLOGIC_PH.