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

Probelm In double_click event (ALV grid control using oop concepts)

Hi,

I am doing ALV grid using OOP concepts.I am handling Double_click event.

When I first double click on any field, its working fine.

But, wen i double click for second time on any field, its going out of the program.(to the initial SAP ACCESS MENU screen).

here I am giving my piece of code.

CLASS lcl_event_handler DEFINITION.

PUBLIC SECTION.

CLASS-METHODS : handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid

IMPORTING e_row_id

e_column_id

es_row_no,

handle_double_click FOR EVENT double_click OF cl_gui_alv_grid

IMPORTING e_row

e_column

es_row_no.

PRIVATE SECTION.

ENDCLASS.

CLASS lcl_event_handler IMPLEMENTATION.

METHOD handle_hotspot_click.

IF e_column_id-fieldname = 'EBELN'.

READ TABLE it_ekko INTO wa_ekko INDEX es_row_no-row_id.

SELECT ebeln ebelp ematn matkl netpr FROM ekpo

INTO CORRESPONDING FIELDS OF TABLE it_ekpo

WHERE ebeln = wa_ekko-ebeln.

*call screen 200 (EKPO data)

CALL SCREEN 200.

ELSE.

MESSAGE e000(z50871msg) WITH 'Please click on Purchase Doc number'.

ENDIF.

ENDMETHOD. "handle_hotspot_click

METHOD handle_double_click.

IF e_column-fieldname = 'EBELN'.

READ TABLE it_ekko INTO wa_ekko INDEX es_row_no-row_id.

SELECT ebeln ebelp ematn matkl netpr FROM ekpo

INTO CORRESPONDING FIELDS OF TABLE it_ekpo

WHERE ebeln = wa_ekko-ebeln.

*call screen 200 (EKPO data)

CALL SCREEN 200.

ELSE.

MESSAGE e000(z50871msg) WITH 'Please click on Purchase Doc number'.

EXIT.

ENDIF.

ENDMETHOD . "handle_hotspot_click

ENDCLASS. "lcl_event_handler IMPLEMENTATION

Is there any thing wrong in handleing the events.

Points will be rewarded.

Regards

Sandeep Reddy

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 03:40 PM

    Please put break point in the PBO and PAI events of the screen 100 and screen 200 and investigate

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 03:42 PM

    try debugging for your second double click and see, what is happening. which method it is using etc ?

    try clearing e_row and e_column.

    when you say' double click for the second time.." do you mean, double clciking on screen 200 ? have you defined, the events for this screen ?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 05:10 AM

    Hello Sandeep

    You should not call the second screen within your event handler method. Instead, trigger PAI by calling method CL_GUI_CFW=>SET_NEW_OK_CODE and call the second dynpro as usual in the USER_COMMAND module at PAI.

    For the sample report ZUS_SDN_ALVGRID_EVENTS_1 have a look at thread

    Regards

    Uwe

    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.