‎2007 Dec 06 3:44 PM
Hi Guys,
Do we need to have RFC function module existed in the system we are calling?
I have a requirement like this...
I created a RFC FM in system A and trying to get data from system B, but giving a short dump while executing.
RFC FM is exist only in system A but not in system B.
can somebody explain me on this?
thanks in advance...
Sailesh
‎2007 Dec 06 3:48 PM
Yes, the RFC must exist in the system where it is to be called. (B)
It doesn't have to exist in the system that calls the RFC. (A)
‎2007 Dec 06 3:48 PM
Yes, the RFC must exist in the system where it is to be called. (B)
It doesn't have to exist in the system that calls the RFC. (A)
‎2007 Dec 06 3:53 PM
Hi Daniel,
Thanks for the reply.
Is there any way we can do this with out creating the FM in system B? because, i do not know at this moment, what are the systems i am going to call?
sailesh
‎2007 Dec 06 4:37 PM
You cannot call an RFC-Enable FM if this doesn't exist in target system.
Yu can only handle old-type exception such as SYSTEM_FAILURE and COMMUNICATION_FAILURE, assigning to them a specific return code:
CALL FUNCTION 'RFC_SYSTEM_INFO'
DESTINATION rfcdest
EXCEPTIONS
system_failure = 1 MESSAGE mess "This
communication_failure = 2 MESSAGE mess "This
resource_failure = 3.
If the FM is then not founded in the target system, sy-subrc is set accordingly to the value you inserted for SYSTEM_FAILURE and COMMUNICATION_FAILURE.
I.E.
CASE sy-subrc.
WHEN 1 OR 2 OR 3.
MESSAGE 'RFC Error' TYPE 'E'.
WHEN OTHERS.
ENDCASE
Hope this helps.
Roby.
‎2007 Dec 06 4:39 PM
Hi Sailesh,
To call the RFC you need to pass Destination value, there is no other option.
Regards,
Satish
‎2007 Dec 06 4:56 PM
Yes it needs to be the target syatem, (B). however it will be used in the source system (A). In addition you have to create a destination in the source system using Transaction SM59. IN sm59 you have to specify the details about the target system (b).
Hope this helps.
Shreekant
‎2007 Dec 07 4:33 PM
Thanks for the information.
Is there anyway or FM, we can find, if the given function module exist in target system or not? So that, atleast i can capture the return code and give a warning message and avoid a dump.
shylesh
‎2007 Dec 07 5:08 PM