on 10-02-2013 4:19 PM
Hi all gurus; I'm struggling over a simple task, hope that someone could help .
Shortly: I defined a data structure as follows:
DATA: BEGIN OF ls_struct,
vendor TYPE bbp_bp_orga,
cptable TYPE zebp_contpers_t, "this is a Table Type!
END OF ls_struct,
lt_struct LIKE TABLE OF ls_struct.
So, there's a table lt_struct with a line that is build up by:
- a "flat" field;
- an internal table (made up by some fields).
I need to TRANSPORT these information from one view to another using a common Context Node shared via ComponentController.
I then tried to create such a node in the Context but there's something I must have done wrong:
Here's my sketch:
CP_FOR_BIDDERS has no Dictionary structure; here's the subnode CPTABLE:
I tried then to store the values in these nodes in my methods:
IF lt_struct IS NOT INITIAL.
DATA lo_nd_cp_for_bidders TYPE REF TO if_wd_context_node..
lo_nd_cp_for_bidders = wd_context->get_child_node( name = wd_this->wdctx_cp_for_bidders ).
CALL METHOD lo_nd_cp_for_bidders->bind_table
EXPORTING
new_items = lt_struct
* set_initial_elements = ABAP_TRUE
* index =
.
However, if I try then to GET the values from the node, I can see only VENDOR values, while the associated internal table is always blank.
What am I missing?
Thanks in advance
Hi Matteo,
You also want to bind the CPTABLE node for each CP_FOR_BIDDERS element. One example is below; you can also loop through the table of elements for node CP_FOR_BIDDERS, fetch each element's CPTABLE node and bind the CPTABLE data to each CPTABLE node.
lo_nd_cptable = wd_context->path_get_node( path = `CP_FOR_BIDDERS.CPTABLE` ).
CALL METHOD lo_nd_cptable>bind_table(
new_items = lt_cptable_data
set_initial_elements = abap_true
).
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.