Quantcast
Channel: SCN : All Content - SAP NetWeaver Application Server
Viewing all articles
Browse latest Browse all 2997

Creating ODATA service

$
0
0

Creating Netweaver Gateway service for ODATA.

Create a project

Go to TCODE  : SEGW.


1.png

 

Click On “Create Project” Button

 

2.png

 

 

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


3.png


A new project will appear on the left hand side.

 

4.png

 

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

 

5.png

 

A Wizard will get open


6.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


7.png


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


8.png


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

Select all and click on Finish Button


9.png


A success message will appear.

 

10.png

 

Now click on “Create Runtime Object Button”

 

 

11.png

 

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


12.png


Give Package and TR details and Click Save Button.


13.png


Success Messages will appear.

 

14.png

 

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


15.png

 

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

 

16.png

 

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


17.png


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


18.png


A success pop up will appear.


19.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.

 

 

20.png

 

This open a new window : NetWeaver Gateway Client

 

21.png

 

 

 

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


22.png



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

 

23.png

 

 

You will XML file on HTTP Response side.


24.png


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


25.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.


26.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.

 

27.png

 

28.png

 

 

It will give the result in HTTP Response window.


29.png


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

 

30.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.


Viewing all articles
Browse latest Browse all 2997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>