on 10-21-2009 12:24 PM
Hi,
I have a table control and the table has values.
I want to store the lead selected values of this table into a local structure.
How do i read the lead selected values of this table?
hi,
1. Just read the node using code wizard (control + F7 ).
Refer the Code :
DATA lo_nd_fileup TYPE REF TO if_wd_context_node.
DATA lo_el_fileup TYPE REF TO if_wd_context_element.
DATA ls_fileup TYPE wd_this->element_fileup.
navigate from <CONTEXT> to <FILEUP> via lead selection
lo_nd_fileup = wd_context->get_child_node( name = wd_this->wdctx_fileup ).
get element via lead selection
lo_el_fileup = lo_nd_fileup->get_element( ).
get all declared attributes
lo_el_fileup->get_static_attributes(
IMPORTING
static_attributes = ls_fileup ).
ls_fileup is your structure holding the values of Lead Selected index.
FILEUP is my node whose lead selection index needs to be read.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go to the code wizard and read the node which is binded to the table UI element.
It will give you the lead selected value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
u can do it thru code wizard
u must have created a context node in the context tab of ur view and different context attributes under it.
1 Go to code wizard or Press CONTROL + F7
2 Select the radio butto read context node/attribute
3 to read a single context attribute under ur context node , choose the attribute and press enter
4 to read the entire context node / structure , seect the context node and press enter
thus u wud get the value from LeadSelect in ur table row .
in ur case , u need to select the context node and press enter
** reading context node cn_table
DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
lo_el_cn_table TYPE REF TO if_wd_context_element ,
ls_cn_table TYPE wd_this->element_cn_table.
*
** navigate from <CONTEXT> to <CN_TABLE> via lead selection
lo_nd_cn_table = wd_context->get_child_node(
name = wd_this->wdctx_cn_table ).
*** get element via lead selection
lo_el_cn_table = lo_nd_cn_table->get_lead_selection( ).
lo_el_cn_table->get_static_attributes( IMPORTING
static_attributes = wa_table ).
for my specific example , I am reading the context node cn_node , and the values are stored in the corresponding work area
wa_table. I have declared wa_table like this :
DATA : wa_table type str_table .
// str_table is a structure which contains variable as like context attributes under my node cn_node
ls_cn_table is also the same structure , so u can do it like this as well
*** get element via lead selection
lo_el_cn_table = lo_nd_cn_table->get_lead_selection( ).
lo_el_cn_table->get_static_attributes( IMPORTING
static_attributes = ls_cn_table ).
regards,
amit
Edited by: amit saini on Oct 21, 2009 1:27 PM
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 | |
10 | |
9 | |
6 | |
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.