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: 

Autorisation check on s_dataset uses unexpected program name

Former Member
0 Kudos

Hi,

I made a custom global method to do file access using the open dataset statement. When this statement is executed an authorization check against s_dataset is executed.

I expected that the authorization check would use the calling program as the program name. In stead the name of the method/class is used.

Do any of you know a way around this?

thanx Robert

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Have you passed your program name using a parameter to the method , otherwise SY-REPID in the method would point to the class-pool program. Pass the value using a parameter and then use it in the AUTHORITY-CHECK statement instead of SY-REPID.

Cheers.

7 REPLIES 7

Former Member
0 Kudos

Have you passed your program name using a parameter to the method , otherwise SY-REPID in the method would point to the class-pool program. Pass the value using a parameter and then use it in the AUTHORITY-CHECK statement instead of SY-REPID.

Cheers.

Former Member
0 Kudos

Hi,

Have you tried user SY-CPROG : External procedure call

Maybe this will solve your problem.

ps : If it did help you, do not forget the reward

Former Member
0 Kudos

Hi,

you can use authority-check.

click below link it may help you.

http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/52/6712ac439b11d1896f0000e8322d00/frameset.htm

reward points for helpfull answer and close the thread if your question is solved.

regards,

venu.

Former Member
0 Kudos

Hi,

Thanks for your prompt answers. My problem is that the authorization check is implicit in the statement 'open dataset'. I can't give my own program name so i can't use a parameter or system value.

thanks Robert

0 Kudos

Hi Robert,

As this is done by SAP there is probably no way to change it...

I would suggest you to do the check and gives a nice error message if no right.

Sorry but I can't give you more informations

Former Member
0 Kudos

Ask basis to include this programname in the S_DATASET based authorization assigned to you and other relevant users.

cheers,

Former Member
0 Kudos

Thanks for all your replies. I will use a work-around using an extra authority check with the name of the calling program.