‎2005 Sep 15 8:44 AM
i have 4 pushbuttons in the screen how would i know which one i click?
thanks.
donna
‎2005 Sep 15 8:49 AM
Field SY-UCOMM ( Or Ok_CODE defined in screen ) will have the value of fcode assigned to the pushbutton in the PAI of screen
Cheers
‎2005 Sep 15 8:46 AM
in pustbutton u can set user command.
based on the user command u hv to identify the button clicked
SELECTION-SCREEN PUSHBUTTON /10(20) CHARLX USER-COMMAND ABCD.
SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND BCDE. ...
INITIALIZATION.
MOVE 'My text1' TO CHARLX.
MOVE 'My text2' TO CHARLY.
...
AT SELECTION-SCREEN.
case SSCRFIELDS-UCOMM.
when 'ABCD'.
...
when 'BCDE'.
...
ENDIF.
regards
gv
Message was edited by: Venkat
‎2005 Sep 15 8:47 AM
‎2005 Sep 15 8:49 AM
Field SY-UCOMM ( Or Ok_CODE defined in screen ) will have the value of fcode assigned to the pushbutton in the PAI of screen
Cheers
‎2005 Sep 15 8:51 AM
go thru this demo pgm
DEMO_SEL_SCREEN_PUSHBUTTON
DEMO_DYNPRO_PUSH_BUTTON
regards
gv
‎2005 Sep 15 8:51 AM
Hi Donna,
look sample-program <b>DEMO_SEL_SCREEN_PUSHBUTTON</b>
-> Venkat was some seconds faster !
regards Andreas
‎2005 Sep 15 8:56 AM
If you set, let's say 'PB01' as a User-command for your button, you can handle a click with a code like the following:
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'PB01'.
*____Do some stuff here...
ENDCASE.In the latest versions, you have also the special statement :
SELECTION-SCREEN FUNCTION KEY 1.to create a 'function key'. A click on the auto-generated button on the tool bar will then trigger the user-command FC01