Skip to Content
0
Former Member
Feb 23, 2009 at 01:40 PM

Method handle_double_click runs more than one time

1126 Views

Hi NG

i have a problem with my coding. In my application i have a dynpro 100(not a Selection-Screen) with two ALVs on it. In ALV 1 there are some values, ALV 2 contains records from purchasing orders. Now, i'm doing a double click on a row in ALV 2. By double clicking a line the program opens the desired transaction(MM03, ME23N etc).

===============================================

CLASS lcl_event_handler DEFINITION .

PUBLIC SECTION .

METHODS:

*Double-click control

handle_double_click

FOR EVENT double_click OF cl_gui_alv_grid

IMPORTING e_row

e_column

es_row_no,

*Controlling data changes when ALV Grid is editable

handle_data_changed

FOR EVENT data_changed OF cl_gui_alv_grid

IMPORTING er_data_changed.

PRIVATE SECTION.

ENDCLASS. "lcl_event_handler DEFINITION

----


  • CLASS lcl_event_handler IMPLEMENTATION

----


CLASS lcl_event_handler IMPLEMENTATION .

*Handle Double Click

METHOD handle_double_click .

PERFORM handle_double_click

USING e_row

e_column.

ENDMETHOD . "handle_double_click

==================================================

FORM handle_double_click USING p_e_row TYPE any

p_e_column TYPE any.

READ TABLE it_zsaldo_oel INTO wa_zsaldo_oel INDEX p_e_row.

IF sy-subrc = 0.

  • Aufruf TA MM03 - Material anzeigen

IF p_e_column = 'MATNR'.

PERFORM aufruf_mm03 USING wa_zsaldo_oel-matnr.

ENDIF.

  • Aufruf Belege anzeigen

IF p_e_column = 'VBELN'.

CASE wa_zsaldo_oel-bart.

WHEN 'KM' OR 'ZKM'.

PERFORM aufruf_va43 USING wa_zsaldo_oel-vbeln.

WHEN 'NB'.

PERFORM aufruf_me23n USING wa_zsaldo_oel-vbeln.

ENDCASE.

ENDIF.

  • Aufruf SCREEN 200

IF p_e_column = 'ASALDO' AND p_e_row = 1.

CALL SCREEN 200 STARTING AT 10 1.

ENDIF.

ENDIF.

ENDFORM. "

=========================================================

When i want to return from the actuall transaction(or my Dynpro 200) to my first dynpro i have to cklick three times on the back button before i'm back in my dypro. And here is my problem. I don't know why the program loops in this methode:

METHOD handle_double_click .

PERFORM handle_double_click

USING e_row

e_column.

ENDMETHOD . "handle_double_click

On the ENDMETHOD statement the method should be finished.

Can anybody tell me what i am doing wrong?

Thanks a lot in advanced.

Tommy Gerig