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
Steps
Pre-requisites
- ZRFC_ODATA service created by importing RFC/BOR interface.
- GET_ENTITYSET method(Query operation) implemented.
- GET_ENTITY method implemented.
Steps
- 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.
- 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.
- 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.
- 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