Skip to Content
Author's profile photo Neminath Havale

Creating ODATA service

Creating Netweaver Gateway service for ODATA.

Create a project

Go to TCODE  : SEGW.


/wp-content/uploads/2014/06/1_487041.png

Click On “Create Project” Button

/wp-content/uploads/2014/06/2_487042.png

A pop up will appear. Input all data as required, and click Continue.


/wp-content/uploads/2014/06/3_487151.png


A new project will appear on the left hand side.

/wp-content/uploads/2014/06/4_487153.png

Now Right click on “Data Model” folder and select “Redefine” – > “BW Query Service”

/wp-content/uploads/2014/06/5_487154.png

A Wizard will get open


/wp-content/uploads/2014/06/6_487156.png


Input as bellow:

Access type             : Controller for MDX

                             : This is by default MDX if  you don’t have Easy Query on architecture 

RFC Destination       : BWDCLNT100

                             : This is the system from where we are fetching query

Catalog Name                   : ZOD_MKTG

                             : This will be provided by BW resource

Query Name            : ZOD_MKTG/ZQRY_ZMP_MKTG_Q01                           

: This will be provided by BW resource

Input all this data and click on Next button


/wp-content/uploads/2014/06/7_487158.png


On Next screen, put the description for the Model and Service, and Click on Next Button


/wp-content/uploads/2014/06/8_487163.png


On 3rd Step, we get all the entity set.

Select all and click on Finish Button


/wp-content/uploads/2014/06/9_487164.png


A success message will appear.

/wp-content/uploads/2014/06/10_487169.png

Now click on “Create Runtime Object Button”

/wp-content/uploads/2014/06/11_487171.png

A popup will appear, Select the “Overwrite Extended Service” check box, and click Continue.


/wp-content/uploads/2014/06/12_487178.png


Give Package and TR details and Click Save Button.


/wp-content/uploads/2014/06/13_487179.png


Success Messages will appear.

/wp-content/uploads/2014/06/14_487181.png

Now, activate the services. To do so, go to Tcode : /IWFND/MAINT_SERVICE


/wp-content/uploads/2014/06/15_487182.png

Click on “Add Service” Button on application bar. Here put the client name(BWD100) and click on “Get Services” Button

/wp-content/uploads/2014/06/16_487184.png

It will list the all services created. Select the service that we have create and click on the “Add Selected Service” Button.


/wp-content/uploads/2014/06/17_487202.png


A popup will appear, put package name and click on Continue button.


/wp-content/uploads/2014/06/18_487205.png


A success pop up will appear.


/wp-content/uploads/2014/06/19_487206.png



Click Continue on success message popup and then click back button on Add selected service window. You will come to initial “Activate and Maintain service” screen.

Here scroll to your service and double click on service name.
Then click on the “Gateway Client” Button.

/wp-content/uploads/2014/06/20_487207.png

This open a new window : NetWeaver Gateway Client

/wp-content/uploads/2014/06/21_487214.png

Click on “Add URI button”. A popup window will appear. Select “$Metadata”.


/wp-content/uploads/2014/06/22_487215.png



Now Request URI have $metadata at end. Now Click on Execute Button.

/wp-content/uploads/2014/06/23_487216.png

You will XML file on HTTP Response side.


/wp-content/uploads/2014/06/24_487217.png


Scroll to the Bottom of the XML file to atom link segment.


/wp-content/uploads/2014/06/25_487218.png


Here you can find the HTTP link for meta data. Copy this link; we need to send this to .Net team

http://XXXXXX.XXXXXXX.XXXXX.com:8010/sap/opu/odata/sap/YTEST_ZOD_MKTG_TESTPRJ_3_SRV/$metadata

Now find the “Entity Container Name” segment, and find the Entity set name with label as our query description.


/wp-content/uploads/2014/06/26_487219.png



Copy the Entity set name, here, “ZOD_MKTG_ZQRY_ZMP_MKTG_Q01Results”.

Paste this at the end of Request URI by removing “$metadata”, and then execute.

/wp-content/uploads/2014/06/27_487220.png

/wp-content/uploads/2014/06/28_487221.png

It will give the result in HTTP Response window.


/wp-content/uploads/2014/06/29_487222.png


From here copy the Hppt link appear in <ID> segment

/wp-content/uploads/2014/06/30_487223.png

For Exp.

http://XXXXXXXXX.XXXXXX.XX.com:8010/sap/opu/odata/sap/YTEST_ZOD_MKTG_TESTPRJ_3_SRV/ZOD_MKTG_ZQRY_ZMP_MKTG_Q01Results

This is our result link.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.