cancel
Showing results for 
Search instead for 
Did you mean: 

Error in accessing cds view data using select query in Developer Extensibility in Cloud

Shadab_Hussain
Explorer
0 Kudos
1,714

Hi Experts,

I am trying to access customer additional group data using sap released cds view I_CustomerSalesArea. I have written a select query to fetch the data from cds view. When I try to execute the badi via the business process its giving short dump.

Code:

SELECT SINGLE additionalcustomergroup1

FROM i_customersalesarea

WHERE customer = @item_attributes-soldtoparty

AND salesorganization = @item_attributes-salesorganization

AND distributionchannel = @item_attributes-distributionchannel

AND division = @item_attributes-division

INTO @DATA(lv_cust_group).

Also, in ADT there is a warning - Executing "Unprivileged SQL" from "CHANGE_CONDITION_AMOUNT" violates transactional contract "FUNCTIONAL".

Error in short dump - Execution takes place in a transactional context: A "CALL <functional>" call is active with "ZCL_PRCG_DOC_ITEM_CONDITION_AM". The current statement "AUTHORITY-CHECK(DCL)" is therefore forbidden.

Can someone guide in getting this resolved?

Appreciate your help !

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

PrasanthPadmanabhan
Product and Topic Expert
Product and Topic Expert

Hi Shadab,

Could you add the keyword 'WITH PRIVILEGED ACCESS' and try this? You can find more details here

Best Regards,

Prasanth

Shadab_Hussain
Explorer
0 Kudos

Thanks Prasanth, this has solved the issue. Will you mind adding the link to your comment for other members to refer.

Sincerely, Shadab

Answers (0)