on 11-02-2008 9:12 PM
hi
i have a master node and the master node in child node
i want to attain this child node for bind a internal table on a supply function
i use code wizard but error message : mainView.child absent on this page. . ..
my code :
Node_sflight = wd_Context->get_Child_Node( Name = 'lo_nd_child' ). -->error row
Node_sflight->Bind_Table( gt_tab ).
Thanks.
Hi Mesut,
I see that you are trying to get the reference of a node for binding some data to it. I see 2 things here.
1) You have mentioned your node name in lower case.
2) You seem to be passing some object reference to it by the way you have named your node starting with "lo"
You should always pass your node name in upper case like:
Node_sflight = wd_Context->get_Child_Node( Name = 'NODE1' ).
For every node you create in the context of a controller, a constant with the name WDCTX_<node name> is automatically created in the corresponding interface IG_<Controller_Name> and IF_<Controller_Name>. In the program source code for the controller, this constant can then be used instead of a string literal for the node name by using the reference to the local controller interface (WD_THIS attribute). Example:
wd_context->get_child_node( wd_this->wdctx_node_1 ).
instead of
wd_context->get_child_node( 'NODE_1' ).
The advantage of using constants is that the compiler knows the constant and, therefore, syntax errors are reported if the name of the context node contains typing errors. However, it is also possible to pass a string literal.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
this link my context type
[http://menstasarim.com/mmesut/res/state.jpg]
method fill_kirilim
data: gt_tab TYPE if_componentcontroller=>elements_KIRILIM,
gs_tab TYPE LINE OF if_componentcontroller=>elements_KIRILIM.
SELECT * INTO CORRESPONDING FIELDS OF gs_tab FROM zmstPA01.
gs_tab-nam = gs_tab-nam+2(5).
APPEND gs_tab to gt_tab.
ENDSELECT.
i add with code wizard
DATA lo_nd_root TYPE REF TO if_wd_context_node.
DATA lo_nd_mastern TYPE REF TO if_wd_context_node.
DATA lo_nd_child TYPE REF TO if_wd_context_node.
DATA lo_el_child TYPE REF TO if_wd_context_element.
DATA ls_child TYPE wd_this->element_child.
navigate from <CONTEXT> to <ROOT> via lead selection
lo_nd_root = wd_context->get_child_node( name = wd_this->wdctx_root ).
navigate from <ROOT> to <MASTERN> via lead selection
lo_nd_mastern = lo_nd_root->get_child_node( name =
wd_this->wdctx_mastern ).
navigate from <MASTERN> to <CHILD> via lead selection
lo_nd_child = lo_nd_mastern->get_child_node( name =
wd_this->wdctx_child ).
@TODO handle not set lead selection
IF lo_nd_child IS INITIAL.
ENDIF.
get element via lead selection
lo_el_child = lo_nd_child->get_element( ).
@TODO handle not set lead selection
IF lo_el_child IS INITIAL.
ENDIF.
wd_context->get_child_node( wd_this->wdctx_ lo_nd_child ).
Node_sflight = wd_Context->get_Child_Node( Name = 'LO_ND_CHILD' ).
Node_sflight->Bind_Table( GT_TAB ).
endmethod .
my code :
Node_sflight = wd_Context->get_Child_Node( Name = 'LO_ND_CHILD'' ). --> IT SHOULD BE IN CAPS.
Node_sflight->Bind_Table( gt_tab ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mesut,
Your question is not clear.What exactly you want to do,in which context node(master or child )supply function you want to bind the internal table.
Check this article about Context node in detail.You can also find about the supply fnction htps://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60730016-dbba-2a10-8f96-9754a865b814
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 | |
10 | |
7 | |
6 | |
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.