2014 Nov 04 6:03 AM
Hi Experts,
I have a requirment where i need to refresh the screen after every modification action is performed. For that i need to make the table control editable dynamically and then save the change data and refresh the screen. Can you please help me out with the logic for same?
Regards,
Adi
2014 Nov 04 6:11 AM
Hi Aditya,
You can easily make the table control editable->noneditable by using the following method :
LOOP AT tablecontrolname-cols INTO cols.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY tablecontrolname-cols FROM cols INDEX sy-tabix.
ENDLOOP.
Saving the data can be done by simply updating the internal table and subsequently Updating the dbtab.
To refresh the screen :
a) you can either call the select query module again for the screen after updating the dbtab.
OR
b) you can also use the REFRESH CONTROL statement.
Hope it helps.
Regards,
Srish
2014 Nov 04 6:11 AM
Hi Aditya,
You can easily make the table control editable->noneditable by using the following method :
LOOP AT tablecontrolname-cols INTO cols.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY tablecontrolname-cols FROM cols INDEX sy-tabix.
ENDLOOP.
Saving the data can be done by simply updating the internal table and subsequently Updating the dbtab.
To refresh the screen :
a) you can either call the select query module again for the screen after updating the dbtab.
OR
b) you can also use the REFRESH CONTROL statement.
Hope it helps.
Regards,
Srish
2014 Nov 04 6:17 AM
Hi,
Thank you for the prompt reply. The code works fine for me.
Reg,
Adi