on 2015 May 21 6:25 AM
The RFC function call failed with Return code 1 which shows the failure in Communication, to pick the tax information from 3rd party system.
Kindly let me know how to find the reason behind the failure to proceed further?
Hi Naga,
Well, usually SY-SUBRC would be set to 1 when an exception of a function module is mapped to sy-subrc =1.
You can check if the RFC Destination is reachable by using the Funciton Module 'RFC_PING'.
CALL FUNCTION 'RFC_PING' DESTINATION p_rfcdes (Destination system where FM/BAPI is available)
EXCEPTIONS
system_failure = 1
communication_failure = 2
OTHERS = 99.
If sy-subrc = 0 for RFC_PING then you can proceed to get data from development system.
You can use FM 'RFC_FUNCTION_SEARCH' to find FM existence in dev system.
CALL FUNCTION 'RFC_FUNCTION_SEARCH' DESTINATION p_rfcdes "System where the FM existence should be checked
EXPORTING
funcname =FM name
GROUPNAME = ' '
LANGUAGE = SY-LANGU
TABLES
functions = i_rfcfunc
EXCEPTIONS
nothing_specified = 1
no_function_found = 2
OTHERS = 3
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
This will return sy-subrc = 0 if FM exists, otherwise sy-subrc is 2.
This FM will check If the FM mentioned is available in the TFDIR Table with PMODE = R (Remote) in the system which is called. If the Destination keyword is not mentioned, it checks for the entry in the current system table, hence sy-subrc is always 2 in your case.
Thanks,
Kumar Saurav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
9 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.