on 06-02-2009 11:54 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Issue solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The issue is solved
Edited by: Subash Mohanvel on Jun 19, 2009 9:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.