Hi,
I have developed a program which updates the Custom tables in the database.
I am using cl_gui_alv_grid in the module pool program. I am making all the fields editable using ls_fcat-edit = 'X'.
But as per my requirement in the change mode of the same data base entry, the user should not be able to change the existing data (like PO line items).
My requirement is for a particular Purchase Order if there are line items, when I open the Purchase Order in the change mode all the existing line items should be in display mode and I need to provide the user to add more lines.
Say the PO has 3 line items, in the Grid, it should be like all the existing 3 line items should be in display mode and rest of the lines should be in editable mode which will give the option for the user to add more line items for the same PO.
Here it is not Purchase Order, I just compared as an example.
Logic I am using.
I am building the internal table with a serial numbers from 1-99 and this particular column will be in display mode in the ALV Grid. Using the class cl_gui_alv_grid.
Capturing all the data entered using event handler with method handle_data_changed.
Please tell me how do I set the particular lines in display mode and others in editable mode within the same internal table.
Thanks