03-19-2008 5:51 PM
Hello Abapers ...I have made a screen using the Screen painter.In this screen i put an internal table that links to a Z table that i have made .I said to the wizard that i want a field to respond on Double click.I see the field underlined now but i don't how to write the events for the double click .
Please can someone help me ...
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Mar 19, 2008 4:13 PM
03-19-2008 6:01 PM
Go to your GUI STATUS for this screen.
Open the Function Keys view
In the Recommended function key settings box
For the F2, change the <..> to whatever you want the OK_CODE to be.
put a break point in your user_command module and see what the OK_CODE/SY-UCOMM value is.
03-19-2008 6:01 PM
Go to your GUI STATUS for this screen.
Open the Function Keys view
In the Recommended function key settings box
For the F2, change the <..> to whatever you want the OK_CODE to be.
put a break point in your user_command module and see what the OK_CODE/SY-UCOMM value is.
03-19-2008 6:08 PM
hi try like this...
&----
*& 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
regards,
venkat.