How to Register SAP OData Service /iwfnd/maint_service

Introduction

Once we have created an OData in SEGW. The very next step is to register the OData. After registering only we can access the SAP OData service. By registering, we mean we open our service to the internet. We can Register the service in two ways:

  • From the transaction SEGW
  • From the transaction /n/IWFND/MAINT_SERVICE

Steps to Register an OData service using SEGW

Once the OData is generated, now it is the time to register the service. Once the service is registered, then only it can be used anywhere.

To generate an OData, follow the given steps:

  1. Double click the node Service Maintenance
  2. Select any System and click Register as shown below:
    OData Service Register
  3. Enter an Alias, if asked as shown below:
    OData System Alias
  4. Now, in the next screen you get following options:
Field Description
Technical Service Name This is auto generated service name
Service Version It is auto generated service version
Description It is the Description of the OData you have mention earlier
External Service Name It is same to the auto generated service name
Namespace It is by default bank
External Mapping ID It is by default Empty
External Data Source Type It is by Default set to source type C
Technical Model Name It is auto generated Model Name
Model Version It is auto generated Model Version
Package Assignment Assign your package name here, or just choose Local Object from the button below. It will be then $TMP
ICF Node It is by default “Standard Mode”
oAuth Enablement It provides option to add extra authentication, in case you need oAuth2 enablement choose it, else leave it blank

 

In our case, we just need to choose package and click confirm, as shown below:
OData Service Registration

Once the service is registered, the Registration will turn green, as shown below:
OData Service Status

Test the OData service

  1. To test the OData service, click the SAP Gateway Client button, as shown below:
    OData Test Service
  2. It will open a new screen, here click Add URI Option as shown below:
    OData Add URI Option
  3. Choose $metadata, here:
    OData $metadata
  4. Click Execute as shown below:
    OData Service Status 200

If the status is 200, as shown above, then it means your OData is working fine.

Steps to Register an OData service using /IWFND/MAINT_SERVICE

  1. Open the Service Maintenance Screen using the transaction /IWFND/MAINT_SERVICE. The given screen will open:
    Open the Service Maintenance Screen
  2. Click “Add Service” button. It will open “Add Selective Services” popup.
    Click “Add Service”
  3. Filter your service by entering it in the field “External Service Name” as shown below and click the search icon.
    Filter your service
  4. Now, the above search will return your OData Service name. Select your service and click Add Selected Service
    Select your service
  5. Now, assign your package name to the Service as shown below. In case, you don’t have package name, either click on “Local Object” or write $TMP in the package assignment. Then, save the above settings.
    Assign your package name to the Service
  6. Now, a pop up will open saying “Service <your service name> was created and its metadata was loaded successfully
  7. Now, go back to the transaction /iwfnd/maint_service and filter your service again. This time select your service and select SAP Gateway client
    select SAP Gateway client

The Filter will open this popup, enter your details here and click execute (the green button).

enter your details

Then, follow these steps:

follow these steps

  1. Here, test your service by following the steps given below:
    1. To test the OData service, click the SAP Gateway Client button, as shown below:
      OData Test Service
    2. It will open a new screen, here click Add URI Option as shown below:
      OData Add URI Option
    3. Choose $metadata, here:
      OData $metadata
    4. Click Execute as shown below:
      OData Service Status 200

If the status is 200, as shown above, then it means your OData is working fine.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.