How to detect from which BAPI is a certain BTE called ???
Hello all !
My scenario is simple .
I have used a certain BTE 1120 and placed some code in it .
When i use BAPI_ACC_DOCUMENT_CHECK i don't want this BTE to get called ,
instead when i use BAPI_ACC_DOCUMENT_POST i want this BTE get called .
Is there any way i can tell when this BTE is trigered by which BAPI ??
Any system parameter that i could check inside the FM that contains the code of the BTE ,
so can put a simple IF CONDITION on example
IF sy-param NOT EQUAL TO BAPI_ACC_DOCUMENT_CHECK
DO THE STUFFFF .
THANKS IN ADVANCE
You can use static method GET_CALL_STACK of class CL_ABAP_GET_CALL_STACK or FM SYSTEM_CALLSTACK to read the call stack and put a condition inside your BTE FM.