Application Development 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: 

To make a cell uneditable in ALV (really urgent)

Former Member
0 Kudos

Hi big abapers,

My requirement is to make a cell of ALV uneditable. Pleas give me an idea of that if anyway it is possible.

I anticipate for ur reply.

I assure you for giving full marks if you get my solution done.

Cheers,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check my blog

/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

7 REPLIES 7

Former Member
0 Kudos

BCALV_EDIT_05 is a perfect example for you

Former Member
0 Kudos

If you use fieldcatalog-edit = 'X' . -> this is editable

if you use fieldcatalog-edit = ''. -> this is uneditable

Thanks

Seshu

0 Kudos

hi yaar,

By this we can make a column editable or uneditable..

My interest is to make a cell of editable column.....uneditable..

i wish u understand..

If u've a doubt ....my id is ... pradeep.phogat@gmail.com

cheers

Former Member
0 Kudos

Hi,

data: ft_cat type lvc_s_fcat. " Create field catalog.

ft_cat-fieldname = 'MATNR'.

ft_cat-edit = 'X'.

endif.

This code helps you to edit a cell,

but if your question is to unedit a cell, change the value ft_cat-edit = 'X' to ft_cat-edit = ' ',

i.e., put a space over there.

Regards,

Pavan P.

Former Member
0 Kudos

hi pradeep,

while building the fieldcatalog, there is an option to make a cell editable.

ex:

FORM field_catalog_forkey1 USING p_lt_fct1 TYPE lvc_t_fcat.

DATA ls_fct TYPE lvc_s_fcat.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'XXXXXXXXXXXX'

CHANGING

ct_fieldcat = p_lt_fct1

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

LOOP AT p_lt_fct1 INTO ls_fct.

CASE ls_fct-fieldname.

WHEN 'STRUCNAME'.

ls_fct-key = 'X'.

MODIFY p_lt_fct1 FROM ls_fct.

WHEN 'FIELDNAME'.

ls_fct-edit = 'X'.

MODIFY p_lt_fct1 FROM ls_fct.

WHEN 'FKTYPE'.

ls_fct-edit = 'X'.

MODIFY p_lt_fct1 FROM ls_fct.

WHEN 'FKVAL'.

ls_fct-edit = 'X'.

MODIFY p_lt_fct1 FROM ls_fct.

WHEN OTHERS.

ls_fct-no_out ='X'.

MODIFY p_lt_fct1 FROM ls_fct.

ENDCASE.

ENDLOOP.

ENDFORM. " field_catalog_forkey1

regards,

prasanth

  • reward all helpful answers

Former Member
0 Kudos

check my blog

/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

Former Member
0 Kudos

Hi

Check this option: fieldcat-edit = 'X'

Regards

Gregory