on 01-18-2010 8:17 AM
Hi all,
I need to set some values in table control for the fields where i clicked the cursor. Actually i am using the below code but its not working...
lo_el_zdcapsc = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lv_sel_index = lo_el_zdcapsc->get_index( ).
lo_nd_zdcapsc->set_attribute(
EXPORTING
index = lv_sel_index
name = `ZPLANTID`
value = lv_plant ).
For example I placed the cursor in 3 row at the plant column in my table control. So only 3 row plant value has to be set.
Can anybody tell me how to read the index when a cursor is placed at a particular row.
Regards
Sireesha.
Hi Sireesha,
You are doing right, just remove following line from your code when you are setting attribute.
index = lv_sel_index
You will get desired functionality.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
Thanks for prompt reply..
I am getting the value for the below code...So its null in lo_el_zdcapsc . How can i read the row where a cursor is placed ( without leadselection)
lo_el_zdcapsc = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
Please suggest me on this....
Regards
Sireesha.
If you are using any UI which has an action associated (example: linktoaction) with UI, then write the code in the onAction of that UI which you are using (without the line which I have told you). if you do not want to use UI which does not have action associated with that then you have to use lead selection only.
Regards,
Rohit
hi
u can use get_index method to get the index of the particular row selected
data: lr_element type ref to if_wd_context_element.
DATA ls_cn_node TYPE wd_this->element_cn_node.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
* get all declared attributes
lr_element->get_static_attributes(
IMPORTING
static_attributes = ls_cn_node ).
data lv type I.
lv = lr_element->GET_INDEX( ).
u have got the table row values in a strucure , now u can set it to new value
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.