cancel
Showing results for 
Search instead for 
Did you mean: 

How to Trace a BAPI ?

Former Member
0 Kudos

Hello Experts from SAP,

My developer is is unclear why his BAPI sometimes does not seem to work.

This BAPI is called via RFC from external application.

When called in R/3, I managed to trace the RFC call but its very difficult to understand the trace file.

And I cannot find the BAPI name in the file. The aim is to know what is wrong with the BAPI or at which stage is the BAPI not processing properly or in a time-out situation such that the program never ends.

Does anyone here know how to trace such a BAPI?

Would really appreciate if you could kindly provide a hint.

Best Regards,

Pascal Gabin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pascal,

Tracing External RFC calls end-to-end has very limited options. One way to achieve this is to trace ths connectivity, functionality and performance separately.

For connectivity, you could use a Synchronous RFC call and check the response. To be more generic, there is SAP function module FUNCTION_EXISTS that can if the desired BAPI is available in SAP. That verifies the system connectivity and BAPI availability.

For functionality, now that the connectivity is established, you should be able to simulate the BAPI run within SAP. If needed, use a custom wrapper program to call the BAPI within SAP using the external file. Then you can use the debug functions in SAP.

For performance, you can use the custom wrapper again to load test the BAPI.

Cheers,

Bhanu

Answers (2)

Answers (2)

Venkat_Sesha
Advisor
Advisor
0 Kudos

Hi Pascal,

Use ST12 and select the option of Workprocess you want to monitor.

Activate the processors and you will see a green bulb on the left.

Deactivate it once it is finished to collect the data.

Former Member
0 Kudos

Check transaction SM58 for TRFC & SM59 to check the RFC destinations.

Thanks,

Bipin

Former Member
0 Kudos

There is a BAPI being called by a External system acting as server calling client SAP.

This BAPI is frequently not responding or in a wait state as nothing is returned to the external calling server.

How can I find out what this BAPI is doing and problem at which step? Can this be found in the trace?

Thanks in advance.

Pascal G.

Former Member
0 Kudos

Hi Pascal

Three ways to do this (AFAIK)

If WAS > 6.20

Then you can set an external debugging against an user, then run the external service connecting with the user for which debugging was switched on. This again will launch the BAPI in debugging mode in sapgui.

If WAS < 6.20 and runs Basis 4.6D and interfacing through java/jco , then use the method jco.setAbapDebug(true) . This will launch sapgui with BAPI in debug mode.

If the above not possible , put an infinite loop within func module, this will cause the execution to be looping at that point. Go to sm50 click on workprocess and debug the workprocess (function available on menu). Change the value and continue break the loop and continue execution

Regards

Pran