
Debugging a BAPI or RFC Call in ABAP
Use
If a BAPI or RFC call is returning wrong or no results to your VB application, you may want to debug the ABAP function that you are calling.
Prerequisites
You must have the SAPGUI installed on the machine on which you are working.
Procedure
Dim sink as new RfcGuiSink
<proxy object>.AdviseRfcGuiSink sink, 1, 1
where <proxy object> is the same object that you are using to call the BAPI or remote function.
Result
When the VB program calls the BAPI, a SAPGUI window will start, and you can step through the BAPI or remote function module.

Remember to delete the AdviseRfcGuiSink call from the release version of your application!