2012 Apr 26 9:15 PM
Hi,
I am trying to build the following functionality in OO ALV. I am trying to show a table whose one of the fields is a single character field. I have shown the field as a check box. Requirement is that the user will click on the check box for n number of entries, and when he clicks a button, the data will be saved in the database.
I have been able to show the table with the check box for each entries, but cant update the internal table when the check box is clicked. I need to catch the records which user has update (clicked the checkbox).
Please help.
2012 Apr 27 6:03 AM
hi,
let's say it in easy way.
after you check the entries which you want, then you will do 1 action, press 1 button or else.
for this , event will be triggered.
Assume your oo grid name is go_grid, your display data internal table is gt_main.
in the , use this method: go_grid->check_changed_data,
so the data in internal table gt_main will be updated.(for your case, the checkbox field will be update),
then with these data, do what you want.
hi,
let's say it in easy way.
after you check the entries which you want, then you will do 1 action, press 1 button or else.
for this , event will be triggered.
Assume your oo grid name is go_grid, your display data internal table is gt_main.
in the , use this method: go_grid->check_changed_data,
so the data in internal table gt_main will be updated.(for your case, the checkbox field will be update),
then with these data, do what you want.
2012 Apr 26 9:36 PM
Hi,
Please have a closer look at BCALV_EDIT_05 (or SALV_DEMO_TABLE_COLUMNS for salv class).
Kr,
Manu.
2012 Apr 27 6:03 AM
hi,
let's say it in easy way.
after you check the entries which you want, then you will do 1 action, press 1 button or else.
for this , event will be triggered.
Assume your oo grid name is go_grid, your display data internal table is gt_main.
in the , use this method: go_grid->check_changed_data,
so the data in internal table gt_main will be updated.(for your case, the checkbox field will be update),
then with these data, do what you want.
2012 Apr 27 6:15 AM
Hi kushal,
Assuming that you are using CL_GUI_ALV_GRID then
you have to call method go_grid->check_changed_data( ) at PAI
of the dynpro displaying the ALV list in order to retrieve the data from the frontend (= ALV list) to your backend (= itab in ABAP program).
Place this method call as one of the first statements within your USER_COMMAND module (PAI) and the save will work
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |