2007 Aug 10 1:26 AM
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
2007 Aug 10 1:49 AM
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.
2007 Aug 10 2:11 AM
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.
2007 Aug 10 2:49 PM
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
2007 Aug 10 3:01 PM
You need to refresh the table in the PBO of the screen having the ALV grid..
Cheers
Nitesh
2007 Aug 10 3:40 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |