Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV one cell editable

Former Member
0 Likes
2,136

Hi,

How can I make one cell in a ALV control editable?

Is it possible to do so by specifying the column and row index to do this?

The BCALVEDIT* programs tend to allow columns editable, but not demonstrate down to a cell level.

Thanks.

Michael

Hi,

How can I make one cell in a ALV control editable?

Is it possible to do so by specifying the column and row index to do this?

The BCALVEDIT* programs tend to allow columns editable, but not demonstrate down to a cell level.

Thanks.

Michael

2 REPLIES 2
Read only

mbiwer
Associate
Associate
0 Likes
1,004

Hi Michael,

you can do this as follows:

- in your ALV-structure you need a (technical) field of the type LVC_T_STYL. You can define the name of the field as you desire, e.g. CELLTAB.

- the layout structure of the ALV of type LVC_S_LAYO has a field named STYLEFNAME. You must fill this field with the name of your table, in our example CELLTAB: ls_layout-stylefname = 'CELLTAB'.

- to define the style for a cell or a row in your ALV you must fill the CELLTAB of the respective row. The type LVC_S_STYL has two fields: FIELDNAME and STYLE; if you want the style only for a cell you must fill the field FIELDNAME with the name of the respective field in your ALV-structure. If you want the style for the whole row, you can leave the field FIELDNAME blank. For the several styles of the ALV-Grid have a look at the member variables of the ALV-Grid named MC_STYLE*. The editable / not_editable styles are MC_STYLE_ENABLED and MC_STYLE_DISABLED, respectively.

Hope this helps ...

best regards,

Michael

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,004

Hi

Just to make Michael Biwer's solution procedure clearer, have a look to the thread at the URL (despite its subject line, there is the procedure to make editable fields)

*--Serdar