cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I am trying to run SXPG_COMMAND_EXECUTE FM. but in one client it raises the exception "No Permission". and in the other client it raises "Command not found". Can you please guide me how do I rectify both of these exceptions.

Thank You,

SB.

0 Likes
View Entire Topic
Former Member
0 Likes

Are you using the FM in the following manner

data : w_name like SXPGCOLIST-NAME.

data : w_para like SXPGCOLIST-PARAMETERS.

data : it_result like BTCXPM occurs 0 with header line.

Where w_name is the command name and

w_para is the parameter in your case it should be the file name .

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'

EXPORTING

COMMANDNAME = w_name

ADDITIONAL_PARAMETERS = w_para

OPERATINGSYSTEM = sy-opsys

TABLES

EXEC_PROTOCOL = it_result

EXCEPTIONS

NO_PERMISSION = 1

COMMAND_NOT_FOUND = 2

PARAMETERS_TOO_LONG = 3

SECURITY_RISK = 4

WRONG_CHECK_CALL_INTERFACE = 5

PROGRAM_START_ERROR = 6

PROGRAM_TERMINATION_ERROR = 7

X_ERROR = 8

PARAMETER_EXPECTED = 9

TOO_MANY_PARAMETERS = 10

ILLEGAL_COMMAND = 11

WRONG_ASYNCHRONOUS_PARAMETERS = 12

CANT_ENQ_TBTCO_ENTRY = 13

JOBCOUNT_GENERATION_ERROR = 14

OTHERS = 15.