on 08-03-2010 2:30 AM
Hi Guru
I have a node with subnode with no singleton. I'm able to display dropdown (using index) in table (not ALV) using subnode. After the user selects dropdown and enters values in other columns, I have to capture all the values in table including dropdown in background. If I read the node using get_static_attributes_table, I'm able to capture the entire table except dropdown as its populated thru subnode. Please let me kow how can I capture everything in a single shot.
Your help will be appreciated.
David.
With a ByIndex field in there you won't be able to read everything "in a single shot" - as you say. The ByIndex will store its value via the leadSelection of the subnode. You will need to read the majority of the values from the attributes of the main node and this one via the leadSelection of the sub node.
If you want everything condensed into one node, consider the DropDownByKey instead. It places its selected value key into an attribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hey Thomas,
>
> Thanks for your response. Would be great if you can provide sample code for this.
>
> Thanks,
> David.
For what? Reading the subnode by Lead Selection?
For that you just need to get the element set of the parent table. Then loop through this element set and read the subnode for each parent element.
data lr_nd_course_assign type ref to if_wd_context_node.
data lr_nd_course_ass_att type ref to if_wd_context_node.
lr_nd_course_assign = wd_context->path_get_node( path = `COURSE_DETAILS.COURSE_ASSIGN` ).
data lt_assign_elements type wdr_context_element_set.
field-symbols: <ls_element> like line of lt_assign_elements.
lt_assign_elements = lr_nd_course_assign->get_elements( ).
loop at lt_assign_elements assigning <ls_element>.
lr_nd_course_ass_att = <ls_element>->get_child_node(
name = wd_this->wdctx_course_ass_att ).
"do your processing on the leadSelection element of the child node now that you have its reference.
endloop.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.