Skip to Content
author's profile photo Former Member
Former Member

Is there any function Module available?

Hi,

Could you please tell me whether the function module is available for the scenario below.

If we pass RFC Name to the function module it should return success or failure message for the particular target server maintained in the RFC.

We need to check with the help of RFC we just need to know whether the particular target server is running fine or not?

Please help me in this regard.

Thanks & Regards,

Swathi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Posted on Mar 17, 2009 at 08:10 AM

    Welcome to SCN.

    Try RFC_CHECK_DESTINATION

    P.S. Use Proper Subject line.

    Read rules of engagements.

    Search forum before posting the query.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 08:13 AM

    Try below FMs

    RFC_CHECK_DESTINATION

    RFC_CHECK_DESTINATION_ID

    TREX_RFC_CODEPAGE_CONV_CHECK

    TREX_RFC_CONNECTION_CHECK

    TREX_RFC_CONNECT_CHECK_LOCAL

    IWB_SHE_RFCDESTINATION_CHECK

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 08:20 AM

    In fact you can try to execute any function module with proper destination and catch exceptions. For this purpose there's an empty function module

    CALL FUNCTION 'RFC_PING' DESTINATION l_dest
                      EXCEPTIONS
                        communication_failure = 1  MESSAGE message_ucts
                        system_failure        = 2  MESSAGE message_ucts
                        OTHERS                = 3. "#EC *

    you can use it and if you have exception it means that something is wrong with the destination server.

    Also FM - RFC_VERIFY_DESTINATION is a good function to do it.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 08:23 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      >

      > Hi,

      > See this Link..

      > [http://help.sap.com/saphelp_nw04/helpdata/en/22/042537488911d189490000e829fbbd/content.htm]

      > Regards,

      > NNR.

      Can u tell how this link is going to help when the OP is looking for a specific FM,

      Don't post just for the sake of posting.

      кu03B1ятu03B9к

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 08:26 AM

    Hi Swathi,

    Check this function module:

    RFC_CHECK_DESTINATION_ID

    Hope it helps

    Regards

    Mansi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 08:32 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2009 at 01:33 PM

    Hi Swathi,

    Actually there is a program available that can check an RFC destination (regardsless of what type it is). In fact within transaction SM59, behind the "Connection Test" button this report is runned and the results shown on screen.

    I have made a small ABAP objects method to encapsulate this.

    This method has an interface and ABAP code:

    -->INTERFACE:
    import: RFCDEST  TYPE RFCDEST (OPTIONAL) - Destination to test
    change: REACHED  TYPE BOOLEAN            - Is destination active?
    change: DETAILS  TYPE RFCSI              - RFC system info (see FM RFC_SYSTEM_INFO)
    
    -->ABAP CODE:
    METHOD reach_rfc_destination .
    * Test RFC destination connection (all types)
    *
      DATA:
        loc_rfcsi TYPE rfcsi.
    
    * Answer is unknown at the start of the method
      CLEAR:
        loc_rfcsi,
        reached.                  " In this way it is always set to GC_FALSE
    
    * Only if an RFC Destination is supplied
      IF  rfcdest IS SUPPLIED
      AND rfcdest NE space.
    
    *   Clear memory area before call
    *   so no details about previous RFC test calls do exist
        FREE MEMORY ID '%_rfctest'.
    
    *   Remote test call
        SUBMIT rsrfctes
          WITH dest = rfcdest AND RETURN.                    "#EC CI_SUBMIT
    
    *   Collect possible RFC information
        IMPORT rfcsi TO loc_rfcsi FROM MEMORY ID '%_rfctest'.
    
    *   Reached
        IF loc_rfcsi IS INITIAL.
    *     Answer is not reached
          reached = gc_false.
        ELSE.
    *     Answer is reached
          reached = gc_true.
          details = loc_rfcsi.
        ENDIF.
      ENDIF.
    
    * Housekeeping
      CLEAR:
        loc_rfcsi,
        sy-subrc.
    
    ENDMETHOD.

    This will supply you with gc_false (=constant value with space) or with gc_true (=constant value with X).

    When gc_true the destination is OK and reachable.

    Regards,

    Rob.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.