cancel
Showing results for 
Search instead for 
Did you mean: 

Edit few fields in an ALV table

Former Member
0 Kudos

Hi,

I am working on a table maintenance kind of application using ABAP web dynpro.

I have created an application using ALV, and also I could make all columns as editable.

But, I want to edit only 4 fields out of 7 in a row, when the same row is selected. Not all the columns in editable mode.

Also I want to default some of the fields which are grayed out in the same row. How to default them?

Could anyone help me about how to do this?

Thanks.

Sreekanth

View Entire Topic
Former Member
0 Kudos

Hi Sreekanth,

For this type of scenarios, in the WDDOINIT of your view make all the fields readonly.

Next, OnLeadSelect event of ALV, you need to write the code where it enables the few of your fields in edit mode and others as non editable.

How to generate a OnLeadSelect event?

1) For this, Create a eventhandler under methods tab of your view.

2) Besided the method you will be having some other columnns like Event name and component controller etc.

Press F4 and select the OnLeadSelect event of SALV_TABLE component controller.

This makes you ALV to register for OnLeadSelect event.

What code to be writtenn in that?

1) Declare the references to the ALV interfaces.

2) Get the current model of the ALV

3) Now get all the columns of the ALV into an internal table.

4) Loop all the columns now, and based on the column, call method set_cell_editor as TRUE.

How to Default values of the cell.

Here When you create a node and its attributes, Under the properties of the attributes, write the Default value and save the context.

I hope i have cleared all the points, and All the Best..

Regards,

Shashikanth. D