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: 

doubling on the table control field it should call the other screen......

Former Member
0 Kudos

Hi all,

I 've a requirement like on doublie clicking on the table control field it should go to the next screen which contains other table control.

How to perform this functionality? can any one can help me in solving this issue ...

thanks in advance.

1 ACCEPTED SOLUTION

prasanth_kasturi
Active Contributor
0 Kudos

hi,

i never tried it but i have an idea.

when you double click fct code 'PICK' will be triggered

so in pai of table control in case sy-ucomm write

when 'PICK'.

call screen '<scrno>' .

regards

prasanth

5 REPLIES 5

Former Member
0 Kudos

Hi,

when u double click on the table control records,

the index of that record will be stored in the pick.

So,

In the PAI event of ur flow logic under the case SY-UCOMM

write the code when '&IC1'.

call screen <scrno>.

example.....

MODULE user_command_9000 INPUT.

CASE ok_code.

WHEN 'DBLCLICK'.

GET CURSOR FIELD ws_field LINE ws_line.

IF ws_field EQ 'WA_SCARR-CARRID'.

READ TABLE it_scarr INDEX ws_line INTO wa_scarr1.

CALL SCREEN 9001.

ENDIF.

ENDCASE.

ENDMODULE.

Reward if Helpful

Jagadish

Former Member
0 Kudos

Hi,

I'm attaching a sample code with this..

In your PF-STATUS enable F2 giving an okcode.

( You can find it in PF-STATUS -> Function keys -> Recommeneded function keys)

&----


*& Include MZ_DBLCLICK_TCTOP Module pool SAPMZ_DBLCLICK_TC

*&

&----


PROGRAM sapmz_dblclick_tc.

TABLES:scarr.

CONTROLS: tc1 TYPE TABLEVIEW USING SCREEN '9000'.

DATA: it_scarr TYPE TABLE OF scarr,

wa_scarr LIKE LINE OF it_scarr,

wa_scarr1 LIKE LINE OF it_scarr,

ok_code TYPE sy-ucomm,

wa_cols LIKE LINE OF tc1-cols.

DATA: ws_field(30),

ws_line TYPE i.

&----


*& Module status_9000 OUTPUT

&----


text

-


MODULE status_9000 OUTPUT.

" Here I've set Ok_code As 'DBLCLICK' for F2 functionKey

SET PF-STATUS '9000'.

SELECT * FROM scarr INTO CORRESPONDING FIELDS OF TABLE it_scarr.

ENDMODULE. " status_9000 OUTPUT

&----


*& Module USER_COMMAND_9000 INPUT

&----


text

-


MODULE user_command_9000 INPUT.

CASE ok_code.

WHEN 'DBLCLICK'.

GET CURSOR FIELD ws_field LINE ws_line.

IF ws_field EQ 'WA_SCARR-CARRID'.

READ TABLE it_scarr INDEX ws_line INTO wa_scarr1.

CALL SCREEN 9001.

ENDIF.

ENDCASE.

ENDMODULE. " USER_COMMAND_9000 INPUT

Don't forget to reward if useful...

prasanth_kasturi
Active Contributor
0 Kudos

hi,

i never tried it but i have an idea.

when you double click fct code 'PICK' will be triggered

so in pai of table control in case sy-ucomm write

when 'PICK'.

call screen '<scrno>' .

regards

prasanth

uwe_schieferstein
Active Contributor
0 Kudos

Hello

In the screen painter you can define in the screen element attributes whether a screen field (includes table control fields) should respond to Double-Click.

Further reading: [Defining the Element Attributes|http://help.sap.com/saphelp_nw70/helpdata/EN/d1/801c2d454211d189710000e8322d00/content.htm], chapter Display Attributes

Regards

Uwe

Former Member
0 Kudos

Thank u for ur replies i ve solved the problem using PICK in the GUI Status for F2.