sap-tutorials / abap-core-development

Tutorials to support various abap products and functions.
Creative Commons Attribution 4.0 International
18 stars 18 forks source link

Remote Function Call(RFC) - Connect to Your On-Premise System from SAP BTP, ABAP Environment #93

Closed warlogon closed 1 year ago

warlogon commented 1 year ago

Tutorials: https://developers.sap.com/tutorials/abap-env-rfc.html

STEP 10 and 14. I suppose, the name of Outbound service 'Z_OUTBOUND_RFC_000' has to be replaced with 'Z_OUTBOUND_RFC_000_SRFC' in the sample code:

DATA(lo_destination) = cl_rfc_destination_provider=>create_by_comm_arrangement(
                          comm_scenario          = 'Z_OUTBOUND_RFC_000_CSCEN'   " Communication scenario
                          service_id                    = 'Z_OUTBOUND_RFC_000'         " Outbound service
                          comm_system_id         = 'Z_OUTBOUND_RFC_CSYS_000'    " Communication system
                       ).
julieplummer20 commented 1 year ago

Hi Warlogon, When I wrote the tutorial, this was not the case. The _SRFC suffix was internal only. Have you tried the tutorial? Are you having an issue? Thanks and best wishes, Julie.

warlogon commented 1 year ago

Hi Julie, I've done the tutorial using the same names for my service, system and scenario. And without _SRFC suffix my code didn't work. In debug (CL_RFC_DEST_PROVIDER_CF_DEST IF_RFC_DEST_PROVIDER_PLUGIN~CREATE_BY_COMM_ARRANGEMENT) I've found an empty result table from query, because service Z_OUTBOUND_RFC_000 is actually doesn't exist. You can see in Step 5 section of this tutorial we have created an Outbound service: Z_OUTBOUND_RFC_000. (The SRFC suffix was added automatically) and real name of the created service is Z_OUTBOUND_RFC_000_SRFC.

julieplummer20 commented 1 year ago

Hi warlogon, Sorry for the delay. I have now updated the tutorial. Thanks a lot for your feedback. Best wishes, Julie.