cancel
Showing results for 
Search instead for 
Did you mean: 

disabling fields(Make the field as non-editable) in webdynpro ALV

Former Member
0 Kudos

HI All,

I have a requirement in the ABAP webdynpro where I have to disable(Make the field as non-editable) the field(or that ALV cell alone) in the ALV after the user has inputed in that field.

Is it possible, if yes, could you please give me some sample code , or links to which I can refer to.

Thanks for your help.

Regards,

Subash M

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Radhika/All,

In my application I dont have a field "EDITABLE" in the same node , but there is another node which has a field "READ_ONLY" field.

Also Iam able to set the field as disabled. So when I enter the first entry , the system validates and in the modify view I have disabled. THis is working welll for the first entry.

But after this when I enter the next entry, even before the

validation completes, the field becomes disabled.

Can you please tell me how to tackle this. Any suggestions or some sample code would really help.

Thanks,

Subash M

Former Member
0 Kudos

Hi,

As you want the cells in your ALV to be disabled/enabled, you will have to create the attribute to bind the readonly property under the same node that is bound to ALV.

Also ViewModify is not the right place to put your code in this scneario, as viewmodify will be triggered each time an event is occured. Hence even before you validate; your fields are disabled.

Kindly follow my earlier reply in this thread and implement onCellAction even and plac ethe code for disabling the fields.

Radhika.

Edited by: Radhika Vadher on Jun 15, 2009 8:04 AM

Former Member
0 Kudos

Hi Radhika,

Iam still not able to acheive the results. Since Iam new to this area I missing out on some thing . Iam not sure on how to acheive it. Is it possible for you to call me in 080 4139 9234 . Your help will

definetly go a long way . Thanks you in advance.

Regards,

Subash M

Former Member
0 Kudos

Could you tell me at which point you are stuck. What is the problem that you are facing ?

Radhika.

Former Member
0 Kudos

Hi Radhika,

Your proposed solution worked. Thanks a lot for your timely help.

Regards,

Subash M

Answers (4)

Answers (4)

Former Member
0 Kudos

Issue solved

Former Member
0 Kudos

The issue is solved

Edited by: Subash Mohanvel on Jun 19, 2009 9:50 AM

Former Member
0 Kudos

Hi,

Use the following approach :

1. Create an ALV and create an inputfield cell editor for the column that you want to make editable/disable.Refer this tutorial for creating an [Editable ALV|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]

2. Now under the same node create an attribute EDITABLE type boolean and bind this to the readonly property of the input field. Include the following code while creating Input field for binding.

lr_input_field->set_read_only_fieldname( 'EDITABLE' ).

3. Now implement the onDataCheck event or OnCellAction event and pass abap_true to this attibute to make the cell readonly/disable.Refer this tutorial for [Events in ALV|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8]

Hope this helps.

Regards,

Radhika.

Former Member
0 Kudos