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: 

ALV double Click

sastry_gunturi
Active Participant
0 Kudos
call method gr_grid->get_current_cell
           importing
             e_row     = g_row
             e_value   = g_value
             e_col     = g_col
             es_row_id = g_row_id
             es_col_id = g_col_id
             es_row_no = g_row_no.

    clear wa_requests.
    read table itab_requests index g_row_id into wa_requests.

    case g_col_id.
      when 'REQNUM'.                   "Show Process Order
        if not wa_requests-reqnum is initial.
          sy-ucomm = 'PICK'.
          if wa_requests-reqnum+0(1) = 'R'.
         leave to screen 200.
          endif.
        endif.

      when others.
    endcase.
  endmethod.
endclass.

is the code i am using for ALV double click......

however when i select any row.....and double click...

i am going to screen 200, instead of content on the 200 i am still seeing the alv grid.......

how to fix this error.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

since you are using the Methods with Objects

register the SY-Ucomm in the events of cl_salv_events_table class

and use the methods of class CL_SALV_TABLE

for double click

Regards

Anji

7 REPLIES 7

Former Member
0 Kudos

Hi

since you are using the Methods with Objects

register the SY-Ucomm in the events of cl_salv_events_table class

and use the methods of class CL_SALV_TABLE

for double click

Regards

Anji

0 Kudos

HOW DO I DO THAT......

Message was edited by:

Karthik

0 Kudos

> Hi

> since you are using the Methods with Objects

> register the SY-Ucomm in the events of

> cl_salv_events_table class

> and use the methods of class CL_SALV_TABLE

> for double click

>

> Regards

> Anji

Can you please let me know how to di this....

class lcl_event_receiver implementation.

  method handle_double_click.
    data: l_req like line of itab_requests.
    data:
    g_row type i,
      g_value(10),
      g_col type i,
      g_row_id type lvc_s_row,
      g_col_id type lvc_s_col,
      g_row_no type lvc_s_roid.

*  Read the double click cell

    call method gr_grid->get_current_cell
           importing
             e_row     = g_row
             e_value   = g_value
             e_col     = g_col
             es_row_id = g_row_id
             es_col_id = g_col_id
             es_row_no = g_row_no.

    clear wa_requests.
    read table itab_requests index g_row_id into wa_requests.

    case g_col_id.
      when 'REQNUM'.                   "Show Process Order
        if not wa_requests-reqnum is initial.
          sy-ucomm = 'PICK'.
          if wa_requests-reqnum+0(1) = 'R'.
          LEAVE TO SCREEN 200.
          endif.
        endif.

      when others.
    endcase.
  endmethod.
endclass.

data: event_receiver type ref to lcl_event_receiver.

is the code i wrote....

0 Kudos

Are you setting the event handler method in the PBO of the screen which implements the ALV grid?

  SET HANDLER EVENT_RECEIVER->HANDLE_DOUBLE_CLICK FOR GR_GRID.

Regards,

Rich Heilman

0 Kudos

Yes.

The exact problem is the alv is in screen 500...and depending on the request it should leave to 200 or 300.

which it is doinh......but instead of displaying the contents in screen it is displaying alv table in 200 too..

Message was edited by:

Karthik

0 Kudos

The column and row should be being passed to the event handler method already, without you having to specifically get the current cell. The parameter names are E_ROW and E_COLUMN, so just use these parameters instead.

Regards,

Rich Heilman

0 Kudos

Oh, ok if the double click is working fine, then leave it as it is. Is the container on screen 200, the same name as the contain on screen 500? Is it possible that the same object is being populated into the container on screen 200. Check the PBO of screen 200 and make sure that the correct object is being embeded.

Regards,

Rich Heilman