on 10-05-2009 5:06 PM
Hi all,
I have a requirement where, there is a cell that need to be disabled when any 1 of the 2 field has 'X'.
Simply explain my logic below
If field 2 or field 3 eq X, then field 1 should be disabled. otherwise editable.
Does anyone have an idea on how i can do this? i tried "lr_input->set_read_only_fieldname( value = 'NEW_CLAIMS_MODE' )"
but it only works for one field. My new requirement is i need the Field 1 to be editable only when both Field 2 and Field 3 is blank.
Please advice.
Thank you
-V-
You can only bind to a single attribute to determine the Read Only mode. Suggestion: create one new attribute dedicated to the read-only status of field #1. Then write logic that tests the values in Field #2 and Field #3 to set the value of this dedicated read-only status attribute field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Now your node (to which the alv is bound) has 3 attributes In addtion to this have READ)ONLY(wdy_boolean) to this node.
Now, In the column settings for this ALV, For Field1(get_column reference) and create a input field and use theSET_READ_ONLY_FIELDNAME( 'READ_ONLY' ) use this code.
Now,
Implement the Onclick event of the ALV.
In this event -
loop at lt_table into ls_table.
if ls_table-field2 eq 'X' or ls_table-field3 eq 'X'.
ls_table-read_only = abap_false. "editable
else.
ls_table-rad_only = abap_true. "Noneditable
modify lt_table from ls_table index sy-tabix.
endif.
lr_node->bind_table( lt_table).
endloop.
Initially when you display the table, you can use the same code as above.
Hope this is clear.....
Regards,
Lekha.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.