2007 Jan 29 1:08 AM
Hi folks,
I have a requirement to display table output in an ALV grid, making 1 column editable.
I have done this by setting the EDIT = 'X' flag in the field catalog for the field in question. Yet, when the field value is modified and the users try to continue processing, I cannot find the value that was changed.
The process for building and displaying the table is as follows:
1)
method constructor.
*/ Initialise variables here...
*/ Set the name of the internal table that will be displayed
*/ in the ALV grid
m_active_Table = 'IT_SPECTRUM_RECS'. 2)
*/ Assign the data display table to a field-symbol for ALV display
assign (m_active_Table) to <fs_datatab>. 3)
call method go_grid->set_table_for_first_display
EXPORTING
is_layout = ms_layout
is_variant = ms_Variant
i_save = m_var_save_st
it_toolbar_excluding = mt_Excl_UI_Func
CHANGING
it_sort = mt_sort
it_fieldcatalog = mt_FieldCat
it_outtab = <fs_datatab>. Coming back into the PAI of the program, the changes in the editable field are not displayed, only the PBO values of the table (IT_SPECTRUM_RECS) and the field symbol <FS_DATATAB>.
My requirement is to loop through the table and verify the edited column details. Any thoughts would be greatly appreciated, and points will be rewarded accordingly.
Cheers,
Stephen
2007 Jan 29 6:15 AM
Beejal,
Thank you for this suggestion. I am in the middle of implementing it, but I still see 1 problem - namely where is the edited data 'i_spfli' obtainined from. If i_spfli is the data outtab specified, then where is the changed data stored. For eaxample, if i_spfli is the table containing the data written into the ALV grid, when I come back into the PAI 'When ...' modules, i_spfli contains the old table values only, not the modified values?
Thanks,
Steve
Hi folks,
I have a requirement to display table output in an ALV grid, making 1 column editable.
I have done this by setting the EDIT = 'X' flag in the field catalog for the field in question. Yet, when the field value is modified and the users try to continue processing, I cannot find the value that was changed.
The process for building and displaying the table is as follows:
1)
method constructor.
*/ Initialise variables here...
*/ Set the name of the internal table that will be displayed
*/ in the ALV grid
m_active_Table = 'IT_SPECTRUM_RECS'. 2)
*/ Assign the data display table to a field-symbol for ALV display
assign (m_active_Table) to <fs_datatab>. 3)
call method go_grid->set_table_for_first_display
EXPORTING
is_layout = ms_layout
is_variant = ms_Variant
i_save = m_var_save_st
it_toolbar_excluding = mt_Excl_UI_Func
CHANGING
it_sort = mt_sort
it_fieldcatalog = mt_FieldCat
it_outtab = <fs_datatab>. Coming back into the PAI of the program, the changes in the editable field are not displayed, only the PBO values of the table (IT_SPECTRUM_RECS) and the field symbol <FS_DATATAB>.
My requirement is to loop through the table and verify the edited column details. Any thoughts would be greatly appreciated, and points will be rewarded accordingly.
Cheers,
Stephen
2007 Jan 29 5:29 AM
Hello,
Check if you have done the following:
---You have to modify the field Catalog fields to set the field EDIT as 'X'.
---Call the method
CALL METHOD ALV_GRID_INSTANCE->set_ready_for_input
EXPORTING
i_ready_for_input = 0. ( For Display ) and '1' for Edit )
Put this after the set_table_for_first_display method.
--- If you want to check if the user has entered any value on the grid, use the Method : CALL METHOD ALV_GRID_INSTANCE->check_changed_data.
This will reflect as a change in your existiing data table to new data added on the editable grid.
For example,you can use it at user-command 'SAVE':
WHEN 'SAVE'.
call method alv->check_changed_data
importing e_valid = l_valid.
if l_valid = 'X'.
MODIFY SPFLI FROM TABLE I_SPFLI.
endif.
Regards,
Beejal
**Reward if this helps
2007 Jan 29 6:15 AM
Beejal,
Thank you for this suggestion. I am in the middle of implementing it, but I still see 1 problem - namely where is the edited data 'i_spfli' obtainined from. If i_spfli is the data outtab specified, then where is the changed data stored. For eaxample, if i_spfli is the table containing the data written into the ALV grid, when I come back into the PAI 'When ...' modules, i_spfli contains the old table values only, not the modified values?
Thanks,
Steve
2007 Jan 29 6:27 AM
check this demo program on how to get the modified cell value
BCALV_EDIT_03
Raja
2007 Jan 29 6:34 AM
Thanks Durairaj, but unfortunately the client has deleted all the SFLIGHT details from the system. I can see the code of the BCALV* programs, but can't test them or see what they do.
2007 Jan 29 6:37 AM
you can run tcode BC_DATA_GEN to reload those data into flight tables.
Raja
2007 Jan 29 10:33 AM
2007 Jan 30 2:18 AM
Raja,
Thanks for the program. It worked fine, and from that, I have been able to get individual cell data changes to work.
Cheers,
Stephen
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |