Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor
0 Kudos

When we're creating many RFC destinations in XI

sometimes, we may find it difficult to maintain all of them on different systems.

SAP proposes a quite handy, little report SXI_GET_REMOTE_DESTINATIONS which allows us to get all RFC destination from another system.


This report however, allows only to get RFC destination which are not present on our destination system.


If we'd like to use this report to maintain all of our RFC destinations on one system (it doesn't even have to be XI)
we have to modify it a little bit.


There are two simple steps to be done:



Step one

- we modify the function module that our report uses:






***Function Z_SAI_GET_RFCDES

******************************************

**Make sure you comment out this check**

******************************************

  •   get only the tables for those destinations that are not in the current system

  •    loop at <tab> into <line>.

  •      tabix = sy-tabix.

  •      read table t_rfcdest with key table_line = <rfcdest> transporting no fields binary search.

  •      if sy-subrc = 0.

  •        delete <tab> index tabix.

  •      endif.

  •    endloop.

***********************************************

**Change the function from Insert to Update**

***********************************************

CALL FUNCTION 'DB_UPDATE_TABLE'

  EXPORTING

    TABLENAME            = table

  • IMPORTING

  •   SQLCODE              =

  TABLES

    INTTAB               =

***Report Z_SXI_GET_REMOTE_DESTINATIONS

****************************************************************

**Change the function name to the one you created in Step 1**

****************************************************************

    CALL FUNCTION 'Z_SAI_GET_RFCDES'

      EXPORTING

        IV_RFCDEST             = rfcdest

        TESTMODE               = testmode

      TABLES

        CREATED_RFCDESTS       = created_rfcdests

     EXCEPTIONS

       RFC_ERROR              = 1

       NO_RIGHTS              = 2

       INTERNAL_ERROR         = 3

       WRITE_ERROR            = 4

       OTHERS                 = 5







We can test our new report.


  



Now, no matter how many times we'll execute this report, we'll always get all RFC destinations from our source system.





With this report we are now able to maintain all of your RFC destinations on just one system
and in case of any changes
on the central system we can always update

ALL

destinations on all target systems decreasing the possibility of making any mistakes.




Tested on XI 3.0 SP13