2007 Dec 14 2:02 PM
Hi gurus,
i have the following question for u.
I have to read all rows of alv grid(OOP progamming) without read internal table. At point that i have to read this rows the internal table and table of alv grid didn't match and i cant do refresh.
The only way to read a rows by oop is the method get_selected_rows but i ve to read all rows not only selected ones.
THANKS!!!!
2007 Dec 14 2:13 PM
Hi Michele,
check the program BCALV_EDIT_05
call method g_grid->set_table_for_first_display
exporting it_toolbar_excluding = lt_exclude
changing it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab.
Set editable cells to ready for input initially
CALL METHOD g_grid->set_ready_for_input
EXPORTING
I_READY_FOR_INPUT = 1.
clear lt_f4.
lt_f4-fieldname = 'WUNIT'.
lt_f4-register = 'X'.
append lt_f4.
See this link
<b>Kindly Reward points if you found the reply usefull</b>.
Cheers,
Chaitanya.
2007 Dec 14 2:53 PM
Hi Michele,
I think that the best way it's to save a copy of your table before the ALV Display...then re-call back before refreshing.
The only way to access the full content of the table passed to cl_gui_alv_grid is the attribute MT_OUTTAB, but unfotunately this is Protected.
So, twice solution:
- You use method SET_SELECTED_ROWS and select all rows then call GET_SELECTED_ROWS
- You save your table in the program
Try this:
DATA: local_outtab TYPE REF TO DATA.
FIELD-SYMBOLS: <original_table_to_display> TYPE TABLE.
GET REFERENCE OF your_table_to_display INTO local_outtab.
"...call the grid
"...do your things
"...recall back your original table
ASSIGN local_outtab->* TO <original_table_to_display>.
"...compare as you want or refresh using the field-symbol
I hope I understood well.
If not, please try explain again the problem for me...
2007 Dec 28 10:11 AM
you can do this..
store the values of internal table (referring fieldcatalog) in some other internal table.
then use this method.
if rg is not initial.
call method rg->check_changed data.
endif.
rg is reference to grid.
this time ur internal table contains new values and then u can compare this internal table with the stored internal table.