S4 HANA Error: The use of this object is not permitted
We faced this peculiar error while implementing a BADI and had to spend some time to figure out the root cause, hence thought of writing this short blog so that others do not have to struggle when they face a similar issue.
We implemented the BADI “MMPUR_WORKFLOW_AGENTS_V2” in S4 HANA for one of the business requirement and when we tried writing a Select query on any table inside the method “IF_MMPUR_WORKFLOW_AGENTS_V2~GET_APPROVERS” or tried using any custom CDS view inside this BADI we were getting below error:
The method was only allowing us to use some standard CDS views like i_purchaseorderitemapi01.
Here is your quick solution:
Go to BADI implementation class and check what is set for ‘ABAP Language Version’, if it is set to ‘ABAP for Key Users’ then this is causing the issue, change it to ‘Standard ABAP(Unicode)’ and then you should be able to write Select statements inside this method.