Skip to Content
0
May 10, 2013 at 03:57 AM

Problem on 'SXPG_CALL_SYSTEM' function

189 Views

Hi,All

get a problem on 'SXPG_CALL_SYSTEM' function

the function could move file successfully if it ran online.

But it failed to move file if we submitted it running in background.

coding:

concatenate i_path lt_file-name into g_fromName.

* < 1 >* Call LHA Command

* create system command

CMND = 'ZMOVE'. "<-- system command name. Refer "SM69"

********************************************************

* Configuration *

* operating system command : "cmd" *

* parameters for operating system command : "/c move" *

********************************************************

* MOVE need parameter "<source file> _ <target file>"

move g_fromName TO OUT_FILE.

move p_path to in_file.

CONCATENATE OUT_FILE IN_FILE INTO PARM SEPARATED BY SPACE.

*call system command

CLEAR RTN_CH.

CALL FUNCTION 'SXPG_CALL_SYSTEM'

EXPORTING

COMMANDNAME = CMND

ADDITIONAL_PARAMETERS = PARM

* IMPORTING

* STATUS = RTN_CH

TABLES

EXEC_PROTOCOL = OUT_DATA

EXCEPTIONS

NO_PERMISSION = 01

COMMAND_NOT_FOUND = 02

PARAMETERS_TOO_LONG = 03

SECURITY_RISK = 04

WRONG_CHECK_CALL_INTERFACE = 05

PROGRAM_START_ERROR = 06

PROGRAM_TERMINATION_ERROR = 07

X_ERROR = 08

PARAMETER_EXPECTED = 09

TOO_MANY_PARAMETERS = 10

ILLEGAL_COMMAND = 11.