2024 Aug 28 6:17 PM - edited 2024 Aug 28 6:23 PM
Hello everyone,
Maye I ask if it is possible to expose a CDS projection view as an API?
My problem is that the Quality Notification API in SAP S4HANA Cloud Public Edition https://api.sap.com/api/CE_QUALITYNOTIFICATION_0001/overview / https://help.sap.com/docs/SAP_S4HANA_CLOUD/0629fd486efa4d339f8b10603b6f1e3f/454808498fc344a8a08b9125... does not allow extensibility.
Thus, custom fields added to the Quality Notification (business context: Quality Management: Quality Info Record in Procurement (QM_QUALITYINPROCUREMENT) can not be read by the Quality Notification API (and no config is there in the "custom fields" app to enable the custom field for the Quality notification API):
On the other hand, CDS view "I_QUALITYINPROCUREMENTTP_2" allows to show the custom field as shown below:
So I was thinking of creating a service definition and then an OData service binding for it, to be able to query the CDS view from a 3rd party system and from postman.
The service definition is being created correctly:
But no service binding can be generated:
Would this be possible? Someone can help suggest how to expose the custom fields of quality notification level with an API so that a 3rd party system can read the data?
By the way, EML coding allows to read the custom fields, but my problem is that we need to read the quality notification custom fields with an API (???) from CPI in a new iFlow that needs to be developed:
Thank you
Hi,
While the whole tutorial probably doesn't apply in this case, can you try to create a data definition with the provider contract as transactional_query and then try to use that in the service definition and binding. This should work.
Blog - https://developers.sap.com/tutorials/s4hc-abap-environment-create-custom-api.html
Regards,
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
8 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.