2006 Oct 29 7:13 AM
Hi all,
I need to update 2 columns in an ALV grid but not in all the rows (meaning in rows that have a particular status
these columns will be disabled but in other rows with a different status these columns will be editable).
I'm using the TYPE-POOLS SLIS and not the objects method.
Thanks,
Hagit
2006 Oct 29 7:19 AM
hi,
this problem excatly replicated in this link.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm
simply chk it.
<i>pls close the thread if ur issue solve, after mark ing all hlpful answers</i>
rgds
anver
if hlped pls mark points
Message was edited by: Anversha s
Hi all,
I need to update 2 columns in an ALV grid but not in all the rows (meaning in rows that have a particular status
these columns will be disabled but in other rows with a different status these columns will be editable).
I'm using the TYPE-POOLS SLIS and not the objects method.
Thanks,
Hagit
2006 Oct 29 7:19 AM
hi,
this problem excatly replicated in this link.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm
simply chk it.
<i>pls close the thread if ur issue solve, after mark ing all hlpful answers</i>
rgds
anver
if hlped pls mark points
Message was edited by: Anversha s
2006 Oct 29 7:34 AM
Hi Hagit,
In the field catalog don't set the edit property for the field. i.e fieldcat-edit = ' '.
Now add a column in your data table.
DATA : BEGIN OF GT_GRID OCUURS 0,
.
.<i>Your other columns</i>
.
.
CELLSTYLES TYPE LVC_T_STYL
END OF GT_GRID.
Now you have to check for conditions on which particular cell of a column will be editable...
DATA: LS_GRID LIKE LINE OF GT_GRID,
LS_STYLE TYPE LVC_S_STYL,
LT_STYLE TYPE LVC_T_STYL.
LOOP AT GT_GRID INTO LS_GRID.
<i>* CONDITION TO CHECK FOR ROW</i>
IF LS_GRID-FIELD1 = <CONDTION>.
INSERTING FIELD NAME IN STYLE TABLE. YOU CAN EVEN
CHECK FOR SOME CONDITION
LS_STYLE-FIELDNAME = 'FIELD1'.
LS_STYLE-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
APPEND LS_STYLE TO LT_STYLE.
ENDIF.
INSERT LINES OF LT_STYLE INTO LS_GRID-CELLSTYLES.
MODIFY GT_GRID FROM LS_GRID.
ENDLOOP.
Hope this helps you...
Enjoy SAP.
Pankaj Singh
2006 Oct 29 12:47 PM
Hi Pankaj,
I have tryed as you suggested, but when I execute the program I get a short dump TABLE_ILLEGAL_STATEMENT, it happens when trying to INSERT LINES OF LT_STYLE INTO LS_GRID-CELLSTYLES.
Any ideas?
Thanks,
Hagit.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |