on 05-07-2010 10:19 AM
Hi experts,
I have a table in my view and the table have some records, I select one of the record and hit the button on 'Modify', then I want two field of the selected record to be input ready. is it possible to do this?
Because I tried some ways that told in the forums but faild to got the index of the record that I selected in table.
I unchecked the checkbox of 'Initialization Lead Selection' of the node which the table is binded, and found when I use the method of
lead_selection_index = lo_nd_node_materialnum->get_lead_selection_index( ).
the index I got is always 2-....no matter which record I selected..
How to locate which row of the table that I'm seleted?
Please help me on this..
Thanks for your time!
Anna
You can have the cell variiant and have input filed , text view.
Based on the requirement you put the active cell variant.
Regards,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I realized why the index is not correct, I define a event in property 'onSelect' of the table
and then use code wizard to read the node that the table is bonded.
Then I could get the correct record.
But I still have a problem....
When I select a record of the table, I want two fields of the selected record to be input ready, these two fields of other records is still read-only.
How could I do this?
Please help
Thanks!
Anna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I the event that you are getting your element, update an attribute of that element of type WDY_BOOLEAN - set this element to abap_false.
Bind this attribute to the readOnly property of the two input fields that you want to enable.
in the creation of your context, set this attribute equal to abap_true.
your event now should trigger the "enabling" of the two fields.
Anna - myinfo is the following, please replace with your info:
ALV component use = ALV_PREAWARD
attribute inside node that is binded to the ALV = ZZRR_BUYER_REAMRKS
the attribute is the column I want as input field in my ALV.
DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
l_col_name TYPE string,
lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lt_columns TYPE salv_wd_t_column_ref,
ls_column TYPE salv_wd_s_column_ref,
l_value_column_new TYPE REF TO cl_salv_wd_config_table,
lr_column TYPE REF TO cl_salv_wd_column,
lr_cmp_usage TYPE REF TO if_wd_component_usage.
lr_cmp_usage = wd_this->wd_cpuse_alv_preaward( ).
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
lt_columns = l_value_column->if_salv_wd_column_settings~get_columns( ).
LOOP AT lt_columns INTO ls_column.
l_col_name = ls_column-r_column->get_id( ).
IF l_col_name EQ 'ZZRR_BUYER_REMARKS'.
lr_column_settings ?= l_value_column_new.
lr_column = lr_column_settings->get_column( 'ZZRR_BUYER_REMARKS' ).
CREATE OBJECT lr_input_field
EXPORTING
value_fieldname = 'ZZRR_BUYER_REMARKS'.
lr_column->set_cell_editor( lr_input_field ).
ELSEIF l_col_name EQ 'YOUR OTHER FIELD NAME THAT YOU WANT TO BE INPUT FIELD'
* DO THE SAME AS ABOVE
ENDIF.
ENDLOOP.
Hope this help!
Jason PV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.