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 a alv tree item editable?

Former Member
0 Kudos

hi

i create an alv tree and want to make the tree node editable, how to do that? i have check the sap example such as 'SAPCOLUMN_TREE_CONTROL_DEMO

' and 'BCALV_TREE*' but found no solution.

if set lvc_s_fcat-checkbox = 'X' lvc_s_fcat-edit = 'X' ,it can work, the checkbox can be edited,but if the field is a text ,even i set lvc_s_fcat-edit = 'X' ,it doesn't work .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

good

try this

DATA WA_LAYOUT TYPE LVC_S_LAYO.

WA_LAYOUT-EDIT = 'X'.

WA_LAYOUT-GRID_TITLE = 'GRID CONTAINER FOR MATERIAL DISPLAY - EDITING'.

WA_LAYOUT-NO_TOOLBAR = 'X'.

WA_LAYOUT-ZEBRA = 'X'.

WA_LAYOUT-SEL_MODE ='A'.

CALL METHOD MAIN_ALV->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_LAYOUT = WA_LAYOUT

CHANGING

IT_OUTTAB = IT_MATL

IT_FIELDCATALOG = IT_FCAT.

reward point if helpful.

thanks

mrutyun^

2 REPLIES 2

sagarmehta
Product and Topic Expert
Product and Topic Expert
0 Kudos

hi liu,

i am sorry i dont know if this helps or not but... u cannot make changes to text elements in ALV tree... changes to check boxes are allowed but (dynamic)text label changes aren't allowed..

regards,

sagar.

Former Member
0 Kudos

hi

good

try this

DATA WA_LAYOUT TYPE LVC_S_LAYO.

WA_LAYOUT-EDIT = 'X'.

WA_LAYOUT-GRID_TITLE = 'GRID CONTAINER FOR MATERIAL DISPLAY - EDITING'.

WA_LAYOUT-NO_TOOLBAR = 'X'.

WA_LAYOUT-ZEBRA = 'X'.

WA_LAYOUT-SEL_MODE ='A'.

CALL METHOD MAIN_ALV->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_LAYOUT = WA_LAYOUT

CHANGING

IT_OUTTAB = IT_MATL

IT_FIELDCATALOG = IT_FCAT.

reward point if helpful.

thanks

mrutyun^