Application Development and Automation 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: 
Read only

Urgent: Object oriented ALV Refresh

Former Member
0 Likes
512

Hello:

Pl let me know or share a code--- to update multiple lines selected from OO ALV GRID list in the SAP transparent table

Also

I am trying to update the data into transparent table.

Using OO ALV .

The lines are getting refreshed ...

PERFORM refresh_grid. "Refresh the grid with the new data

-


FORM refresh_grid.

CALL METHOD grid1->refresh_table_display.

  • DESCRIBE TABLE GT_OUTTAB LINES LIN1.

CALL METHOD cl_gui_cfw=>flush.

ENDFORM. " REFRESH_GRID

-


but based on that refresh need to edit the refreshed line..but this is not working..

it should be iterative process..

Thanks,

Sanika

2 REPLIES 2
Read only

Former Member
0 Likes
379

The following method call is used to refresh the data displayed within an ALV object grid:

CALL method gd_tree->REFRESH_TABLE_DISPLAY.

CALL METHOD gd_tree->set_table_for_first_display
    EXPORTING
      is_layout       = gd_layout
    CHANGING
      it_fieldcatalog = gd_fieldcat
      it_sort         = it_sortcat
      it_outtab       = it_report.      

 CALL method gd_tree->REFRESH_TABLE_DISPLAY.

 CALL METHOD cl_gui_cfw=>flush

Reward points if it is usefull ....

Girish

Read only

uwe_schieferstein
Active Contributor
0 Likes
379

Hello Sanika

Assuming that you have an editable ALV list (displayed on screen '0100') you should have to following coding in your report:

<b>1. At beginning of USER_COMMAND module (PAI)</b>


  go_grid->check_changed_data( ).  " retrieve changes from ALV grid into ABAP itab

" Of course you have to do all necessary validations prior to saving the data into any DB table

<b>2. At the beginning of STATUS_0100 module (PBO):</b>

  CALL METHOD go_grid->refresh_table_display( ).
" In order to keep the current position fill the IS_STABLE parameter.

Regards

Uwe