2009 May 19 9:21 AM
Hello experts,
I have some problem in ALV programming. I have 3 columns in my alv grid .
I am displaying sum of first 2 cols in 3rd col .
After displaying alv grid , when i change entry in 1st col. or/and 2nd col and give a tab (now the cursor is in 3rd col) ,after this tab i want alv to display changed result in 3rd col.
Is there any event for this if yes how to use it?
thank you
Kirti
Hello experts,
I have some problem in ALV programming. I have 3 columns in my alv grid .
I am displaying sum of first 2 cols in 3rd col .
After displaying alv grid , when i change entry in 1st col. or/and 2nd col and give a tab (now the cursor is in 3rd col) ,after this tab i want alv to display changed result in 3rd col.
Is there any event for this if yes how to use it?
thank you
Kirti
2009 May 19 9:23 AM
Hi,
Try using the method REFRESH_TABLE_DISPLAY of the class CL_GUI_ALV_GRID.
Hope this works.
Regards,
Mansi.
2009 May 19 9:36 AM
Hi,
Actually i tried refresh_table_display method in data_changed_finish event of cl_gui_alv_grid but in this case on every tab click cursor goes to initial position(bcause of refreshing of table)
Could plz tell me where exactly to call this method i mean to say on which event?
2009 May 19 9:26 AM
2009 May 19 9:30 AM
Pass i_callback_user_command to REUSE_ALV_GRID_DISPLAY and there write the code using rs_selfield-value. and call the GRID again. so that it can be refreshed.
Regards,
Ajay
2009 May 19 9:32 AM
2009 May 19 9:33 AM
Dear Kirty,
Use this Function Module RS_REFRESH_FROM_SELECTOPTIONS
Cheers
Fareed
2009 May 19 9:53 AM
Hi,
Are you pressing any button to calculate the total?
Incase yes then call REFRESH_TABLE_DISPLAY in the PBO.
Incase you want that the total to be displayed the moment the user moves from one cell to another then,
you will have to register the data changed event and in the handler method modify the cell value using
CALL METHOD er_data_changed->modify_cell and then refresh the grid using
CALL METHOD sender->refresh_table_display
When you are handling the event data_changed OF cl_gui_alv_grid there is a parameter sender which is returned. This basically points to the grid which caused this event.
So you can make use of that.
For example
METHODS y_m_handle_tab_movement_of cell
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed
e_onf4
e_onf4_before
e_onf4_after
e_ucomm
sender.
I have created a handler method y_m_handle_tab_movement_of cell
which will be called whenever one moves from one cell to another.
In this method i will make use of
CALL METHOD er_data_changed->modify_cell to basically change the data of any other cell
say the sum cell and after that call
CALL METHOD sender->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
to refresh my main grid.
I hope this helps you.
Regards,
Ankur Parab
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |