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: 

Help with function SXPG_COMMAND_EXECUTE

Former Member
0 Kudos

Hello all,

I try to execute the UNIX command 'LS' via SXPG_COMMAND_EXECUTE and I use the parameter ADDITIONAL_PARAMETERS for the path: /usr/sap/import/

The function translates the path into upper case and therefor the LS command is not able to list the content of the directory.

Has anybody a solution for this problem.

Thany your for your help.

Markus

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

Hi,

use that variable:

DATA PARA LIKE SXPGCOLIST-PARAMETERS.

e.g.:

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

COMMANDNAME = 'ZLS'

ADDITIONAL_PARAMETERS = PARA

...

regards Andreas

3 REPLIES 3

Former Member
0 Kudos

Hello Markus,

Are you executing the function in SE37? If so, there is a tick at the top of the screen that says "Upper/lower case". Make sure you set it on.

If you are running this in an ABAP report, and you are entering the path via a parameter on the screen, make sure you use the additin LOWER CASE.

Hope this helps,

Martin

0 Kudos

thank you, I didn't see the checkbox at top of the screen

andreas_mann3
Active Contributor
0 Kudos

Hi,

use that variable:

DATA PARA LIKE SXPGCOLIST-PARAMETERS.

e.g.:

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

COMMANDNAME = 'ZLS'

ADDITIONAL_PARAMETERS = PARA

...

regards Andreas