08-07-2006 4:10 PM
Hi all,
I've done an ALV report ( using 'REUSE_ALV_GRID_DISPLAY' ). I've also add a GUI Status to add a button.
I've some checkbox and some editable field.
The display is ok, I can edit and click checkbox but when I press my own button, the table isn't updated ( In debug Mode, in the 'IATB_USER_COMMAND' routine, the table is like the first display )
How can I update my table after ALV screen update ?
Thx a lot
Regards,
Erwan
08-07-2006 4:16 PM
follow this code,
regards
srikanth
FORM f_user_command_modify USING
r_ucomm LIKE sy-ucomm "#EC *
rs_selfield TYPE slis_selfield.
IF r_ucomm = c_fc_save.
*--User Selected SAVE button.
READ TABLE it_zbcar50_modify WITH KEY rec_sel = c_x.
*--Check user selected atleast 1 line.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'No record(s) Selected to
Modify'(016).
EXIT.
ENDIF.
LOOP AT it_zbcar50_modify WHERE rec_sel = c_x.
*--Move All records into ZBCAR50 structure table
MOVE-CORRESPONDING it_zbcar50_modify TO
it_zbcar50_temp.
it_zbcar50_temp-mandt = sy-mandt.
APPEND it_zbcar50_temp.
CLEAR : it_zbcar50_temp.
ENDLOOP.
*--it_zbcar50_temp is the same structure as the database table.
*--Modify ZBCAR50 Table with the changed values.
MODIFY zbcar50 FROM TABLE it_zbcar50_temp.
IF sy-subrc = 0 .
COMMIT WORK AND WAIT.
*--Display message with Success in Updating database
MESSAGE i000 WITH sy-dbcnt
' Record(s) has been Updated'(020).
endif.
ENDFORM.
08-07-2006 4:19 PM
Hi,
Just a guess..
Try putting an 'X' in the REFRESH field of structure SELFIELD.
Best regards,
Guillaume