How to Extend an SAP OData Service in Gateway?

 


How to Extend an SAP OData Service in Gateway was the main question asked by many of you in ODATA corporate training. Here we will learn How to identify and extend an SAP OData Service
Steps are as below: Go to Fiori App Reference library to standard fiori app and find the relevant odata for the same. Once we find the service in the configuration, check if the service is active or not What is the GW project for this service, add the standard project to our SEGW Check the Entity Types, Find the DDIC structure relevant for entity, open in SE11 (e.g. Expense) Append a new structure to the DDIC for custom fields (Z fields to be added) Right Click on data model - Redefine - GW OData Go to entity Type and right click - Properties - select properties to get them added Just refresh swgw in case you find field issue Generate - ZCL_ZPAOC_TRV_DPC_EXT, ZCL_ZPAOC_TRV_MPC_EXT and ZPAOC_TRV_SRV Checked the metadata for custom fields Go to Fiori App reference library again, in extensibility section, we will find the BADI SE18 and check BADI SE19 for implementing the BADI Create a new implementing class by copy from sample implementation Activate all the objects now Go to the custom class, and add the logic to return data of custom fields

https://youtu.be/r_RWIovtycs

Comments