10-11-2005 10:13 AM
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
10-11-2005 10:17 AM
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.
10-11-2005 10:17 AM
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.
10-11-2005 10:22 AM
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
10-11-2005 10:24 AM
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.
10-11-2005 10:31 AM
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
10-11-2005 10:35 AM
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
10-11-2005 10:59 AM
Ask basis to include this programname in the S_DATASET based authorization assigned to you and other relevant users.
cheers,
10-12-2005 4:26 PM
Thanks for all your replies. I will use a work-around using an extra authority check with the name of the calling program.