Netweaver Gateway Development

OData Service importing RFC/BOR interface - Delete operation implementation

             We have created our OData service importing RFC/BOR interface.We have implemented GET_ENTITYSET, GET_ENTITY,CREATE_ENTITY,UPDATE_ENTITY methods also by mapping the fields from RFC.In this tutorial we will be implementing Delete operation of CRUD-Q operations.We will be mapping BAPI_EPM_SO_DELETE to Delete operation. For codebased implementation follow our DDIC tutorial series.
Pre-requisites
  1. ZRFC_ODATA service created by importing RFC/BOR interface.
  2. GET_ENTITYSET method(Query operation) implemented.
  3. GET_ENTITY method implemented.


Steps
  1. Go to SEGW and open ZRFC_ODATA project in edit mode.Expand Service Implementation node->expand SalesOrderHeaderSet->Right click on Delete->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_DELETE.Click continue.
  3. Delete operation is simple to implement.We just have to map primary key field SoId. Drag and drop SO_ID\SO_ID.Check the project and Generate the project.
  4. To test open gateway client (/IWFND/GW_CLIENT).Change http method to DELETE. Execute delete request with uri '/sap/opu/odata/sap/ZRFC_ODATA_SRV/SalesOrderHeaderSet('0500000020')' . 

If you enjoyed this post, Please Share!!

0 comments :

Post a Comment

Powered by Blogger.