HOW to create a simple ODATA service using import DDIC structure method


Go to SEGW transaction and click on create project->




Enter the below details (Project and description) and save under local project or transport request











Now define the data model






Right click on data model and import from DDIC structure





Enter the name, select the entity type and ABAP structure and click on next button






Select the required fields from the structure and click on next button




If we select the Entity type, at least define 1 key field and click on Finish button
Here we have added KUNNR is the key field




See the Entity types and entity sets and service implementation.                                                                                                                                                                                    


Click on generate button




Go to Runtime Artifacts write click on DPC_EXT class and click on Go to ABAP Workbench button.



Redefine the CUSTOMERSET_GET_ENTITY method


Write the below logic in the method





Register the service using the below step by selecting the system and click on register button.








Test the service by click on SAP Gateway client button




Test results:


      





                                                  

3 comments: