SAP AT USER-COMMAND ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID DYNPRO%
• AT USER-COMMAND ABAP Statement

AT USER-COMMAND
Short Reference

ABAP_SYNTAX
AT USER-COMMAND.

What does it do?
This statement defines an event block whose event is raised by the ABAP runtime framework if, when a screen list is displayed, a function with a user-defined function code is chosen. The function code is available in the system field sy-ucomm when processing starts.
User-defined function codes are all those that include character combinations, except for the following:
The function codes PICK and PFnn (nn stands for 01 to 24) do not raise the event AT USER-COMMAND, and instead raise the events AT LINE-SELECTION and AT PFnn.
All function codes that start with the character % are interpreted as system functions and do not raise the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
The function codes in the following table 2, likewise, do not raise the event AT USER-COMMAND, but are handled by the list processor.
Table 1 Function CodeFunction %CTXCalls a context menu %EXExit %PCSave to file %PRISpool %SCSearch for ... %SC+Find next %SLSave in Office %STSave in report tree
Table 2 Function CodeFunction BACKBack P-Scroll to previous page P--Scroll to first page P+Scroll to next page P++Scroll to last page PFILE nameStores list lines in a text file named abap.lst in standard character format in the standard directory on the ABAP_ASINSTANCE host computer. If a name is entered using name, this is converted to lowercase letters and used as the file name. PL-Scroll to first line of the page PL-nScroll back n lines PL+Scroll to last line of the page PL+nScroll forward n lines PNOPNone PP-Scroll back one page PP-nScroll back n pages PP+Scroll forward one page PP+nScroll forward n pages PPnScroll to beginning of page n PRI, PRINTSpool PS--Scroll to first column PS++Scroll to last column PS-Scroll one column to the left PS-nScroll n columns to the left PS+Scroll one column to the right PS+nScroll n columns to the right PSnScroll to column n PZnScroll to line n RWCancel



Example ABAP Coding

The following section of an executable program works with a user-defined GUI status MYLIST. The function linked there with the function code MY_SELECTION raises the event AT USER-COMMAND when the list is displayed and creates details lists.
ABEXA 00048
ABAP_EXAMPLE_END

Return to menu