on 07-20-2011 6:31 PM
Hello Friends,
I am customizing a standard WDA Component. When the user clicks a button on the screen, a new table row is created. When this table row is created, I need to focus the cursor in a table cell (DropDownByIndex type).
I am using the following code to place the cursor, after getting the row index:
DATA lt_receipts TYPE if_receipts=>elements_receipts.
lo_node_receipts->get_static_attributes_table( IMPORTING table = lt_receipts ).
READ TABLE lt_receipts TRANSPORTING NO FIELDS WITH KEY exp_type = ''.
IF sy-subrc = 0.
"An initial element exists already => Set lead selection
lo_node_receipts->set_lead_selection_index( index = sy-tabix ).
ELSE.
"Create new initial element
ro_elem_receipt = lo_node_receipts->create_element( ).
lo_node_receipts->bind_element( new_item = ro_elem_receipt set_initial_elements = abap_false ). "Append new element
wd_this->supply_receipt_elem( io_elem_receipt = ro_elem_receipt is_receipt = wd_this->ms_default ). "Fill with default values.
"Set lead selection
DATA lv_index TYPE i.
lv_index = ro_elem_receipt->get_index( ).
wd_this->select_receipt( iv_index = lv_index ).
ENDIF.
'' Set cursor on table cell
ro_elem_receipt->set_attribute(
name = `EXP_TYPE_NAME`
value = 'ABAP_TRUE' ).
I am unable to get the cursor to be placed on the field. Can you please correct the mistake in my code.
Regards,
John.
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.