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: 

Dialog Programming using ALV OOPS

Former Member
0 Kudos

Hi,

I am developing a module pool program which contains two tabs . One tab conatins the ALV Grid and the other contains the ALV tree. In the selection screen I have a Builder, Community and LOT.

WHen I execute the transaction for the first time correct data is populating int the ALV Tree.

But when we just COME BACK and give new selection the tree is showing the previous selection data only.

I have cleared the Tree , COnatiner in the PAI event .

Used the Frontend_update method as well for the front end data update.

While debugging the corresponding internal tables are populated with the update data.

ALV tree is not refreshing right from the second run of the program with new selection inputs.

Kindly help.

5 REPLIES 5

Former Member
0 Kudos

Have you tried


    CALL METHOD CL_GUI_CFW=>FLUSH.
    CALL METHOD CL_GUI_CFW=>DISPATCH.

I have found that this updates internal table cache when an event is triggered outside of the tree itself.

0 Kudos

>

> Have you tried

>


>     CALL METHOD CL_GUI_CFW=>FLUSH.
>     CALL METHOD CL_GUI_CFW=>DISPATCH.
> 

>

> I have found that this updates internal table cache when an event is triggered outside of the tree itself.

Hi,

Call method REFRESH_TABLE_DISPLAY of class CL_GUI_ALV_GRID .

Regards,

S.Sivakumar

0 Kudos

>

> Have you tried

>


>     CALL METHOD CL_GUI_CFW=>FLUSH.
>     CALL METHOD CL_GUI_CFW=>DISPATCH.
> 

>

> I have found that this updates internal table cache when an event is triggered outside of the tree itself.

Hi,

Call method REFRESH_TABLE_DISPLAY of class CL_GUI_ALV_GRID .

Regards,

S.Sivakumar

Former Member
0 Kudos

Hi abdul,

In last triggered PAI event

write

CASE sy-ucomm.

WHEN 'BACK'.

c_container->free( ).

r_grid->free( ).

It will refresh the container and the grid then the fresh data will display.

Rgards and Best wishes.

0 Kudos

hy have the same problem...still not working

that the form...

form show_alv changing pt_fieldcat type lvc_t_fcat.

  data : lt_exclude  type  ui_functions.

  if  g_custom_container  is   initial .
    create object g_custom_container
      exporting
        container_name = g_container.

    create object grid
      exporting
        i_parent = g_custom_container.
    perform  toolbar  changing  lt_exclude.
    perform  build_fieldcat  changing  pt_fieldcat.
    gs_layout-stylefname =  'CELLTAB' .

    if   not  itb_zt1050[]  is   initial .
      call method grid->set_table_for_first_display
        exporting
          it_toolbar_excluding = lt_exclude
          is_layout            = gs_layout
        changing
          it_fieldcatalog      = pt_fieldcat
          it_outtab            = itb_zt1050[].
      call method grid->set_ready_for_input
        exporting
          i_ready_for_input = 1.
*gestione toolbar e pai
        create object g_event_receiver.
        set   handler  g_event_receiver->handle_user_command  for  grid.
        set   handler  g_event_receiver->handle_toolbar  for  grid.
  .

and in the user_command

module user_command_0200 input.
  save_ok = ok_code.
  clear ok_code.
  case save_ok.
    when 'BACK'.
      call method grid->free.
      call method g_custom_container->free.
      call method cl_gui_cfw=>flush.
      set screen 0.
      leave  to screen '0100'.
    when 'SAVE'.
      perform save_data.
*      LEAVE TO SCREEN '0100'.
*      CALL METHOD cl_gui_cfw=>dispatch.
*      CALL METHOD grid->check_changed_data.
    when 'EXIT'.
      leave program.
    when others.
  endcase.
endmodule.                 " USER_COMMAND_0200  INPUT