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

about at user-command

Former Member
0 Likes
732

im writtng a code in which i want to perform a woar on click of my push button. for this im using event at user-command.

but the event is not triggered.

selection-screen: begin of block b3 with frame title text-tit.

selection-screen: begin of line.

selection-screen PUSHBUTTON 20(20) text-033

USER-COMMAND ABCD MODIF ID SG.

selection-screen: end of line.

selection-screen: end of block b3.

at user-command.

if SSCRFIELDS-UCOMM = 'abcd'.

perform information_about.

endif.

6 REPLIES 6
Read only

Former Member
0 Likes
695

Hi madhavi,

This AT USER-COMMAND is not for the command on the selection screen,. it is for the user command on the output list.

if you want to do something based on selection screen use the AT SELECTION SCREEN.... events.

Regards,

Atish

Read only

Former Member
0 Likes
695

endif.

Read only

0 Likes
695

try this one...

use at selection-screen command instead of at user-command.

selection-screen: begin of block b3 with frame title text-tit.

selection-screen: begin of line.

selection-screen PUSHBUTTON 20(20) text-033

USER-COMMAND ABCD MODIF ID SG.

selection-screen: end of line.

selection-screen: end of block b3.

at SELECTION-SCREEN.

if Sy-UCOMM = 'ABCD'.

message E100(ZAB).

endif.

Read only

Former Member
0 Likes
695

Hi Madhvi,

Check this code.

SELECTION-SCREEN PUSHBUTTON 20(20) text-t03 USER-COMMAND abcd.

AT SELECTION-SCREEN.

IF sy-ucomm = 'ABCD'.

PERFORM information_about.

ENDIF.

&----


*& Form information_about

&----


  • To display messsage

----


FORM information_about .

MESSAGE 'You have clicked' TYPE 'I'.

ENDFORM.

Regards,

Niyaz

Read only

Former Member
0 Likes
695

use at selection-screen , use 'case sscrfields and use when ' '.

Read only

0 Likes
695

hi -

it must be this way !!

AT SELECTION-SCREEN.

*- Process Pushbuttons

perform process_pushbutton.

FORM process_pushbutton.

case sy-ucomm.

when '< the user-command name> '.

perform <what ever u want to do > .

endcase.