SET
Basic form
SET USER-COMMAND f.
Effect
Only valid with report list output:
Sets the contents of the field f as USER-COMMAND and
executes them immediately when the list is next displayed (i.e. the
system suppresses the list display und immediately processes the event
AT LINE-SELECTION ,
AT USER-COMMAND or, in the case
of a system function code (list of reserved function codes, see
AT USER-COMMAND ), this system
function).
The effect is exactly as if the user had entered the function in the
command field and pressed ENTER . This means that the
current positioning of the list
(SCROLL ) and the cursor
(SET CURSOR ) is taken into
account.
Note
You can specify SET USER-COMMAND several times in
the same event.
If you set several functions one after the other with
USER-COMMAND when creating a list, only the last one is
effective.
If the function key ENTER in the GUI status of the
relevant list itself contains a function code, this is executed rather
than that specified with SET USER-COMMAND .
Example
Process a line selection immediately:
-
WRITE: 'List'... "Create a list
SET CURSOR LINE 7.
-
SET USER-COMMAND 'PICK'.
The event AT LINE-SELECTION is processed immediately for list
line 7.
Example
Process a function immediately:
-
WRITE: 'List'... "Create a list
-
SET USER-COMMAND 'FUN'.
Processes the event AT USER-COMMAND immediately; the system
field SY-UCOMM contains the function code FUN .
Example
Leave list immediately:
-
WRITE: 'List'... "Create a list
-
SET USER-COMMAND 'BACK'.
The list is not displayed, but is left immediately.
Example
Create list with dialog box 'Find by...':
-
WRITE: 'List'... "Create a list
-
SET USER-COMMAND '%SC'.
The list is displayed with the dialog box 'Find by...'.
Index
© SAP AG 1996