My requirement is to execute the RFC in SAP R/3 and send the output to SAP XI which needs to download to the database. I do not require any response from the database. I am using RFC_READ_TABLE function module in SAP R/3. This function module expects the Table name as Input parameter.
By default, if there is any input parameter to be passed to the sender RFC, it treats it as a synchronous call. The work around to achieve this requirement is to create a dummy RFC which would not have any import parameters and just the export parameters or table parameters as shown below:
Then on create an executable report in SE38. The first step in the program would be to execute the RFC_READ_TABLE function module in SE38 using a variant. Pass on the output of RFC_READ_TABLE to the ZRFC_READ_TABLE (dummy) function module. Sample code is shown below.
This ZRFC_READ_TABLE_EOFM function should be called with DESTINATION as the TCP/IP RFC destination created for registering the program ID in SM59 transaction.
DO NOT forget to execute COMMIT WORK after executing the RFC !!!!!!!!