10-02-2007 1:59 AM
Dear Experts,
I have written simple Remote Function module as like given below.
Before that i did all required RFC settings in SM59 and tested from there.
It is connecting from each other.
REPORT ZTEST_RFC .
data: rfc_var1 type i VALUE '10',
rfc_var2 type i VALUE '599',
rfc_result type i.
CALL FUNCTION 'Z_SUM'
DESTINATION 'dev'
EXPORTING
VAR1 = RFC_VAR1
VAR2 = RFC_VAR2
IMPORTING
RESULT = RFC_RESULT
EXCEPTIONS
COMMUNICATION_FAILURE = 1
OTHERS = 2.
I am getting sy-subrc eq 1.
Please guide what could be wrong...do we need pass any parameters in FM.
Thanks
Cris
10-02-2007 2:09 AM
10-02-2007 2:09 AM
10-02-2007 2:24 AM
Hi,
I tried that also...still same problem. Do you know how we can debug the RFC?
Thanks
Cris
10-02-2007 2:47 AM
Also To debug a RFC:
You need to make sure that you are able to login in to the system containing the RFC using SM59 with your own login. Now place a break point just before the RFC Fm in your se38 and press F5. now it goes into the RFC .Now you need to place a break point at your RFC FM by specifying your RFC name.
and hit F8 . It goes inside the RFC Func module code.
Try it and let me know.
Sri
10-02-2007 3:10 AM
Hi All,
Thanks for all your good replies, Problem is resolved.
Reason is that i gave host id in destination instead of RFC name.
Once again thanks for all your support and i am giving points all of you.
Cris
10-02-2007 2:41 AM
Hi Cris,
The error occurred is due to RFC destination "dev" does not exist.
FYI, the destination is case-sensitive. Make sure the RFC name that u maintain in
SM59 is correct.
Hope this help.
Best Regards,
Hikaruno
10-02-2007 2:43 AM
Hi Cris,
This is pretty basic one though...but may be u can check..
Is the FM Z_SUM "Remote Enabled" in the Attributes?
Sri