cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS views to create an Extern API in SAP Public cloud to fetch details of change log for Sales order

Gahan_Narayan1
Explorer
0 Kudos
845

Hello Experts,

Currently we are trying to create an API which can fetch the change log for Sales order data, we have identified a CDS view i.e. 'c_saleschangedocitemdex' but The CDS is a consumption view and  not visible in custom CDS view data to select and hence we are not able to create an API with it, but it can be accessed using select queries in BADI. 

Gahan_Narayan_0-1735708920765.png

is there any alternative CDS view or any other method where we can create a API with GET call to pass the Sales order and fetch the change log of the fields.

Thank You in Advance.

SAP S/4HANA Cloud Public Edition Sales  API SAP S/4HANA Cloud Public Edition Research and Development 

Accepted Solutions (0)

Answers (2)

Answers (2)

HarikaBonz
Explorer
0 Kudos

Hello Narayan,

Can you please see if you can add the fields using Fiori custom fields logic by identifying the sales order header business context. Up on creation, you will have an option to check the related standard API's and CDS views given by SAP for the related business process. At least you can see the available data sources to consume. Hope this will help you.

FancyZou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

According to the documentation for C_SalesChangeDocItemDEX , the CDS View can be used as a Data Source for Data Extraction. If you are trying to extract the data to SAP Business Warehouse (BW), you may follow the guidance in Data Extraction for Change Document Item | SAP Help Portal to set up the integration. If you are integrating into a non-SAP system, you may try following the guidance in Accessing ABAP-Managed Data Using SQL Services for Data Integration Scenarios | SAP Help Portal for a custom integration of the scenario data extraction.

Best Regards,
Fancy

Gahan_Narayan1
Explorer
0 Kudos

Hello @ Fancy_Zou,

Thank you for your response. actually i have added some custom fields on the sales order header level and we are trying to use these in a BTP application we are creating an API from SAP public cloud with these sales order data but wanted to check when those particular fields were changes hence we are trying to capture the change log for those fields in the API and wanted to know how this can be achieved, if there is any CDS view that can be used in the custom CDS view to create an API or if there is any standard API that we can use to get the change log for the custom field sin sales order screen.

something similar to CDHDR and CDPOS tables in Public cloud would help my requirement.