SXPG_COMMAND_LIST_GET: Read a List of External Commands
Use this function module to read a list of the external commands that have been defined in your R/3 System into an internal table. You can then loop over the table to select a command, or offer the list to your user for selection. You can then pass the selection on to SXPG_COMMAND_EXECUTE for an authorization check and execution of the command.
Syntax:
CALL FUNCTION ‘SXPG_COMMAND_LIST_GET’
Parameters
IMPORTING Parameters
Parameter name |
Use |
COMMANDNAME |
The name of the definition of the external command, as specified in the maintenance function (transaction SM69). Generic searching: You can use the * wild-card character to represent any number of occurrences of any character. You can use * anywhere in the value. |
OPERATINGSYSTEM |
The type of operating system upon which a command is to be carried out. Use to restrict the commands that are selected to the operating system of interest. "ANYOS" selects R/3 standard commands that can run be run as they are defined on any operating system. Generic searching: You can use the * wild-card character to represent any number of occurrences of any character. You can use * anywhere in the value. |
TARGETSYSTEM |
Host name of the system upon which the selected command is to be carried out. Optional: Use this parameter to have the system check the user’s authorization to run commands in the target system. If the user is authorized, then COMMAND_LIST-PERMISSION is set to ‘X’. Otherwise, the field is set to space ‘ ‘ . |
TABLES Parameters
Parameter name |
Use |
COMMAND_LIST |
Contains a list of the selected commands in the format shown in transaction SM49 or SM69. The user can select a command from the list to run, if you pass the user’s selection on to SXPG_COMMAND_EXECUTE. The table is empty if no command is found that meets the selection criteria. No exception is raised in this case. Notes on fields:
|