Change field catalog dynamically
I am using an OO ALV to achieve my requirements.
I need to populate this grid from a table. I should be able to add, edit, and delete lines. I did already all of these requirements. The tricky thing is that if the table has data and I am populating this data, there are some fields that should NOT be editable. When I add a new row, two of those non editable, should be editable.
The question is, when I add a new row, how can I change these two fields to editable for that new row without changing these fields on the records that are already saved?
Obviously I am not looking for exact code. I am looking for someone to point me to the right direction.
Eitan Rosenberg replied
Get the book "An Easy Reference for ALV Grid Control" http://scn.sap.com/docs/DOC-10353
In the book:
– Inserting an inner table to store cell display styles
see program BCALV_EDIT_02 .
cl_gui_alv_grid=>mc_style_disabled and cl_gui_alv_grid=>mc_style_enabled