Skip to Content
author's profile photo
Former Member

RFC function call of 'RFC_CALCULATE_TAXES_DOC' failed with Return Code 1

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?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • May 21, 2015 at 05:40 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded