‎2010 Jan 19 10:35 AM
Hello. sap developers
I am running a functional module using RFC (take a look at the code example):
DATA it9106 LIKE p9106 OCCURS 0.
DATA p_pernr LIKE p0001-pernr VALUE '83000845'.
DATA p_des(6) VALUE 'THR200'.
CALL FUNCTION 'RH_READ_INFTY'
DESTINATION p_des
EXPORTING
* authority = 'DISP'
with_stru_auth = ' '
plvar = '01'
otype = 'P'
objid = p_pernr
infty = '9106'
istat = '1'
TABLES
innnn = it9106
EXCEPTIONS
all_infty_with_subty = 1
nothing_found = 2
no_objects = 3
wrong_condition = 4
wrong_parameters = 5
OTHERS = 6.I got sy-subrc value equals to 6 and I don't know why.
So could you help me how I can debug this FM ?
Thank You.
‎2010 Jan 20 3:09 AM
Dear Kernel,
What I have undestood from your problem is that, the function module which you want to execute is located in another system (as you are passing the: pdes).
What you can do is go to that particular system and in the called functio module you can put the break-point.(if the FM is created by you, you can insert the statement: BREAK-POINT <userid>(check for the addition for putting the break-point by pressing F1 on it.)) So when you will call the FM, it will take the control to the particular function module.
Also check whether the RFC destination has been maintained properly(tCode SM59).
Hope this helps.
Regards
s@k
‎2010 Jan 19 10:44 AM
‎2010 Jan 19 10:53 AM
‎2010 Jan 19 11:00 AM
hi,
In your code
go to Utilities- External Breakpoints- Set/Delete External Breakpoint
Also Declare
DATA it9106 LIKE p9106 OCCURS 0 with header line .
thanks,
‎2010 Jan 19 11:01 AM
hi,
In your code
go to Utilities- External Breakpoints- Set/Delete External Breakpoint
Also Declare
DATA it9106 LIKE p9106 OCCURS 0 with header line .
thanks,
‎2010 Jan 20 2:56 AM
hmm, strange. I can't find external breakpoint in my SAP version.
Is it let me to debug FMs run via RFC ?
‎2010 Jan 20 3:09 AM
Dear Kernel,
What I have undestood from your problem is that, the function module which you want to execute is located in another system (as you are passing the: pdes).
What you can do is go to that particular system and in the called functio module you can put the break-point.(if the FM is created by you, you can insert the statement: BREAK-POINT <userid>(check for the addition for putting the break-point by pressing F1 on it.)) So when you will call the FM, it will take the control to the particular function module.
Also check whether the RFC destination has been maintained properly(tCode SM59).
Hope this helps.
Regards
s@k
‎2010 Jan 20 4:12 AM
Yes. I understood my problem right.
But this modude is not mine and I can't modify it, so if I put breakpoint in destination system and call FM in source system debugger skips my breakpoint anyway.
RFC address is set correct.
But when I run FM in destination system I got correct results.
‎2010 Jan 20 7:26 AM
Thank you guys. Versions of infotype structure are differes, therefore I was getting an error.