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: 

how to make fields editable in an alv tree

Former Member
0 Kudos

hi

there is an alv grid for which tree view shud also be made. The cells that are editable in the grid should also be editable in the tree.

please let me know how to make the specific cells of the tree editable

5 REPLIES 5

Former Member
0 Kudos

It should be controlled through the tree's field catalgoue. LVC_S_FCAT-EDIT = 'X' just as it is with the ALV grid..

0 Kudos

after setting the edit field in the field catalogue its bot working.

i am posting the code snippet.

please let me know what else should be done and how to add INPUT field to the fieldcat.

field-symbols: <fs_fieldcat> type lvc_s_fcat.

data: l_tabix type sy-tabix.

data: g_fieldcatalog type lvc_t_fcat,

wa_fcat like line of g_fieldcatalog.

data : hide type c value 'X'.

call function 'LVC_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'RSTHIE_M'

i_client_never_display = 'X'

i_bypassing_buffer = 'X'

CHANGING

ct_fieldcat = g_fieldcatalog.

***-set table header on middle width

LOOP AT g_fieldcatalog ASSIGNING <fs_fieldcat>.

<fs_fieldcat>-FIX_COLUMN = 'X'.

<fs_fieldcat>-edit = 'X'.

ENDLOOP.

Former Member
0 Kudos

Hi,

below snippet is correctly matches for ur reqirement

DATA: celltab TYPE lvc_s_styl.

REFRESH pt_celltab.

IF p_mode EQ text-103.

*§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell

  • to status "editable".

celltab-fieldname = c_character1.

celltab-style = cl_gui_alv_grid=>mc_style_enabled.

celltab-style2 = cl_gui_alv_grid=>mc_style_f4.

INSERT celltab INTO TABLE pt_celltab.

*reward the points if it useful

regards

Former Member
0 Kudos

Hi,

Check those program start with BCALV............

in your abap editor..

You may get some sample programs in it.

Thanks and reward if it is useful to you.

Former Member
0 Kudos

In the fieldcat ... add two fields...

Input = 'X'.

and EDIT = 'X'.

Please read Type pool slis for correct fieldcalalog decr.

Regards,

Jayant