cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging aRFC models on the ABAP side

Former Member
0 Kudos

Hi all,

is there a way to debug the RFC function modules as they are called from the WDF?

I tryed this in my controller, but it didn't work (and I donna why):

custSave.modelInstance().getJcoClient().setAbapDebug(true);

Any help is appreciated.

Nick

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

What we do is put an infinite loop into the BAPI that we want to debug (when we want to debug it),

I can't really remember ABAP, it's been a long time; but something like;

X = 'X';

WHILE X = 'X'.

some stupid line.

ENDWHILE.

When the RFC is called it'll just loop inside there. Run transaction SM50, see your program and enter debug mode. First thing, change the VALUE of X to ' '. That'll bring you out of the infinite loop and you can step through the RFC code. Of course this can only be done with your own BAPI's I suppose.

Patrick.

Former Member
0 Kudos

Hi,

I think following will be a better solution than what Patrick had given.

In the new ABAP logon there is Http Debugging. A very nice feature.

Follow the following steps:

1. Go to se37 transaction of the R/3 system. Open the RFC in display mode(F7) which you wanted to debug.

2. Go to Utilities->Settings, which opens a popup

3. Select ABAP editor in the top level tab and debugging in the second level tab.

4. Check the "Actv." check box.

5. In the user input field, enter the user name.

The user name is the R/3 logon id with which the user logs in while executing the WD application. i.e., this is the user which you had specified in JCo destinations.

5. Don't check the IP matching check box.

Now when you run the WD Application, ABAP debugging starts automatically in a new session. In that it will ask for which break point, select "Http Breakpoint".

And if there are multiple application servers(load balancing), then you have to go to each server(transation sm50) and then in each server enter in to RFC code and you have to set the break point in each session. Because we don't know which server will hit in a load balanced environment.

Hoping that this info is of help to you.

Thanks and regards

RK

HuseyinBilgen
Active Contributor
0 Kudos

Hi Radha,

If the backend system is 46C, your procedure doesn't work as there are no setting as you mentioned.

regards

Former Member
0 Kudos

HI Huseyin,

Ran across the same problem in our 4.6c environment and used the following method.

1) create wrapper function module with the same interface as the SAP function module.

2) Within wrapper function module

- call SAP function module 'BAPI_GOODSMVT_CREATE'in

background task

- call 'START_OF_BACKGROUNDTASK' with no send option

3) Once you have called function module from WD then go to SM58 and you will see call to 'BAPI_GOODSMVT_CREATE' has been recorded. From here there is a menu option to within SM58 to debug. Enjoy...

call function 'BAPI_GOODSMVT_CREATE'

in background task

exporting

goodsmvt_header = goodsmvt_header

goodsmvt_code = goodsmvt_code

testrun = testrun

  • importing

  • goodsmvt_headret = goodsmvt_headret

  • materialdocument = materialdocument

  • matdocumentyear = matdocumentyear

tables

goodsmvt_item = goodsmvt_item

goodsmvt_serialnumber = goodsmvt_serialnumber

return = return.

call function 'START_OF_BACKGROUNDTASK'

exporting

nosend = 'X'.

Regards,

Keith L.

HuseyinBilgen
Active Contributor
0 Kudos

hi,

if you search forum, some advices points you to set debug mode of user who connects to r/3 system.

Former Member
0 Kudos

I searched the forum, before I posted this. But the only hints I could found, dealt with debugging WebDynpros.

I want to debug the RFC function module!

HuseyinBilgen
Active Contributor
0 Kudos

Hi,

Did you checked the weblog

/people/achim.hauck/blog/2004/10/27/how-to-debug-bapirfc-calls-in-web-dynpro

which is about "How to... debug BAPI/RFC-calls in Web Dynpro"

it may help you to debug RFC func.