Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

user-command

Former Member
0 Likes
482

can u help abt the usage of user-command in detail with examples ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
452

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

2 REPLIES 2
Read only

Former Member
0 Likes
453

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

Read only

Former Member
0 Likes
452

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.