Skip to Content
author's profile photo Former Member
Former Member

Itab on Screen painter ...

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2008 at 06: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2008 at 06: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.