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 on_double_click - refresh screen

Former Member
0 Kudos

Hello,

I want to have on 1 screen:

1. ALV Grid with data

2. Detailed information to the selected row represented in textboxes. I use the following code to do it, but it does only work when I press ENTER to refresh the screen after having double-clicked my ALV Grid. Is there a way, other then CALL SCREEN nnn. to redraw the current dynpro? ..so that my detailed information can be visualized.

Thanks for your help.

Manuel

data: msg type string,

row type string,

col type string.

row = es_row_no-row_id.

col = e_column-fieldname.

clear: zmm_s_abap_training_alv, gw_material.

read table gt_material index row into gw_material.

move gw_material to zmm_s_abap_training_alv.

  • call screen 100.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The problem is not refreshing the LAV Grid, but refreshing my textboxes with the detailed information to the selected alv Grid row. so that they represent the right information.

gt_material is the iatb used in the ALV grid. Thatt's right.

8 REPLIES 8

Former Member
0 Kudos

Do you use an event-handler?

Without an event-handler the grid don't know how to react on the double-click.

Former Member
0 Kudos

Yes, I use an Event Handler. In the Event Handler Method I have the code that I already posted. Even if I copy the new information to the structure I used in the dynpro, the GUI is not refreshed and no information is displayed. It only works when I refresh the screen by presing ENTER or when I use the CALL SCREEN <screenname>. statement (which is commented) in the code above.

Regards,

Manuel

Former Member
0 Kudos

Hello Manuel,

Try this:

Regards,

Vasanth

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I assume that gt_material is the internal table being passed to the ALV, if so, you would need to modify that internal table appropriatly, and then call the REFRESH_TABLE_DISPLAY method of the alv grid object(instance of CL_GUI_ALV_GRID). Do this in the event handler.

Regards,

Rich Heilman

Former Member
0 Kudos

The problem is not refreshing the LAV Grid, but refreshing my textboxes with the detailed information to the selected alv Grid row. so that they represent the right information.

gt_material is the iatb used in the ALV grid. Thatt's right.

0 Kudos

<i>refreshing my textboxes</i>

Don't follow you. What textboxes?

Regards,

Rich Heilman

0 Kudos

I think there is no way without "call screen xxx". I've tested a little bid and found no way without it.

0 Kudos

Sorry for v.slow response, but had this on my watchlist waiting for a time to check it out. Try the following:

1. Define your "event_double_click for event double_click of cl_gui_alv_grid" as usual.

2. In the PF-STATUS for the main screen define a function to indicate a dynpro refresh is required e.g. "ZREFRESH".

3. in your "event_double_click" method, retrieve the details of the row selected, and then have something like:

    
  data:
    l_rc              like sy-subrc,
    l_ucomm           type sy-ucomm.

  l_ucomm  = 'ZREFRESH'.
  call method cl_gui_cfw=>set_new_ok_code
    exporting
      new_code = l_ucomm
    importing
      rc       = l_rc.

This should take you directly into the PAI for the main screen, where you can just let it loop back into PBO... where you refill the "textbox" (output) fields for the row that was selected.

Jonathan