2008 Nov 18 8:49 AM
Hi all
i am new to BADI, so i need your help regarding this.
I hav 2 BADis. i have created implementations for these BADIs in se19.
Now my requirement is - in my 1st BADI i need to check the Billing Type. Only if the billing type is F2 , should the 2nd BADI be executed.
What i have decided is to set a flag in my 1st BADi, and check the status of my flag in my 2nd BADI. but my flag is a local variable and i cant acess the flag in my 2nd BADI.
Iis there any other way of doing it or can i declare my flag as a global variable.If so, how 2 do it.
Please help
Thanks in advance
Winnie
Hi all
i am new to BADI, so i need your help regarding this.
I hav 2 BADis. i have created implementations for these BADIs in se19.
Now my requirement is - in my 1st BADI i need to check the Billing Type. Only if the billing type is F2 , should the 2nd BADI be executed.
What i have decided is to set a flag in my 1st BADi, and check the status of my flag in my 2nd BADI. but my flag is a local variable and i cant acess the flag in my 2nd BADI.
Iis there any other way of doing it or can i declare my flag as a global variable.If so, how 2 do it.
Please help
Thanks in advance
Winnie
2008 Nov 18 9:31 AM
Hi Winnie,
I have one idea here. Try using this using EXPORT and IMPORT statements.
In First BADI use EXPORT TO MEMORY <VARIABLE> ID <MEMID>.
In second BADI use IMPORT the same value IMPORT <VARIABLE> FROM MEMORY ID <MEMID>.
Check whether IMPORT is successful with sy-subrc value.
IF SY-SUBRC = 0.
ENDIF.
For clarity on syntax of IMPORT and EXPORT please refer to F1 help.
Regards,
Ramesh.
Edited by: Ramesh Kashigari on Nov 18, 2008 11:00 AM
2008 Nov 18 9:56 AM
Hi Winnie,
You can check billing type in 2nd BADI Implementation.
This way both BADI will always be trigerred, but 2nd BADIs logic will be executed only if billing type is F2.
Regards,
Mohaiyuddin