cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP Node JS - how to extract filter parameters?

MinhTriLe
Explorer
0 Kudos

Hi,

For example, I have a CAP service request: /helloworld/Users?$filter=companyCode eq '123456'.

I have implemented a custom handler for Users entity - READ. 

I've been looking at Events and Requests | CAPire (cloud.sap) but I couldn't find any way to extract filter values. In this case, it is companyCode 123456

What is the correct way to extract filter values?

Regards,

Minh

View Entire Topic
Andrew_Mai
Participant

Usually, you will have to extract these kind of information from the req.query, for you case, it should be req.query.SELECT.where, then you can extract these information.

MinhTriLe
Explorer
0 Kudos
Hi Andrew_Mai, I'm able to get reg.query or req.query.SELECT.where. However, it's not in readable format. Do you know if SAP has any library to parse it into a readable format?