‎2007 Jul 06 6:42 AM
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.
‎2007 Jul 06 6:45 AM
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
‎2007 Jul 06 6:45 AM
‎2007 Jul 06 7:00 AM
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.
‎2007 Jul 06 7:07 AM
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
‎2007 Jul 06 7:59 AM
use at selection-screen , use 'case sscrfields and use when ' '.
‎2007 Jul 06 8:07 AM
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.