‎2007 Aug 30 8:47 AM
Hi Gurus,
I am prepared the ALV code using custom container to display the fields in the output and to edit the field values in the output. Totally I am displaying 10 fields in the output among those 10 fields only 4 fields I want to display in edit mode remaining fields I want to display in grey mode I mean in non editable mode. I am using the following code for the fields which I want to display in grey mode but it is giving dump and the error message is Error inserting into or changing a sorted table and the error analysis is as shown below.
You tried to insert or change a line at position 2 in the internal
table "\PROGRAM=YTESTING_ONLINE_GOODS_RECIEPT\DATA=WA_OUTPUT-FIELD_STYLE" (of
the kind SORTED_TABLE).
This violated the sort sequence of the table, which was laid down when
the table was declared.
The following code I have written.
FORM set_specific_field_attributes .
DATA: gv_stylerow TYPE lvc_s_styl.
DATA: gv_styletab TYPE lvc_t_styl.
LOOP AT it_output INTO wa_output.
gv_stylerow-fieldname = 'AUFNR'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
MODIFY it_output FROM wa_output.
gv_stylerow-fieldname = 'RUECK'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
gv_stylerow-fieldname = 'KUNNR'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
MODIFY it_output FROM wa_output.
gv_stylerow-fieldname = 'NAME1'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
MODIFY it_output FROM wa_output.
*
*
gv_stylerow-fieldname = 'MATNR'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
MODIFY it_output FROM wa_output TRANSPORTING field_style.
gv_stylerow-fieldname = 'MAKTX'.
gv_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gv_stylerow TO wa_output-field_style.
MODIFY it_output FROM wa_output TRANSPORTING field_style.
ENDLOOP.
Please help me where I done mistake.
Thanks a lot.
‎2007 Aug 30 8:53 AM