cancel
Showing results for 
Search instead for 
Did you mean: 

Dump due to exception - CX_WD_CONTEXT

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Lekha,

I've checked everything...but I donno why the error is still persisting. The NODE2 does exist.

The issue is not solved.

Regards,

-Syed.

Former Member
0 Kudos

Hi,

What is the name of the node.

Is the node name correct. Are you using any ALV.

In which method you have written the code.

In the view where you haev this code, check the context.

Regards,

Lekha

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Have you checked the cardinality and set the initialization lead selection.

Or else do the Table biding again or delete the table and cretae it again.

One thing you do, delete this node and start it a refresh. Check if you still get the error.

Try usign the code wizard.

Regards,

Lekha.

Former Member
0 Kudos

This problem is solved.

Thanks for all your replies,

Regards,

-Syed.

Former Member
0 Kudos

Hi,

Cheers....

When things wnet wrong. How did you solve it.

Regards,

Lekha.

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

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