‎2015 Feb 19 12:52 AM
Hello:
I have the following situation:
I run an interface from legacy system to sap , this interface performs a goods receipt using : BAPI_GOODSMVT_CREATE . I need to put in the user exit: ZXMBC02 an environment variable to know I'm running the BAPI , these variables do not work me :
sy- TCODE EQ ' MB01 ' OR
sy- TCODE EQ ' MIGO ' OR
sy- CPROG EQ ' RS_TESTFRAME_CALL '
Thanks for the help
Best regards
‎2015 Feb 19 3:54 AM
Hello
You have two options-
1. You can call the following FM in User Exit and read the program stack to know that control is coming from BAPI.
SYSTEM_CALLSTACK
2. You are set the memory ID in interface where you are calling the BAPi and read the memory ID in User exit.
Regards
Sandy
‎2015 Feb 19 3:54 AM
Hello
You have two options-
1. You can call the following FM in User Exit and read the program stack to know that control is coming from BAPI.
SYSTEM_CALLSTACK
2. You are set the memory ID in interface where you are calling the BAPi and read the memory ID in User exit.
Regards
Sandy
‎2015 Feb 19 8:01 AM
Hello Dante Amor.
Make use of SY-CALLD variable.
It will have 'X' if called from BDC/BAPI and blank if the tcode is executed directly.
Regards.