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: 

Adding editable rows to ALV ..

Former Member
0 Kudos
157

I am working on ALV GRID , HAVING 7 COLUMNS.

I used field catalog to make the last 3 columns as editable fields and rest are non-editable.

But now i want to add new rows to ALV with all fields Editable.

kindly provide me the solution.

Thanks

surbhi

7 REPLIES 7

Former Member
0 Kudos
118

Hi,

You can add some condition to make the field catalogue editable.

I mean you set all fields as editable and keeping 3 non editable and others editable based on a condition.

Regards,

Subhashini

Former Member
0 Kudos
118

Hi Subhashini,

can you please give me the sample code.

0 Kudos
118

data w_fieldcat_ds type lvc_s_fcat.

refresh t_fieldcat[].

w_fieldcat_ds-fieldname = 'FIELD1'.

w_fieldcat_ds-coltext = 'FIELD1'.

w_fieldcat_ds-outputlen = 5.

append w_fieldcat_ds to t_fieldcat.

clear w_fieldcat_ds.

w_fieldcat_ds-fieldname = 'FIELD2'.

w_fieldcat_ds-coltext = 'FIELD2'.

w_fieldcat_ds-outputlen = 5.

append w_fieldcat_ds to t_fieldcat.

clear w_fieldcat_ds.

w_fieldcat_ds-fieldname = 'FIELD3'.

w_fieldcat_ds-coltext = 'FIELD3'.

w_fieldcat_ds-edit = 'X'. "<----


Editable

w_fieldcat_ds-outputlen = 5.

append w_fieldcat_ds to t_fieldcat.

clear w_fieldcat_ds.

w_fieldcat_ds-fieldname = 'FIELD4'.

w_fieldcat_ds-coltext = 'FIELD4'.

w_fieldcat_ds-edit = 'X'. "<----


Editable

w_fieldcat_ds-outputlen = 5.

append w_fieldcat_ds to t_fieldcat.

clear w_fieldcat_ds.

Hope this helps.

Former Member
0 Kudos
118

check the report bcalv_test_grid_editable

Former Member
0 Kudos
118

check the report bcalv_test_grid_editable

Former Member
0 Kudos
118

HI,

I am also having the same problem ,

Could you please provide me with the solution

Former Member
0 Kudos
118

Hi

check these demo programs which will certainly help you.

BCALV_FULLSCREEN_GRID_EDIT

BCALV_GRID_EDIT

BCALV_TEST_GRID_EDIT_01

BCALV_TEST_GRID_EDITABLE