Application Development 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: 

pressing of Tab key...

Former Member
0 Kudos

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

4 REPLIES 4

sridhar_meesala
Active Contributor
0 Kudos

Hi,

No. You cannot capture the tab key. You need to press ENTER or click a button to trigger any event.

Thanks,

Sri.

venkat_o
Active Contributor
0 Kudos

Hi , Try this way. <li>Use AT SELECTION-SCREEN event.

REPORT 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.
Thanks Venkat.O

Former Member
0 Kudos

can we achieve the same by using 'get cursor' and doing the same job when the cursor gets to the 2nd field...

0 Kudos

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