cancel
Showing results for 
Search instead for 
Did you mean: 

Manage Prices Sales (F4111) - Access the data externally

EgbertVenema
Explorer
217

The app does make pricing pretty easy, although accessing the data outside of the app seems impossible. Has anyone out there been able to fit all the pieces together?

We are currently implementing S/4HANA Public Edition at one of our customers, of which the 'Manage Prices' app is a part as well. That provides us functionality to set prices and import/export using Excel sheets.

F4111.png
Without access to the actual data tables (the classic Axxx tables), we have to use CDS views and public APIs to make our data available to any external parties. Which is fine, as long as those entry points exist. In this case however, they don't. The data list from the app itself would be great, but even that is unaccessible. You can understand we do no want any manual activity (like exporting an Excel sheet) whenever prices are updated.

In most documentation SAP mentions the API_SLSPRICINGCONDITIONRECORD_SRV service, but that only provides the bare condition records, no link with the products or other data from the app. That does not help us here.

Internally for the app, SAP makes use of SD_PRICING_CONDITIONRECORD_SRV, which in turn calls on C_SLSPRICINGCONDITIONRECORDTP, a local Business Object Interface which retrieves the right data. Problem is, we're not allowed to use those ourselves. At least not to expose the data to the outside world.

There is a service for Sales Price Integration (SAP_COM_0702), but that provides prices per customer. We simply require all prices, as listed in the app, filtered by ConditionType, as an OData service.

So far I haven't been able to find any way to provide access to the data. Please tell me I'm missing something small and it's not one of those "please create a feature request" cases.

Accepted Solutions (0)

Answers (1)

Answers (1)

DequanXu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

The API is not yet available to retrieve all data in the Manage Prices - Sales app. You either need to create custom OData services or create a feature request.

Best regards,

Dequan Xu

EgbertVenema
Explorer
0 Kudos

@DequanXu Thanks for the quick reply! When you say 'not yet available', does that mean it is planned? And if so, what release would be feasible?

Creating a custom OData service would be great, but the CDS views that are required to access that data are not released for that use. We are not allowed to access the services SAP makes use of internally, same goes for the underlying CDS views. Otherwise, that custom OData would be the obvious option.

Example: API_SLSPRICINGCONDITIONRECORD_SRV contains most of the fields, so would be a good starting point. We can call the service using Postman, which yields data. One of the CDS views that are used as a basis is I_SlsPrcgCndnRecdValidity. However, we are not allowed to preview its data in Eclipse, are not allowed to create an extension, we are not even allowed to use ANY of its fields in another CDS view. There are A_, P_ and R_ variants of this view, neither of which allow us to do anything.

Referencing the CDS view itself:
"The use of CDS Entitity I_SlsPrcgCndnRecdValidity is not permitted."
Using an element in another CDS view:
"The use of element ConditionRecord of CDS Entity I_SlsPrcgCndnRecdValidity is not permitted."
Extending with association:
"The use of element Material of CDS Entity I_SlsPrcgCndnRecdValidity is not permitted." 

A completely different approach would be to create an Application Job, which extracts the data using the local interface (if allowed), store that in a custom table... which we can then release to create an OData service. Not real-time, not nice, but potentially the option we have.

EgbertVenema
Explorer
0 Kudos

The public API is able to retrieve the data, the local API is not. Check with Postman reveals that the data is there, and the match between condition record and material can be made via the _Validity association. Looking into the local API, using the I_SLSPRCGCONDITIONRECORDTP_2 object, that association returns nothing.

There is a customer influence request to make the CDS belonging to this app available for us all:
CDS view for Manage Prices app 

So just in case you come by this issue and want to help, go there and give it your vote as well. For now, there's only one thing we can do. Call the products API, filter products, call another API per product and retrieve the prices. It's incredibly inefficient, but it's all we've got.