on 02-16-2006 2:00 PM
what this fm do.
and what is "commandname"--is he running batch file???
check the documentation of the FM in SE37...
********************************************************
FU SXPG_CALL_SYSTEM
____________________________________________________
Text
Execute an External Command
Functionality
SXPG_CALL_SYSTEM: Execute External Command (Express Method)
Using this function module, you can:
o Check a user's authorization to execute a command
o Execute the command
To determine the system on which the command should be executed, the
function module uses by default the current host system and the current
operating system type of the user.
As the function module is RFC-capable, you can use the RFC interface
(Remote Function Call Interface) to run the function module in a
different SAP application server. The external command is then
accordingly executed in the host system of the other SAP server.
SXPG_CALL_SYSTEM uses the following rules to determine which variant of
a command is used for the execution:
o If a command with the same operating system type as the one in the
sytem field SY-OPSYS exists, this definition is used for the
execution of the command.
o If the first check fails, the syntax group for SY-OPSYS is determined. A syntax group is an SAP construct that groups operating
systems that use the same syntax for commands and filenames. If a
command whose operating system type matches the determined syntax
group, this definition of the command is used.
o If no matching definition is found for the syntax group, the
function module searches for a definition with the operating system
type ANYOS (executable in all supported operating systems). This
definition is then used, if found.
o Otherwise, the exception COMMAND_NOT_FOUND is triggered.
se
Syntax:
CALL FUNCTION SXPG_CALL_SYSTEM
IMPORTING
COMMANDNAME = <SAP command name> DEFAULT '*'
ADDITIONAL_PARAMETERS = <Argument string> default <space>
EXPORTING
STATUS = <Exit status of command>
TABLES
EXEC_PROTOCOL = <Log> In structure BTCXPM. Can
contain STDOUT, STDERR
EXCEPTIONS
NO_PERMISSION Command rejected by User exit auth.
check
COMMAND_NOT_FOUND Command not defined in SAP database
PARAMETERS_TOO_LONG Complete parameter string exceeds
128 characters
SECURITY_RISK Security check failed
WRONG_CHECK_CALL_INTERFACE Problem with function
module for additional security
check
PROGRAM_START_ERROR Error while starting program
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.