cancel
Showing results for 
Search instead for 
Did you mean: 

How to expose custom fields of Quality Notifications in SAP S4HANA Cloud public edition?

sdig89
Explorer
0 Kudos
211

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):

sdig89_1-1724864940729.png

On the other hand, CDS view "I_QUALITYINPROCUREMENTTP_2" allows to show the custom field as shown below: 

sdig89_0-1724864801669.png

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: 

sdig89_2-1724865008001.png

But no service binding can be generated: 

sdig89_3-1724865068481.png

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: 

sdig89_0-1724865784998.png

Thank you  

View Entire Topic
DennisLeslie
Product and Topic Expert
Product and Topic Expert

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