In this blog, I will try to cover how to register OData service, once we have created an OData service in SEGW. 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:
Double click the node Service
Maintenance
Select any System and
click Register as shown below:
Enter an Alias, if asked as
shown below:
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 |
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:
Once the service is registered, the Registration will turn
green, as shown below:
Test the OData service
To test the OData service, click
the SAP Gateway Client button, as shown below:
It will open a new screen, here
click Add URI Option as shown below:
Choose $metadata,
here:
Click Execute as
shown below:
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
Open the Service Maintenance
Screen using the transaction /IWFND/MAINT_SERVICE. The given
screen will open:
Click “Add Service” button. It
will open “Add Selective Services” popup.
Filter your service by entering
it in the field “External Service Name” as shown below and click the search
icon.
Now, the above search will
return your OData Service name. Select your service and click Add Selected
Service
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.
Now, a pop up will open saying
“Service <your service name> was created and its metadata was loaded
successfully
Now, go back to the transaction
/iwfnd/maint_service and filter your service again. This time select your service
and select SAP Gateway client
The Filter will open this popup, enter your details here and
click execute (the green button).
Then, follow these steps:
Here, test your service by
following the steps given below:
To test the OData service, click
the SAP Gateway Client button, as shown below:
It will open a new screen, here
click Add URI Option as shown below:
Choose $metadata,
here:
Click Execute as
shown below:
If the status is 200, as shown above, then it means your
OData is working fine. In the next blog, I will cover how to activate the OData services in SICF.
ConversionConversion EmoticonEmoticon