on 06-09-2009 2:49 PM
Dear Gurus,
While executing the below mentioned code, i'm getting the dump.
DATA: l_node TYPE REF TO if_wd_context_node,
l_element TYPE REF TO if_wd_context_element,
l_prop TYPE wdr_context_prop_for_node,
l_props TYPE wdr_context_prop_for_node_tab.
l_node = wd_context->get_child_node( wd_this->wdctx_node2 ).
l_node->get_attribute_props_for_node(
IMPORTING
properties = l_props ).
l_count = l_node->get_element_count( ).
And the Short Dump is :
An exception occurred which is explained in detail below.
The exception, which is assigned to class 'CX_WD_CONTEXT', was not caught and
therefore caused a runtime error.
The reason for the exception is:
Value 1 is not a valid index; context node: COMPONENTCONTROLLER.1.NODE2
Kindly requested to correct the code if I'm wrong.
Regards,
-Syed.
Hi,
DATA: l_node TYPE REF TO if_wd_context_node,
l_element TYPE REF TO if_wd_context_element,
l_prop TYPE wdr_context_prop_for_node,
l_props TYPE wdr_context_prop_for_node_tab.
l_node = wd_context->get_child_node( wd_this->wdctx_node2 ). - NAME of the NODE in the current view
if l_node is bound.
l_node->get_attribute_props_for_node(
IMPORTING
properties = l_props ).
l_count = l_node->get_element_count( ).
endif.
Is you context declared in Comp. Controller or in the view conttext. If created in Comp.Contr then delete the node in the view and map it in view again.
I think there is no node named NODE2 in the view context or mioght be the changes not reflected properly in the view.
First make the necessary changes to the Comp.Contr context for this node then map it to theview context again.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lekha,
You are perfectly right. I changed the structure of the node at the Component Controller, updated mapping under the view context. Still it seems there is some error. But I strongly hope there should be something related to the mapping some where.
I'll check the same.
But thanks to the reply so correctly.
Regards,
-Syed.
Hi Lekha,
The name of the node for which the table data is being displayed is - NODE2
The node name for all the properties of the context node of type WDR_CONTEXT_PROP_FOR_NODE is CPROPS.
The method name is GET_PROPERTIES. You can refer to the code of WDR_TEST_CTXT_PROPERTIES under PROPERTIES_NODE view.
If you see the code is quite similar. Because I'm implementing the similar logic.
Please check the same.
Regards,
-Syed.
Hi Lekha,
Actually, there is a mismatch of the Value Node with the Properties node. That is what has happend.
But if we are constantly working on an object, it is a common tendency for every developer that he might not concentrate on the minor things.
This is what has happend to me.
Cheers,
Regards,
-Syed.
Hi Syed,
Instead of l_node = wd_context->get_child_node( wd_this->wdctx_node2 ).
try giving it as
l_node = wd_context->get_child_node( name = if_YOUR VIEW NAME=>wdctx_node2 ).
Regards
Sarath
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.