08-27-2009 7:07 AM
Hi all,
I have a problem there are 2 fields in a selection screen and i want a certain thing done when i fill up the
first field and press tab and get to the 2nd field..is there any way i can capture the tab key event?
Thanks in advance.
Protyusha
08-27-2009 7:14 AM
Hi,
No. You cannot capture the tab key. You need to press ENTER or click a button to trigger any event.
Thanks,
Sri.
08-27-2009 7:42 AM
Hi ,
Try this way.
<li>Use AT SELECTION-SCREEN event.
Thanks
Venkat.OREPORT zdemo_sel_screen_with_tabstrip.
* SUBSCREEN 1
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1(10) TYPE c,
p2(10) TYPE c,
p3(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.
* SUBSCREEN 2
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: q1(10) TYPE c ,
q2(10) TYPE c ,
q3(10) TYPE c .
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 200.
* STANDARD SELECTION SCREEN
"Tabstrip
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) button1 USER-COMMAND push1, "By default this one
TAB (20) button2 USER-COMMAND push2,
END OF BLOCK mytab.
"INITIALIZATION
INITIALIZATION.
button1 = 'tab1'.
button2 = 'tab2'.
mytab-prog = sy-repid.
mytab-dynnr = 200.
mytab-activetab = 'PUSH2'. "Change to Tab 2
AT SELECTION-SCREEN.
IF sy-ucomm = 'PUSH1'..
ELSEIF sy-ucomm = 'PUSH2'.
ENDIF.
08-27-2009 10:07 AM
can we achieve the same by using 'get cursor' and doing the same job when the cursor gets to the 2nd field...
08-27-2009 10:23 AM
Hi,
you have to press enter or F8 or any other push button to get on at select-screen event to use get cursor statement...
Regards,
Siddarth