on ‎2024 May 08 3:37 PM
Hi,
We've identified the following OData for our use case. We are on S/4HANA 2022 FPS 02.
Billing Document - Read, Cancel, GetPDF
However, this does not fetch the SD Pricing Data for a given billing document although it is documented in the API reference.
On further analysis, we found that the Pricing Elements CDS view that this OData uses does not display any data. The base view I_PricingElement that gets its data from prcd_elements has an access control that is designed to never return any data
@EndUserText.label: 'Auto assigned mapping role for I_PricingElement'
@MappingRole: true
define role I_PricingElement {
grant
select
on
I_PricingElement
where
PricingDocument is null and PricingDocument is not null;
}This is a whitelisted, documented API on the API hub that does not work as expected. Am I missing something?
Regards,
Saurabh
Request clarification before answering.
The reason is that the access control of I_PricingElement cds is set to @AccessControl.authorizationCheck: #PRIVILEGED_ONLY In order to access the data, you can use 'with privileged access' keyword in your SQL command like I did below INNER JOIN I_PricingElement WITH PRIVILEGED ACCESS. This is how I solved it right now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 39 | |
| 22 | |
| 20 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.