2009 Aug 18 9:18 PM
Hi people,
I'm with a problem in my ALV OO
I'm using a ALV with the EDIT option so the user can edit the values from the ALV.
But I'm having a problem with this. When the user change a value from the ALV the table just change IF the user pressed a button from the ALV menu or pressed the ALV with a double click.
So IF the user change a value, press ENTER and then the SAVE button on the SAP menu the value is not saved into the ALV table.
I don't want to order the user to double click the ALV everytime he wants to save his changes.
Can u help me?
Tks
2009 Aug 18 9:23 PM
Try this way
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform f_exit_program.
when 'CANC'.
perform f_exit_program.
when 'BACK'.
perform f_exit_program.
when 'SAVE'.
perform f_save_data.
endcase.
endmodule. " Pai INPUT
form f_save_data .
data : p_index like sy-index.
call method g_grid->check_changed_data
importing
e_valid = v_valid.
if not v_valid is initial.
" From here update your table , Your ALV table have changed data
a®
Try this way
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform f_exit_program.
when 'CANC'.
perform f_exit_program.
when 'BACK'.
perform f_exit_program.
when 'SAVE'.
perform f_save_data.
endcase.
endmodule. " Pai INPUT
form f_save_data .
data : p_index like sy-index.
call method g_grid->check_changed_data
importing
e_valid = v_valid.
if not v_valid is initial.
" From here update your table , Your ALV table have changed data
a®
2009 Aug 18 9:23 PM
Try this way
module pai input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'EXIT'.
perform f_exit_program.
when 'CANC'.
perform f_exit_program.
when 'BACK'.
perform f_exit_program.
when 'SAVE'.
perform f_save_data.
endcase.
endmodule. " Pai INPUT
form f_save_data .
data : p_index like sy-index.
call method g_grid->check_changed_data
importing
e_valid = v_valid.
if not v_valid is initial.
" From here update your table , Your ALV table have changed data
a®
2009 Aug 19 12:57 PM
Thanks a®s
It worked just fine.
Everytime the program passes through the method it refresh my table with the changes
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |