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: 

How to refresh after delete the records in ALV report ?

Former Member
0 Kudos
2,876

Hi Friends,

How to refresh after delete the records in ALV report.

I am deleting records in ALV report .

After successful delete the screen should refresh.

u201C Deleted records should not appear in the screen u201C.

Please guide me.

Regards,

Subash

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,031

Hi Subash,

Do same thing to refresh the ALV.

Use following code:

DATA : e_grid TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = e_grid.

CALL METHOD e_grid->check_changed_data.

"update_alv_tab

CALL METHOD e_grid->refresh_table_display.

Regards.

Confirm if solve.

11 REPLIES 11

former_member873340
Active Participant
0 Kudos
1,031

Hi subhasa,

You can simply call the same alv with the modified values of the final table(i.e after deleting those records).

Former Member
0 Kudos
1,032

Hi Subash,

Do same thing to refresh the ALV.

Use following code:

DATA : e_grid TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = e_grid.

CALL METHOD e_grid->check_changed_data.

"update_alv_tab

CALL METHOD e_grid->refresh_table_display.

Regards.

Confirm if solve.

0 Kudos
1,031

Hi ,

Through this method I try ,

But my internal table data not changing which one I used in the alv

TABLES

T_OUTTAB = T_OUTPUT1.

Actually this alv is interactive alv.

"

  • for refresh the alv

DATA : e_grid TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = e_grid.

CALL METHOD e_grid->check_changed_data.

*"update_alv_tab

CALL METHOD e_grid->refresh_table_display.

"

Please give me some more idea.

Thanking you.

Regards,

Subash.

0 Kudos
1,031

Is you record delete from Internal table??

0 Kudos
1,031

Hi Supriya,

I am even modifying & deleting records.

My requirement is if press 'BACK' button , it will conform 'Yes' or 'NO'.

If yes then it will edit the screen records to the internal table.

But it is not editing my internal table records.

Thanking you.

0 Kudos
1,031

Refreshing of ALV require here.

Can you please copy and paste your code!

0 Kudos
1,031

Hi subhash,

FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.

WHEN 'BACK'.

  • Refresh the internal table from the ALV grid

PERFORM update_alv_tab.

ENDFORM. "user_command

FORM update_alv_tab .

DATA : e_grid TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = e_grid.

CALL METHOD e_grid->check_changed_data.

"update_alv_tab

CALL METHOD e_grid->refresh_table_display.

ENDFORM. " UPDATE_ALV_TAB

Then see in Debug mode is it updating or not..

Please confirm .

And please paste the code if you can.

Regards.

0 Kudos
1,031

Hi Supriya.

Thank you so much.

Through your help my problem is solved.

I am grateful to you.

Thanking you.

Warm regards,

Subash

0 Kudos
1,031

SOLVED....

Keep it up.

Close this forum...

Former Member
0 Kudos
1,031

Hi,

If you try to delete a record from ALV,, it should have got deleted from your internal table also. In this case say for eaxample you have subroutine named DISPLAY_ALV, call tha Subroutine again withi this inernal table on deletion, this will display your modified table

Former Member
0 Kudos
1,031

HI,

After deleting the record from the internal table which you have passed to ALV method Call the method REFRESH_TABLE_DISPLAY of the same class.

Which will refresh the data in the container.