How To Create SAP NetWeaver Gateway Service for SPI
Business Scenario
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Prerequisites
Step-by-Step Procedure
- Configuration on SAP NetWeaver Gateway System
- Configurations on Business Enablement Provisioning(BEP)
- Generate SPI service
- Registration and Activation of the Generated Service
Configuration on SAP NetWeaver Gateway System
This activity needs to be done in the system where software component IW_FND is installed
1. Manage RFC Destination
Create RFC Connection to the SAP Business Suite backend system.
- In transaction SPRO open the SAP Reference IMG and navigate to: and click the Activity icon. For information on how to manage RFC destinations, click on the corresponding IMG documentation.
2. Manage SAP System Aliases
- In transaction SPRO open the SAP Reference IMG and navigate to: and click the Activity icon.
- Choose New Entries.
- Enter the following details for the system alias:
Field Description SAP System Alias Name of the system alias, for example SPI_REMOTE Description Descriptive text for the system alias. Local GW Leave unchecked if the Backend system is not on the same system as the SAP NetWeaver Gateway system. For Local App Check if IW_BEP add-on is deployed on the SAP NetWeaver Gateway hub system. RFC Destination Specify the RFC destination that you created in the step above. WS Provider Leave it blank. Software Version Choose Default. - Save your settings.
This means if IW_FND and IW_BEP are co-deployed and Backend system is not on the same system as the SAP NetWeaver Gateway system, checkbox ‘For Local App’ should be checked.
Configurations on Business Enablement Provisioning(BEP)
This activity needs to be done in the system where software component IW_BEP is installed.
1.Manage RFC Destination
Create RFC Connection to SAP NetWeaver Gateway System. For this, first you must identify the SAP NetWeaver Gateway landscape.
- In transaction SPRO open the SAP Reference IMG and navigate to: and click the Activity icon. For information on how to manage RFC destinations, click on the corresponding IMG documentation.
2.Manage SAP System Aliases
- In transaction SPRO open the SAP Reference IMG and navigate to: and click the Activity icon.
- Choose Create and enter the following values:
Field Description Destination System Specify the system name of the host of SAP NetWeaver Gateway. For example, GW_HUB Client Specify the system client ID of the host of SAP NetWeaver Gateway. The client ID you specify should be in the specified system. System Alias Enter a unique name for the host of SAP NetWeaver Gateway. For example,BEP2HUB RFC Destination Specify the name of the RFC destination that you created in the step above. For example GWCNT200.
- Save your settings
More details about configuration can be found in SAP Library – SAP NetWeaver Gateway
Generate SPI service
You can create an OData service from an SPI object using Gateway Service Builder tool (transaction ‘SEGW’).
So in this case let us select Entity Type BASIC_DATA and DESCRIPTIONS.
So let us select the association DESCRIPTIONSofBASIC_DATA which is related to the enity selected above.

The message “Project ‘XXX’ has been checked; no errors were found” is displayed.
Since the property MATNR is not very user friendly let us add a label to it.
Double click property MATNR and click Redefine

Add a label to MATNR as “Material Number“.

10. Click to generate the runtime objects. The model and service definition screen opens. The Class Names for the Model Provider and Data Provider would be already entered by the wizard. The base class would be extended in the class name ending with ‘EXT’.
Note:- If any operation is not implemented in SPI and you want to provide custom implementation for the same in SAP NetWeaver Gateway, you can do it by redefining the relevant method of the generated extensibility Data Provider Class (DPC).
Registration and Activation of the Generated Service
For this, double click Service Maintenance node. You can see the list of Gateway HUB systems connected .
3. Provide the system alias(e.g. SPI_REMOTE) configured on Gateway System. Click enter to continue.

5. The registration status changes to a green node indicating the service is activated.
Service Document | http://<HOSTNAME>:<PORT>/sap/opu/odata/sap/<SERVICENAME>/?$format=xml |
Metadata | http://<HOSTNAME>:<PORT>/sap/opu/odata/sap/<SERVICENAME>/$metadata |
Now you can easily consume this service from any device, any platform or any technology and start creating, maintaining, and viewing data.
Apart from PLM, SPI is extensively being used in several applications of different areas across the whole SAP Business Suite.
You can find below the list of some of the applications that use SPI.
Area | Reference Applications |
---|---|
Product Lifecycle Management (PLM) | Bill of Material, Classification, Variant Configuration, Recipe, Specification, … |
Business Context Viewer (BCV) | Business Context Viewer (only uses SPI services for DMZ enablement) |
Industries & Assets (EAM) | Equipment, Functional Location, Maintenance Order & Notification, Job Confirmation |
Oil & Gas (GHO) | Network Objects, Allocation Rules, Allocation Workbench |
Material Management (MM) | Purchase Requisition |
Production Planning (PP) | Consumer Products for Food and Beverage |
Financial Accounting (FI) | Sustainability Enhancements for Vendor |
Solution Manager (SolMan) | Landscape Management |
Master Data Governance (MDG) | Material |
Sustainability OnPremise NWA | Global Batch Traceability (GBT) |
HANA Application Development | Demand Signal Management (DSM) |
TIP | Gateway 2.0 (SP4) offers a generator from SPI to OData Models |
Expect new blogs on any new features/enhancements on integration of SAP NetWeaver Gateway with SPI, so stay tuned!!!
If you have any queries, shoot an email to either Ashish Kumar(ashish08.kumar@sap.com) and/or Sai Harish Balantrapu(sai.harish.balantrapu@sap.com).
========================================================================================================================
nice blog....
Thanks, very helpful!
Thanks a lot, Ashish!
We've really been waiting for such blog...
Hi Ashish,
Nice Blog.
Thanks,
Syam
Hello Ashish/Sai,
I have gone through this documents
Which is really Useful.
Now we are working with MDG(MDGM/MDGC/MDGS)with Fiori.
Could you please guide us - How To Create SAP Net Weaver
Gateway Service for MDG(MDGM/MDGC/MDGS)
It would be great if you can share some documentation related
to SAP Net Weaver Gateway Service for MDG(MDGM/MDGC/MDGS)
Thanks & Regards,
Rakesh
Hello Ashish ,
I am getting an Error "Failed to get SPI information"
After doing 5th step,
I want to know what might be the mistake ,
Thanks & Regards,
Dikshith
Good one Ashish
Hi Dikshith,
How did you solve this error? ("Failed to get SPI information"). I am stuck with the same error for some time now. We have a hub configuration with IW_SPI installed in Gateway system.
Appreciate your help.
regards,
Devanand L
Hi,
The system alias configuration may have been incorrect. Please check the blog http://scn.sap.com/community/gateway/blog/2013/05/30/system-alias-and-routing-of-request-in-sap-netweaver-gateway .
Regards,
Harish
Hi Harish,
Thanks for the reply. I have checked the configurations and they are all ok. While debugging i found that the metadata node info exported from Backend system to the buffer is found empty when the same is imported in the Gateway system. Also i am getting an exception while importing as 'CX_SY_IMPORT_MISMATCH_ERROR'.
Kindly help me with this issue.
regards,
Devanand
What is exactly Data and Model provider Classes are and their Differences
Hi Raghuram,
The Model Provider class provides the metadata of the OData service. The Data Provider class maps the fields in the service to the data source in the backend ABAP system. Hope this clarifies.
Regards,
Harish
Thank u