SAP oData Service Part 1

Kaan Can Calkan
4 min readMay 2, 2023

--

After accessing the Gateway Service Builder using transaction code SEGW, create a new service by selecting the ‘Create’ option.”

We are saving it to a local object

After that, click on ‘Generate Runtime Objects’

After clicking on ‘Save’ or ‘Next’, save it to the local object.

The SAP Model Provider Class is a class used to manage SAP data models and data objects. This class provides methods for creating, updating, and deleting data models. Additionally, it provides methods for adding, reading, and deleting data from objects in the data model. The Data Provider Class is a class used to provide data for the SAP system. This class provides methods for reading and writing data to the SAP database. It also provides functions to control data access and ensure that data is processed correctly. The Data Provider Class is used by application components that interact with the SAP system.

It has been successfully created. If there is a red error message, it means an error has occurred

Afterwards, using transaction code /n/IWFND/MAINT_SERVICE, we access the screen where we can activate services and perform maintenance. Here, we click on the ‘Add Service’ button.

Here, we are normally supposed to select the server we would use as the System Alias. However, since I will be working on a demo system, I will select ‘Local’.” in Turkish

Then, we write the project name we provided with an asterisk at the end.

Afterwards, we click on the ‘Get Services’ button

After selecting the data in the checkbox, we click on the ‘Add Selected Services’ button to add the selected services

Here, we click on the ‘Local Object’ button and then on the ‘Finish’ button.” in Turkish

Our service has been successfully created

Afterwards, we go back to the previous screen and click on the ‘Filter’ button.” in Turkish.

We check whether the IFC Nodes section is highlighted in green. Then, we click on ‘SAP Gateway’

From here, we click on ‘Execute”

We have successfully created it. Here, if it had not been successful, we could have clicked on the ‘Error Log’ button to learn the content of the error

Then, we go back to the SEGW transaction code. We switch from Display Mode to Edit Mode

Then, we right-click on the ‘Entity Types’ section and select ‘Create’.

Afterwards, we double-click on the ‘Properties’ inside our Entity type.

Then we give names to our properties and define whether they are keys or not, their maximum length, their creatability, updatability, sortability, and whether they can be left empty. We also specify how they will appear, enter the ABAP field name and save.

Next, we right-click on the Entity Set and select “Create”. After giving a name to our Entity Set, we click on the “Search Help” button to link our Entity Set to the previously created Entity Type and select it by ticking the checkbox

After that, we click on the “generate” button. We need to press this button after every change we make related to the entity set.

As you can see, it was successfully added.

After finding our service with the /n/IWFND/MAINT_SERVICE transaction code, we click on the SAP Gateway button again.

Then we clicked the “Execute “ button

As you can see, our Entity Set has been successfully created.

İf we click “Entity Sets “ Button

We can see the EntitySets.

--

--

Kaan Can Calkan
Kaan Can Calkan

Written by Kaan Can Calkan

Former Web Developer , SAP HCM and Oracle Technical Consultant . Currently working as a SAP HCM Full Stack Dev .Sharing my learning path with you.

No responses yet