Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
vishnucta
Active Participant


Hi SAP mates,

Before start writing my first document i would like to thank bince.mathew2 and syambabu.allu for providing me such a higher insight to GWPA and CREATE_DEEP_ENTITY .

Please refer the link for a ground preparation.

Entity Types - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

Since we are going to create Model for the document posted by syambabu.allu.Please refer the below link before

getting your hands dirty.

http://scn.sap.com/community/gateway/blog/2014/04/27/step-by-step-development-guide-for-createdeepen...

STEP 1: Create a simple SAP UI5 Project

 

Right click on the Project Explore in the Eclipse IDE

New->Others   and Type UI5

Select Application Project from the Directory SAPUI5 Application Project



Click Next so that it would navigate to another view were we will enter the Project name



Clicking on Next it would ask us to give a view name



Click Finish which would eventually creates a sample UI5 Project.

STEP 2:Create a OData Model Project

Follow the same step us above for creating a OData Project.But instead type 'OData'



Clicking on Next which would ask us to enter a model name and for the instance we will select Blank OData Model



Click on Finish so that it will open in an OData Perspective

If you havent added a OData Perspective you can easily add the same from Menu Bar

Window->Open Perspective->Others->OData

 



If you are unable to find the OData Perspective that means Eclipse IDE doesnt have proper plugins installed.

You can check it from Install New Software Option



If every thing is up and running lets draw something :razz:

Below screenshot will show how an OData Perspective will look like.



STEP 3:Creating Entity Type

 

Drag and Drop an Entity Type From the Palette window of the Eclipse IDE.

 

 



After placing the Entity Type change the name of the EntityType to Header

Editing the name of the Entity Type can be done in Properties View in Eclipse IDE.



Likewise add other two entities to the Odata Workbench



STEP 4:Adding Properties to Entity Types

Before adding the properties to the out entities lets rename the key property.

Similar to above steps select the key property and rename it from the properties view of the OData Perspective.



Rename the Key Properties of other entities too.



Add additional properties by clicking on the highlighted button as shown in the screenshot.



Similarly add remaining properties to the entities.



STEP 5:Creating Association and Navigation

 

For this Data Model the Association is established between

 

1)Header and ItemO

2)Header and ItemT

 

So the Uni Directional Association should be established between above mentioned entities.


 

 

Click the Uni Directional Association button as highlighted in the below screenshot and connect it to the required entity.

 





Edit and rename the Navigation Properties that has been created by default.



Basic Design has been completed.So save the model and lets export the Model to a XML file so that we can import

to out Gateway Server.

STEP 6:Exporting an OData Model

Right Click on the Project Directory in the Project Explorer

Export->Export

Type OData Model to select export Destination.



Clicking the Next Button so that we can browse the model as shown in the below screenshot.



Provide a Export  Path were we will export the model in XML format.



Click Finish.Then you are done.

You can learn about importing the Model from my next Document From OData Modelling To Service Execution using GWPA:PART-2

Regards,

Vishnu

2 Comments
Labels in this area