SXPG_COMMAND_DEFINITION_GET: Read Single External Command

Use

Use this function module to read the definition of a particular external command into an internal table.

You must set the COMMANDNAME and OPERATINGSYSTEM parameters to the appropriate values before you call the function module.

CALL FUNCTION 'SXPG_COMMAND_DEFINITION_GET'
IMPORTING 
COMMANDNAME = <Name of command in the SAP-System> 
OPERATINGSYSTEM = <Target OS as defined in SAP System 
TARGETSYSTEM = <Host system for running command>
" Default '*' 
EXPORTING 
COMMAND = <Command definition> " Structure 
" SXPGCOLIST 
EXCEPTIONS 
COMMAND_NOT_FOUND " Command not defined in SAP database
OTHERS.

         

Parameter

IMPORTING Parameter

Parameter Name

Use

COMMANDNAME

The name of the definition of the external command, as specified in the maintenance function (Transaction SM69).

Must be set before you call the function module.

OPERATINGSYSTEM

The type of operating system upon which a command is to be carried out.

Must be set before you call the function module.

TARGETSYSTEM

Host name of the system upon which the selected command is to be carried out.

Optional:

Use to have the system check on the user's authorization to run commands on the target system. If the user is authorized, then COMMAND_LIST-PERMISSION is set to X. Otherwise, the field is set to space ' '.

EXPORTING Parameter

Parameter Name

Use

COMMAND

Contains the definition of the selected command in the format shown in transaction SM49 or SM69. The user can have the command run, if you pass the user's selection on to SXPG_COMMAND_EXECUTE.

If no command is found, then the exception COMMAND_NOT_FOUND is triggered.