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

ALV Grid update

Former Member
0 Likes
916

Hi All,

I have a requirement.

In the ALV grid, I have to select a row. When I click the change ICON, the data in the rows should be populated in the customized screen.

I had already done this part.

Now I had changed the values in the customized screen. When I click the 'SAVE' button in the customized screen, the data in the screen should be passed to the GRID.

Here, I had updated the table which is used in the GRID. But, how to refresh the GRID, so that I can see the changed values in the GRID.

I had used refresh_table_display method.. But it prompts me an error.. and the program is exited.

If anyone had done this.. kindly send me the code.... or help me out how to proceed.

Thanks in advance.

Jaffer Ali.S

Hi All,

I have a requirement.

In the ALV grid, I have to select a row. When I click the change ICON, the data in the rows should be populated in the customized screen.

I had already done this part.

Now I had changed the values in the customized screen. When I click the 'SAVE' button in the customized screen, the data in the screen should be passed to the GRID.

Here, I had updated the table which is used in the GRID. But, how to refresh the GRID, so that I can see the changed values in the GRID.

I had used refresh_table_display method.. But it prompts me an error.. and the program is exited.

If anyone had done this.. kindly send me the code.... or help me out how to proceed.

Thanks in advance.

Jaffer Ali.S

5 REPLIES 5
Read only

former_member194669
Active Contributor
0 Likes
844

Hi,

You need to call method grid->refresh_table_display in PBO of the screen of the Grid screen, so control comes from customised screen will grid get refreshed

aRs.

Read only

Former Member
0 Likes
844

From what you say, since you are using an Information Message, irrespective of whether the user wants it or not, the ALV Grid has to be updated with the calculations that you do. He cannot choose to cancel the operation. Am I correct?

If yes, then all you need to do is to update the ALV output table with the calculations that you have done and call the method refresh_table_display.

see this example program

believe that the after the info message you are updating the ALV grid value. Then try these out,

to update the ALV grid,

call method addressbook_grid->set_ready_for_input

exporting

i_ready_for_input = 1. " Sets to edit mode

data : w_intab1 like table of zc1address with header line .

  • Here update is performed using a work area

  • you can also specify the partcular column and update it.

update zc1address from table t_intab1.

if sy-subrc = 0.

message i000. " success message

else.

message i001. " unsuccess message

endif.

  • refreshing the grid to display the modified values

call method addressbook_grid->refresh_table_display.

  • sets ALV grid to display mode.

call method addressbook_grid->set_ready_for_input

exporting

i_ready_for_input = 0.

Read only

0 Likes
844

Hi Karthikeyan,

I have a doubt here....

I called the method grid->refresh_table_display in the PAI of the customized screen. I think I am wrong here....

Kindly let me know... how to proceed... In which screen I have to call the method refresh_table_display.

Is it in PBO of the grid screen... and how to do that...

As per my logic, let me know if the below code is correct.

Module user_command_0210 input " Customized screen.

When 'Save'.

Modify outtab from intab index indno. "To modify the grid table

Call screen 100.

call grid->refresh_table_display.

Kindly let me know If I am wrong.

Thanks in advance,

Jaffer Ali.S

Read only

nitesh_jain3
Active Participant
0 Likes
844

You need to refresh the table in the PBO of the screen having the ALV grid..

Cheers

Nitesh

Read only

0 Likes
844

Hi Niten,

Can I know at which point I have to write the code...

B'cos when I click the 'save' button in the customized screen PAI, the table should be refreshed rite... how to refresh from PAI of the customized screen.

Do u have any sample code for that.. IF u have kindly share it.

Thanks in advance,

Jaffer Ali.S