Application Development 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: 

BAPI Call tracking

Former Member
0 Kudos

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

naimesh_patel
Active Contributor
0 Kudos

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