on 11-24-2020 10:21 AM
Dear Experts,
I developed a Node.js CAP App without persistence which exposes some services that require to forward the requests to a S/4Hana Cloud custom service.
For this, I created a new Cloud SDK client with the VDM client generator and implemented custom handlers in the CAP app to forward the request to the VDM client. I also developed an app with some filters that consumes my CAP services, so the user can set the filters as needed.
My question is, is there any way to forward the OData filters and field selection to the VDM Client?
Thanks in advance,
Marc
Hello Marc,
I'm one of the developers of SAP Cloud SDK for Java. In case Gregor's advice is not working for you, I would ask you to provide some code snippets / describe concrete expectations in API to better communicate best-practices.
What is the OData version of your "S/4Hana Cloud custom service"?
Regards
Alexander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
I would suggest you check out my sample handler implementaiton in customer-material-service.js. There was no need to create a VDM Client. All filters and field selections are simply forwarded. One drawback unfortunately are the limitation when you use a Fiori Elements UI. The count functionality is lacking there.
Best regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gregor,
Thanks for your support! I saw your suggestion and I'm working on it. It solved my issues but I have some open questions that I will like to share with you. I will post them soon.
Regarding the limitation you mentioned with the Fiori Elements UI, is there any other limitation that the counting functionality? I solved it by adding the count in the handler and the UI is working fine.
...
const result = await extSrv.tx(req).run(query)
result.$count = result.length;
return result;
Best regards,
Marc
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.