02-13-2007 8:55 AM
Hi,
I have a ALV grid where I have a column as a editable. Now the problem is ALV grid is displaying 2 rows and only first line should be editable. Any idea how to do.
KK.
02-13-2007 9:00 AM
Hi,
Check out the program BCALV_EDIT_02 in the SLIS package. Input enabling is done at the cell level.
Regards,
Beejal
**Reward if this helps
02-13-2007 9:22 AM
Hi,
In this display defualt list is coming as display, in my case its input enabled .
KK.
02-13-2007 9:27 AM
Hello Krishna,
Probably you have made one of the columns editable through field catalog.You can make cells editable as per your requirement and not the entire column.
Regards,
Beejal
02-13-2007 9:30 AM
02-13-2007 9:39 AM
Hello Krishna,
I havent tried this before.What I suggest is that in the field catalog,dont make the columns editable as shown below:
ls_fcat-fieldname = 'CONNID'.
ls_fcat-ref_table = 'SPFLI'.
<b>ls_fcat-edit = ' '.</b>
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
Now use the demo program given in my first post and modify only the cells that you need to change.
Hope this works.
Regards,
Beejal
02-13-2007 9:30 AM
02-13-2007 9:34 AM
I THINK YOU CAN MAKE A FULL COLUMN EDITABLE THAT IS A FIELD IN ITAB.
IN FIELDCATALOG
JUST ADD THE CODE
WFIELDCAT-EDIT = 'X'.
FOR THAT PERTICULAR FIELD NAME.
02-13-2007 9:56 AM
Hi,
1. * Type of final output table
TYPES : BEGIN OF ty_output.
INCLUDE STRUCTURE zjay_alv.
For cell editing and displaying cell as push button
TYPES : <b>cellstyles TYPE lvc_t_styl</b> ,
END OF ty_output.
data itab2 TYPE STANDARD TABLE OF ty_output.
2. w_layout-stylefname = 'CELLSTYLES' ."
3. CLEAR : wa2, w_style.
READ TABLE itab2 INTO wa2 index 2.
IF sy-subrc EQ 0.
w_style-fieldname = 'ERSDA'.
w_style-style = cl_gui_alv_grid=>mc_style_disabled.
REFRESH wa2-cellstyles.
APPEND w_style TO wa2-cellstyles.
MODIFY itab2 FROM wa2 TRANSPORTING cellstyles
WHERE matnr = wa2-matnr.
ENDIF.
4. CALL METHOD o_grid->set_table_for_first_display
EXPORTING
....
is_layout = w_layout
CHANGING
it_outtab = itab2
it_fieldcatalog = i_fieldcat.
Kindly reward points by clicking the star on the left of reply,if it helps.