‎2010 Jun 09 9:09 AM
Hello everybody
I need some help with SXPG_CALL_SYSTEM.
I use it to in combination with unix commands TAR en GZIP.
Everything works when i'm logged in as an admin user.
The problem is that the commands don't do a thing when i'm logged in as a normal user.
The return code of the function is 0, so it means the command is executed. But it hasn't done anything.
But i would like to get the 'no permission' exception (or any other) to verify that the commands aren't executed.
Is there anyway to check if the user can execute this function.
Thx in advance.
Merijn.
‎2010 Jun 09 10:20 AM
The function module [SXPG_CALL_SYSTEM|http://help.sap.com/saphelp_nw70/helpdata/en/fa/0971ee543b11d1898e0000e8322d00/frameset.htm] should already execute an authorization check. When you mention a return code 0 I'm assuming that you are talking about SY-SUBRC in ABAP (not OS level) and that you are not doing something obvious like setting all exceptions to 0 (e.g. OTHERS = 0)...
There's function module [SXPG_COMMAND_CHECK|http://help.sap.com/saphelp_nw70/helpdata/en/fa/097208543b11d1898e0000e8322d00/frameset.htm], which can be used just for carrying out the authorization check.
I suspect your normal user doesn't have authorization for SM49, but I'd give this a try and see what happens. Also, you might want to check the system log (SM21) and the trace file dev_cp (ST11, depending on your patch level you might need to activate trace via setting the TRACE parameter) and see if that gives you anything useful. In addition you could of course also try an authorization trace (ST01).
That's pretty much all I can think of right now. Maybe somebody else has some better ideas or you have some further details after doing some more checks...
‎2010 Jun 09 10:38 AM
Thanks for the info.
But my question really is why the function executes, gives sy-subrc = 0, but didn't do a thing.
So the function seems to be executed perfectly, but nothing happened...