EDIT_MODE in REUSE_ALV_GRID_DISPLAY
I am calling FM REUSE_ALV_GRID_DISPLAY to display certain data in an ALV grid. Some of the fields are supposed to be editable, so I modify the field catalogue accordingly (fieldcat-edit = 'X'). Since I want to edit some of the grid data I set the LAYOUT structure fields EDIT to 'X' and EDIT_MODE to ' ', respectively.
Now I have two problems:
The first problem is that all fields are editable, not just the ones I set fieldcat-edit = 'X' for. Even those with fieldcat-edit = ' ' are editable.
The second problem is that the internal table isn't always updated when I change the data in the ALV grid. I enter new text in one of the fields, but the internal table is changed only when I press the enter key or do some other stuff that causes a PAI (at least that's what I think). When I press 'SAVE' whithout hitting enter before, the data isn't updatet at all!!!
Is there a solution to this problem? Do I have to set the parameters EDIT or EDIT_MODE of the LAYOUT structure to any magic values before alling REUSE... ?
Hi, I think can solve you second problem, about the update internal table after user inputted.
Call FM like this:
LC_GLAY TYPE LVC_S_GLAY.
this is the critical point
LC_GLAY-EDT_CLL_CB = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
I_GRID_SETTINGS = LC_GLAY
IT_FIELDCAT = L_ALV_FILEDCAT
T_OUTTAB = ITAB.
Then you can get the user inputted after FM return.
Hope it will be helpful, thanks