oData(Part3)- Query Operation

light

Query Operation with GET_ENTITYSET.

 

 

The post describes how to implement the data provider extension class for the Query operation. [ Check the link oData(Part2)- Read Operation  for the Read Operation]

The SCARR table entries.

2

Go to the data provider extension class- ZCL_ZSCARR_DEMO_DPC_EXT. Right click on it and choose Go to ABAP workbench.

12

Select change mode, select the method SCARRS_GET_ENTITYSET and select redefine button.

3

Depending upon different url parameters different import parameters are filled.

4

Now just put a select query and fill the ET_ENTITYSET table.

5

Activate and go back

6

From the Service Maintenance , select Maintain buttn.

7

Choose Call Browser.

8

The XML format is displayed.

9

Now lets get all the records by the URL:

https://server address/sap/opu/odata/sap/ZSCARR_DEMO_SRV/Scarrs

10

we can set the url that uses filter

https://server address/sap/opu/odata/sap/ZSCARR_DEMO_SRV/Scarrs?$filter=Carrid eq ‘LH’

For that lets change the method accordingly.

11

https://server address/sap/opu/odata/sap/ZSCARR_DEMO_SRV/Scarrs?$filter=Carrid eq ‘LH’

12

https://server address/sap/opu/odata/sap/ZSCARR_DEMO_SRV/Scarrs?$filter=(Carrid eq ‘LH’ or Carrid eq ‘AC’)

URL with multiple Carrid .

13


 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s