Netweaver Gateway Development

OData Service importing RFC/BOR interface - GET_ENTITY implementation

           We have created OData service importing RFC/BOR interface.Then we have implemented GET_ENTITYSET method.Now in this tutorial we will implement single read operation which is GET_ENTITY method.Here we will pass a import parameter which is sales order id and get details of corresponding id in return.We will be mapping BAPI_EPM_SO_GET_DETAIL RFC for this.For codebased implementation follow our DDIC tutorial series.

  1. ZRFC_ODATA service created by importing RFC/BOR interface.
  2. GET_ENTITYSET method(Query operation) implemented.


  1. Go to SEGW and open ZRFC_ODATA project in edit mode.Expand Service Implementation node->expand SalesOrderHeaderSet->Right click on GetEntity(Read)->Click on Map to Data Source.
  2. Now on Map to Data Source popup window choose target Local.Then select type Remote Function Call give RFC name as BAPI_EPM_SO_GET_DETAIL.Click continue.
  3. In the mapping screen click Propose Mapping button.Now we have to create input mapping for all the key fields.SalesOrderHeader has only one key field SoId.Click on Append Row or Insert Row button.Select entity set property SoId by F4 help.Now drag and drop rfc input parameter SO_ID-SO_ID from right hand side.Or you can choose from F4 help.Mapping direction should be input.
  4. Check the project and Generate the project.Now for test open gateway client(/IWFND/GW_CLIENT).Enter uri as '/sap/opu/odata/sap/ZRFC_ODATA_SRV/SalesOrderHeaderSet('0500000005')' and execute.
 In the next tutorial we will be implementing Create operation of CRUD-Q operations.
If you enjoyed this post, Please Share!!


Post a Comment

Powered by Blogger.