on 03-28-2011 10:08 AM
Hi ,
I have a table displaying some PO order details. In the last column , I have a field with element Link to Action . My requirement is , that when I click on the link to action column of specific row , I want to get the data present( specifically the the data present on the first column which is PO number) i that specific row.
How can i get this data?
Regards
PG
Hi PG,
The onAction event of link to action UI element has a paramater CONTEXT_ELEMENT
which holds the reference of the element on which action has been performed.
Use that paramater to read all the attributes of the context node...(which will give you the PO number) of the selected row.
Thanks,
Aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks to all.
Regards
PG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi PG,
If you want to get Selected row data, you can use get_selected_elements
Try this example code.. this gives you selected records into one table..
DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
DATA ls_et_postab_1 TYPE wd_this->Element_et_postab_1.
DATA lt_et_postab_1 TYPE wd_this->Elements_et_postab_1.
DATA: wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set.
navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
CALL METHOD lo_nd_et_postab_1->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_et_postab_1.
append ls_et_postab_1 to lt_et_postab_1.
CLEAR ls_et_postab_1.
ENDLOOP.
lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).
NOW LT_ET_POSTAB_1 Contains selected records in table.
Hope it helps...
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You will get the index by method 'GET_INDEX' of the parameter CONTEXT_ELEMENT (type IF_WD_CONTEXT_ELEMENT) of the event method parameter . I hope u have already created the Event method for the UI element LinkToAction
Regards
Shaira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Whenever you click on the UI element i.e. link to action you create a method.
This method has WDEVENT has importing parameter.
This WDEVENT have a parameter called CONTEXT_ELEMENT( Of type IF_WD_CONTEXT_ELEMENT).
Use GET_STATIC_ATTRIBUTES of this paramer to get that complete row values.
Regards,
Madhu
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 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.