on 01-26-2006 10:28 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
hi,
if you search forum, some advices points you to set debug mode of user who connects to r/3 system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.