Recently I have been answering queries around the system alias configuration in SAP NetWeaver Gateway, I thought I will share information on the same in this blog.
Prerequisite:
You just have to know the basics of developing OData services using SAP NetWeaver Gateway.
This blog does not cover web service part of the System alias.
System Alias is the wrapper around the RFC_Destination + the information related to routing of requests which is created using transaction code SPRO in Gateway HUB system (IWFND). Here is the navigation path:
SPRO -> SAP Reference IMG -> SAP Netweaver -> Gateway -> OData Channel -> Configuration -> Connection Settings
-> SAP NetWeaver Gateway to SAP System -> Manage SAP System Alias
SAP NetWeaver Gateway System Alias has the following properties:
SAP System Alias: Name
Description: <Enter the description>
Local GW: N/A
Local App: Check box that specifies the deployment of component IWBEP .
RFC Destination: RFC destination you created using the transaction code SM59
Software Version: Default/which ever applicable
SystemID: Not Required
Client: Not Required
WS provider Sytem: Not Required
Deployment Examples and its System alias configurations:
Example 1: Local APP
In this case (Example 1: Local APP), System alias configuration should have Local App flag set as IWFND and IWBEP are together and RFC destination should point to SAP back-end. RFC destination will be used by BEP data provider to call the RFC from SAP Backend.
Now how do you get the RFC destination in your Data provider?
Follow the code below
DATA lo_destination_finder TYPE REF TO /iwbep/if_destin_finder.
DATA lo_dp_facade TYPE REF TO /iwbep/if_mgw_dp_int_facade.
DATA lv_destination TYPE rfcdest.
* Get RFC destination
lo_dp_facade ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lo_destination_finder = lo_dp_facade->get_destination_finder( ).
lv_destination = lo_destination_finder->get_rfc_destination_via_rout( ).
Example 2:Remote APP
In this case (Example 2: Remote App), System alias configuration should not have Local App flag set, as IWFND and IWBEP are in different SAP systems and RFC destination should point to back-end where IWBEP is present which is used by IWFND to route the calls.
Here IWBEP data provider and metadata provider classes can use the local RFC Function Modules as well.
Example 3: Local App ,all the components in SAP Business Suite/Backend
In this case (Example 3: Local APP), system alias configuration should have Local App flag set as IWFND and IWBEP are together and RFC destination can be empty as all the components are in the SAP back-end.
System Alias in Service Builder:
There is another system alias which is used by Service Builder'sservice maintenance node which is used only in design time for registering and maintaining the service in the Gateway HUB from IWBEP(Service Builder) system .
System alias in this case should be created/configured in the system where IWBEP is installed i.e using transaction code SPRO. Navigation path below:
SAP Reference IMG -> SAP Netweaver -> Gateway Service Enablement -> Connection Settings to SAP Netweaver Gateway -> SAP NetWeaver Gateway Settings
System Alias here points to the HUB system.
It has the following properties
Destination System: Destination system name
Client
System alias name
RFC Destination
RFC Destination here is used to navigate from IWBEP(Service Builder) system to Gateway HUB System(IWFND) when the Register or Maintain or Error Log Button is clicked in the Service Maintenance node of Service Builder
Once the Maintain button is clicked,control goes to the corresponding IWFND system's /iwfnd/maint_service
screen
And that is all!! Feel free to contact me if you have any queries:)
Thanks and Best Regards,
Goutham