Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
17,458
Currently, SAP NetWeaver Gateway offers an extremely simple and easy way to expose data via the REST based Open Data (OData) format. Using Gateway, numerous services based on BOR objects, RFCs, GenIL, EasyQuery and Service Provider Infrastructure(SPI) can be generated. This blog is all about how to generate SAP NetWeaver Gateway service for SPI. Basically, the Service Provider Infrastructure (SPI) is an application and UI technology independent layer for business data exposure, which is used across the whole Business Suite to build timeless software.
For easy understanding, we have provided a business scenario here....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Business Scenario

You as an enterprise are using SAP Product Lifecycle Management (PLM) to manage the lifecycle of your product and you focus more on the product data management. As Material Master Management allows creating, maintaining and viewing material master data records, you want to expose all of these operations as an OData Service in order to take advantage of the features of OData Service like Ease of consumption, Industry standard, Open specification promise etc.
Moreover, you have the material data and services exposed via Service Provider Infrastructure (SPI) application.
So let’s see how you can create an SAP NetWeaver Gateway service for SPI (as long as you know a little bit about OData specifications) without the need to know the mapping between SPI and OData, and bests of all, WITHOUT having to write a SINGLE LINE OF CODE!!!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Prerequisites

SPI  Integration with Gateway requires the following software components
• IW_SPI 100
• IW_BEP 200 SP4
• IW_FND 250(Gateway Hub) SP3
• SAP_BS_FND 7.02 SP4 (minimum release of SAP_BS_FND) along with the notes 1681356 and 1684534 installed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Step-by-Step Procedure

Following are steps which you need to follow
  • 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: SAP NetWeaver -> Gateway -> OData Channel -> Configuration -> Connection Settings -> SAP NetWeaver Gateway to SAP System -> Manage RFC Destinations -> 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: SAP NetWeaver -> Gateway -> OData Channel -> Configuration -> Connection Settings -> SAP NetWeaver Gateway to SAP System -> Manage SAP System Aliases -> and click the Activity icon.
  • Choose New Entries.
  • Enter the following details for the system alias:
    FieldDescription
    SAP System AliasName of the system alias, for example SPI_REMOTE
    DescriptionDescriptive text for the system alias.
    Local GWLeave unchecked if the Backend system is not on the same system as the SAP NetWeaver Gateway system.
    For Local AppCheck if IW_BEP add-on is deployed on the SAP NetWeaver Gateway hub system.
    RFC DestinationSpecify the RFC destination that you created in the step above.
    WS ProviderLeave it blank.
    Software VersionChoose 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: SAP NetWeaver -> Gateway Service Enablement -> Backend OData Channel          -> Connection Settings to SAP NetWeaver Gateway->Create RFC Destination for Outbound Queues 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: SAP NetWeaver -> Gateway Service Enablement -> Backend OData Channel          -> Connection Settings to SAP NetWeaver Gateway->SAP NetWeaver Gateway Settings and click the Activity icon.

  • Choose Create and enter the following values:
    FieldDescription
    Destination SystemSpecify the system name of the host of SAP NetWeaver Gateway. For example, GW_HUB
    ClientSpecify the system client ID of the host of SAP NetWeaver Gateway. The client ID you specify should be in the specified system.
    System AliasEnter a unique name for the host of SAP NetWeaver Gateway. For example,BEP2HUB
    RFC DestinationSpecify 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’).

1. Go to the transaction SEGW. Create a New Project by clicking on
2. Enter the details for the Project, Description, and Generation Strategy. Note - In case the project needs to be transported the package should not be $TMP.
3. A new project is created. Right click on 'Data Model' and select the following hierarchy to generate an SPI service. Data Model → Redefine → SPI Service.
4. The Wizard to Redefine SPI service opens. Enter the details of the RFC destination from where the SPI content is fetched. Then select the Application Building Block ID using the value help. Let's select PLM_MAT that is application ID for PLM Material Management.
5. Click Next  to go to the second screen. The names of the Model Provider Class, Data Provider Class, Model Name, Version and Service Name and versions would be suggested by the wizard. Along with these the Description for the Model and the Service have to be entered.   
     
6. Click Next to go to the third screen.
7. In the third screen the generated model is redefined. You can select the entities that you want to.
So in this case let us select Entity Type BASIC_DATA and DESCRIPTIONS.
Scroll down and you can see the associations.
So let us select the association DESCRIPTIONSofBASIC_DATA which is related to the enity selected above.
8. Click    to complete the wizard.
The message “Project ‘XXX' has been checked; no errors were found” is displayed.

9. The next step is an optional step to Redefine Names and Labels.
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’.
Under service registration, the Technical Model Name would already be entered. There is an option to overwrite the extended service.

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

Final step is to register the generated service on SAP NetWeaver Gateway System.
For this, double click Service Maintenance node. You can see the list of Gateway HUB systems connected .
1. Select the HUB system(e.g. GW_HUB) where this service needs to be registered and click Register icon to register the service.
2. Click 'Yes' when the warning popup is displayed.

3. Provide the system alias(e.g. SPI_REMOTE) configured on Gateway System. Click enter to continue.

4. The Add Service screen opens. Enter the package as $TMP and enter to continue. In case the registered service needs to be transported any package other than $TMP has to be entered.


5. The registration status changes to a green node indicating the service is activated.
6. Click to maintain the service. A new screen opens to Activate and Maintain Services.
7. Click Call Browser to open the service document in the browser.
Here are the Service and Metadata URLs.

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.

AreaReference 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 NWAGlobal Batch Traceability (GBT)
HANA Application DevelopmentDemand Signal Management (DSM)
TIPGateway 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).

========================================================================================================================

13 Comments