Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Activate AMDP Method - Authorization issue with Method

sap_cohort
Active Contributor
0 Kudos

Hi Team,

I'm working on a simple AMDP to insert records into a Column Table in my Personal Schema. It looks like the AMDP Method is properly coded, but for some reason, the editor is showing an Authorization Error on the Method. Bizzare to me.

The AMDP Method is a call to an existing Procedure or a direct update from a select to a Calc View.

I am able to successfully execute the Procedure and Statement in an SQL Console. Maybe it's an ABAP System User issue? I've looked at other AMDP with DML Statements and they don't seem to show any errors on the AMDP Methods. Are there any Heros out there that might have any ideas what direction to head into solving this issue?

Let me know if you need any other information to help out! Thanks! - Ken


1 ACCEPTED SOLUTION

IngoBraeuninger
Advisor
Advisor
0 Kudos

Hi Kenneth,

please check the SAP note 1899222 - ABAP Managed Database Procedures: Technical prerequisites and let me know the this solved your issue.

best regards,
Ingo

4 REPLIES 4

sap_cohort
Active Contributor
0 Kudos

OK. After some more research I'm thinking that it might be because _SYS_REPOs Object Privilege for Schema SAPABAP1 Grantor SYSTEM does not have CREATE ANY Privilege?

I noticed that under _SYS_REPO Object Privileges there are 2 entries for Schema SAPABAP1? One with Grantor SYSTEM and one with Grantor SAPABAP1. The one with Grantor SAPABAP1 has copious Privileges, but the one with Grantor SYSTEM only has Select

1. Why 2 Object Privileges with different Grantors for Schema SAPABAP1 and what does that mean? (Combined Authorizations?)

2. Should I just assign "CREATE ANY" to the Schema SAPABAP1 w/Grantor SYSTEM?

Thanks!

sap_cohort
Active Contributor
0 Kudos

Ok, Narrowed it down a bit so hoping someone can help.
As soon as I remove DML Insert Statement and DB Proc Call, the authorization error for the method goes away!
My Method Implementation is defined as follows:

method load_pvm by database procedure
for hdb
language sqlscript.

Can't an AMDP not defined with READ-ONLY be able to execute DML Statements like inserting records into a table?

Thanks!

IngoBraeuninger
Advisor
Advisor
0 Kudos

Hi Kenneth,

please check the SAP note 1899222 - ABAP Managed Database Procedures: Technical prerequisites and let me know the this solved your issue.

best regards,
Ingo

0 Kudos

Thank You for the feedback. We are on 7.5 so this Note would not be relevant I believe.

I should have mentioned this, but was thinking it was more of a authorization issue other than a Note issue.

Thanks again. I'll keep looking.