Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI Call tracking

Former Member
0 Likes
356

Hi,

In the sales order user exit I want to introduce CALL_BAPI = X .

How should I know in the exit the call to this process is from BAPI.

In online transaction I get sy-tcode = VA02 , VA42 .

But when it is BAPI call , how should I track this, is there any system field? .

Regards

Prashant.

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
301

I don't have any idea about the system field but you can do it like this:

Before calling the BAPI set some memory in ABAP memory.

Like:


data: l_flag.
L_FLAG = 'X'.
EXPORT L_FLAG to memory id 'ZBAPI'.

In your user exit import this data from memory.


data: l_flag.
IMPORT L_FLAG from memory id 'ZBAPI'.
if l_flag = 'X'.
** called from BAPI.
endif.
free memory id 'ZBAPI'.

Regards,

Naimesh Patel