How to Register SAP OData Service /iwfnd/maint_service

by | Oct 20, 2019 | ODATA

Home » SAP » ABAP » ODATA » How to Register SAP OData Service /iwfnd/maint_service

Preface – This post is part of the SAP ABAP OData Tutorial series.

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:
FieldDescription
Technical Service NameThis is auto generated service name
Service VersionIt is auto generated service version
DescriptionIt is the Description of the OData you have mention earlier
External Service NameIt is same to the auto generated service name
NamespaceIt is by default bank
External Mapping IDIt is by default Empty
External Data Source TypeIt is by Default set to source type C
Technical Model NameIt is auto generated Model Name
Model VersionIt is auto generated Model Version
Package AssignmentAssign your package name here, or just choose Local Object from the button below. It will be then $TMP
ICF NodeIt is by default “Standard Mode”
oAuth EnablementIt 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.

Error Resolution

In case you get an error while testing. It might be due to the wrong configuration, or a few nodes are inactive.

To activate nodes, you need to visit T-Code SICF and search your service. Whatever result you will get, right-click on each and click “Activate”.

In case you are still getting the same error of Node Activation “Check the ICF nodes in Tx SICF: At least one node is inactive.”, that might be because your server doesn’t have HTTPS enabled. To configure that, you need to visit T-Code RZ10. Check these blogs for the same: Error Explanation, Error Resolution.

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

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

Author