‎2007 Sep 13 5:44 PM
can u help abt the usage of user-command in detail with examples ?
‎2007 Sep 13 5:46 PM
Hi,
Check the link below. It gives you detailed description.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
REPORT demo_list_menu_painter.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
WRITE: 'Basic list, SY-LSIND =', sy-lsind.
AT LINE-SELECTION.
WRITE: 'LINE-SELECTION, SY-LSIND =', sy-lsind.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'TEST'.
WRITE: 'TEST, SY-LSIND =', sy-lsind.
ENDCASE.
This program uses a status TEST, defined in the Menu Painter.
Function key F5 has the function code TEST and the text Test for demo.
Function code TEST is entered in the List menu.
The function codes PICK and TEST are assigned to pushbuttons.
Cheers
VJ
Message was edited by:
Vijayendra Rao
‎2007 Sep 13 5:46 PM
Hi,
Check the link below. It gives you detailed description.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
REPORT demo_list_menu_painter.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
WRITE: 'Basic list, SY-LSIND =', sy-lsind.
AT LINE-SELECTION.
WRITE: 'LINE-SELECTION, SY-LSIND =', sy-lsind.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'TEST'.
WRITE: 'TEST, SY-LSIND =', sy-lsind.
ENDCASE.
This program uses a status TEST, defined in the Menu Painter.
Function key F5 has the function code TEST and the text Test for demo.
Function code TEST is entered in the List menu.
The function codes PICK and TEST are assigned to pushbuttons.
Cheers
VJ
Message was edited by:
Vijayendra Rao
‎2007 Sep 13 5:50 PM
user command is used when there is any event that must be triggred when a user does some action on it.
for example a push button the tool bar. double click on a particular list etc.
AT USER-COMMAND
case sy-ucomm.
when ' fct1'
xxxxxxxx
when 'fct2'
yyyyyyyyy
endcase.