首页 > SAP > ABAP > Single record read of a ODATA Service
2019
08-26

Single record read of a ODATA Service

In previous SAP Netweaver Gateway tutorials part1, part2, part3 and part4 we retrieved the list of Sales Orders. In this tutorial we are going to retrieve a particular Sales Order. We need to implement the method Get Entity (Read) of an OData service.

1. Go back to SEGW and choose the service name ZSL_EPM_DEMO.

2. Expand the service. Service Implementation → GetEntity(Read) → Right Click → Go to ABAP Workbench.

3. Find the method SALESORDERSET_GET_ENTITY in DPC (Data Provider Class) ZCL_ZSL_EPM_DEMO_EXT and click on Redefine to redefine the method.

4. Let’s have a look at the signature of the method.

IT_KEY_TAB – stores the all key values and its value of the request. In our entity type the key is “SoId” .

ER_ENTITY – this is the exporting structure in which we need to pass the sale-ale settingss order details.

5. Write the below code in the method SALESORDERSET_GET_ENTITY

6. Save and activate the method and then DPC extension class.
7. Go to SAP Netweaver Gateway Client /IWFND/GW_CLIENT to test the service. Enter the service name with sale-ale settingss order number like below and the Execute.

8. The result will look like below.

You have successfully implemented a Single Read in SAP Netweaver Gateway OData service.

Stay tuned to us for more SAP Netweaver Gateway tutorials.Please feel free to comment and let us know your feedback.

Thank you.

最后编辑:
作者:yangsen
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519