Model your first ODATA Service

7
24268

Hello everyone, in this blog post we will learn how to create OData service in SAP Netweaver Gateway System.

Below are steps to model OData service and this tutorial is one among the first sap netweaver gateway tutorials. To access all SAP Netweaver Gateway tutorials, please click here.

Step-by-Step Procedure

1. Go to transaction code SEGW(Gateway Service Builder).

1

2. Click on Create Project button. Provide the following details and click on OK.

2

3. Project will be created successfully with following artifacts

3

4. Right click on Data Model → Import → DDIC structure

1

Provide below information and click on Next

  • Name – SalesOrder
  • Select “Entity Type”
  • Give ABAP Structure as SNWD_SO
  • Check “Create Default Entity Set” , if you want to create Entity Set by default
1

5. Select the fields from the structure SNWD_SO to be the part of the ODATA service and Click on Next.

1

6. Choose SO_ID field as Key and click on Finish.

1

7. An Entity Type is successfully created. Go back and expand the Data Model you can find newly created Entity Set “Sales Order” and its properties.

1

8. Click on Generate to generate the Service

1

9. Click on OK

1

10. Service will be created successfully with below screen

1

Conclusion

Congrats, you have successfully modeled your OData service in Gateway service builder. In our next tutorial, we will perform service implementation, write the ABAP code to get the data from the database tables.

Please stay tuned to us for more SAP Netweaver Gateway/OData tutorials.Please feel free to comment and let us know your feedback. You feedback will keep us alive.

Comments are closed.