Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a different rfc destination if code is run on a particular server ?

Former Member
0 Kudos

Hi,

I need to fetch blocked data from GTS server....

I am doing the same using the function module '/SAPSLL/BLCK_DOCS_SD_R3' present in the transaction '/SAPSLL/BL_DOC_SD_R3' ...

Now as per my requirement, i need to fetch data from a different rfc destination if the code is run on a particular server.... ie I need to set the RFC destination in that particular case....

I do not want to copy the whole function group and make changes in the place where the RFC destination is determined.

Is there any other way to get through this. ....

Thanks....

3 REPLIES 3

uwe_schieferstein
Active Contributor
0 Kudos

Hello

The RFC destination to the GTS server is determined within fm /SAPSLL/BLCK_DOCS_LS_FETCH_R3:


...
*------- RFC-Destination Legal Services ermitteln
  CALL FUNCTION '/SAPSLL/CD_ALE_RECEIVER_GET_R3'
       IMPORTING
            EV_RFC_DEST                   = LV_RFC_DEST
       EXCEPTIONS
            NO_RFC_DESTINATION_MAINTAINED = 2
            CUSTOMS_SERVER_NOT_UNIQUE     = 4
            OTHERS                        = 8.

  IF NOT ( SY-SUBRC IS INITIAL ) .
    MESSAGE ID     SY-MSGID TYPE SY-MSGTY
            NUMBER SY-MSGNO
            WITH   SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
            RAISING ERROR_ALE_SETUP.
    EXIT.
  ENDIF.

*------- Daten fuer RFC-Aufruf vorbereiten
  PERFORM BLOCKED_DOCS_REF_PREPARE USING    IV_APP_LEV
                                   CHANGING CT_DOCUMENT_NUMBER
                                            LT_OBJECT_DOCUMENT .

*------- Prozessindikator
  IF NOT ( IS_OUTPUT-SHWMSG IS INITIAL ) .
    CASE IV_APP_LEV.
      WHEN GC_APPLICATION_LEVEL-SALES_ORDER.
        PERFORM PROGRESS_INDICATOR USING IS_OUTPUT-SHWMSG
                                         TEXT-M05.
      WHEN GC_APPLICATION_LEVEL-OUTBOUND_DELIVERY.
        PERFORM PROGRESS_INDICATOR USING IS_OUTPUT-SHWMSG
                                         TEXT-M06.
      WHEN GC_APPLICATION_LEVEL-INVOICE.
        PERFORM PROGRESS_INDICATOR USING IS_OUTPUT-SHWMSG
                                         TEXT-M07.
      WHEN OTHERS.
*------- Nada

    ENDCASE.
  ENDIF.

*------- FB: RFC-Aufruf in Legal Services
  CALL FUNCTION '/SAPSLL/LC_BLCK_DOC_SELECT_RFC'
    DESTINATION LV_RFC_DEST
    EXPORTING
...

Calling fm /SAPSLL/CD_ALE_RECEIVER_GET_R3 the system tries to find the RFC destination from a distribution model (transaction BD64) for


- OBJECT = 'BUS6801'
- METHOD = 'SYNCHRONIZEIFR3'

If we are already on the GTS server I assume that the fetched RFC destination should be 'NONE'.

If you are on another system (<> GTS server) then you should create the appropriate distribution model which allows the system to determine the RFC destination to the GTS server.

Regards

Uwe

0 Kudos

Thanks Uwe...

I was able to identify that the GTS server is identified within the FM.../SAPSLL/BLCK_DOCS_LS_FETCH_R3.

Now.. i need to set the receiver, before the function module '/SAPSLL/BLCK_DOCS_SD_R3' is called in my program, for a particular scenario. In this scenario i do not want the system to fetch the receiver thru '/SAPSLL/CD_ALE_RECEIVER_GET_R3' called within /SAPSLL/BLCK_DOCS_LS_FETCH_R3, but in other cases, the FM should behave as it is designed to ..........

Also, I am not on the GTS server.

Is there any way out... i do not want to copy the function group and make the changes also...

0 Kudos

I want to fetch RFC destiantion when i am logged in to GTS system.

I have the FM LOG_SYSTEM_GET_RFC_DESTINATION but this requires LOGICAL_SYSTEM as input how will this be determined i cannot use any hardcoding.

Please suggest.

Regards,

Prateek