Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to call the RFC destination dynamically in CRM system?

i call an RFC in  CRM which has  an ECC destination.

i had written hardcoded, but when it went to production or quality the destination may change

CALL FUNCTION 'Z_Function_module' DESTINATION 'ERZCLNT301'.

so, Is there any FM to get the RFC destination, or any other process other than hard coding?

Former Member
Former Member replied

the below code will works

CALL FUNCTION 'SMOF0_READ_SITESELECT'

          TABLES

            to_siteselect = lt_siteselect.

        READ TABLE lt_siteselect INTO ls_siteselect

               WITH KEY sitetypeid = cl_smw1_siteprovider=>c_sitetype_r3oltp.

        ev_dest = ls_siteselect-rfcdest.

Regards,

akshath

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question