From Netweaver 740SP06 on, it is possible to use native OData service to release an easy query. The steps are simpler than using Light Weight Consumption By Easy Query (See what features are supported for Easy Query here).
- Create a simple query in Query Designer (or Modeling Tool), switch on the flag 'By OData' for Light Weight Consumption setting. The OData service is generated automatically after saving the query. The naming convention for the generated service name is <query technical name>_SRV
In SE37 tcode Function Module RSEQ_NAT_READ_CATALOG can be used to list all available OData enabled query in your system.
- Go to transaction /n/IWFND/MAINT_SERVICE on the gateway system, click add service
- Search for the service generated for this query.
- Click the Technical Service Name to add it. The technical Service Name is default to Z<query name>_SRV. Attention: For transportation, please assign proper package instead of $TMP
After confirm a few popup boxes, the service is added successfully.
- Click 'Back (F3)' button to get back to the main screen of /IWFND/MAINT_SERVICE, now GL_ODATA1_SRV is available in the service catalog. You could set filter to the service name to find it more easily.
- Double click the service, you will see the ICF node is in green status. Now click 'SAP Gateway Client', you can consume this OData service to access the query information.
- By default, the service is called with parameter '?$format=xml', the full URI is: /sap/opu/odata/sap/<query name>_SRV/?$format=xml
Here we can see, with parameter 'GL_ODATA1Results' we can access the data in the query result.
- Run URI: /sap/opu/odata/sap/GL_ODATA1_SRV/<query name>Results to access the data
This is exactly what we see in query result in RSRT: