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: 

ABAP File renaming from *txt to *sik

Former Member
0 Kudos

Hi All

Please help me in finding root cause of below issue.

I am downloading the file on Application server,

as per the user requirement I want to download the file as .sik

as ext in the Application server

I have create command ZMV in unix and passing command to function module SXPG_CALL_SYSTEM

In production we are getting runtime error as MESSAGE_TYPE_UNKNOWN

In which sy-subrc =1 which means no permission.

For particular user I ma facing the issue in production.

we have tried solutions such as giving folder access rights to the file but still it is not working.

5 REPLIES 5

andreas_mann3
Active Contributor
0 Kudos

in dev-system you can try:

data: begin of tabl occurs 0,

line(500),

end of tabl,

command type sting.

command = 'rm /home/.txt' /home.sik'

call 'SYSTEM' id 'COMMAND' field command

id 'TAB' field tabl-sys.

A.

0 Kudos

Hi,

I dont understand why some users are able to create file while doing sap transaction while others get dump.

Thanks

0 Kudos

Hello,

Here are some ideas:

- This may be obvious, but the operating system will check authorization of the generic SAP user (your admin should know and tell you more about it), not the specific SAP user executing the command.

So the problem should not be from one user or the other.

- A question: Do they write the path and file name? The error could come from here.

- in your example you use the 'rm' command. What happens if the user executes a second time and there is no file to remove?

cheers.

Edited by: Phillip Morgan on Feb 13, 2012 5:32 PM

0 Kudos

call 'SYSTEM' id 'COMMAND' field command

id 'TAB' field tabl-sys.

Could be that the user is not having the authorisation to run the above command.I think it is related to

Authorisation Object S_C_FUNCT.

If I am not wrong the user need to have this set in his user profile.Basis guy can help you with more details if you can provide him the DISPALY AUHTORISATON FOR USER XXXX screenshot.

Thanks,

K.Kiran.

0 Kudos

Hi Anup,

rm will delete the file.

Check documention[for SXPG_CALL_SYSTEM: Run an External Command (Express Method)|http://help.sap.com/saphelp_45b/helpdata/en/fa/0971ee543b11d1898e0000e8322d00/content.htm] .

TABLES
  EXEC_PROTOCOL = <Log> " In structure BTCXPM. Can
" contain STDOUT, STDERR

may give you more detailed information.

Regards

Clemens