cancel
Showing results for 
Search instead for 
Did you mean: 

dump in CX_WD_CONTEXT

former_member305388
Active Contributor
0 Kudos

Hi,

I am getting the following dump in the standard program code, there is a z webdynpro program being used but how do I find the root cause?

Termination occurred in the ABAP program "CL_WDR_CONTEXT_NODE===========CP"

in "_RAISE_ELEMENT_NOT_FOUND".

Line SourceCde

1 method RAISEELEMENT_NOT_FOUND.

2 data: l_count type I,

3 l_node_name type string.

4

5 l_node_name = if_wd_context_node~get_path( ).

6

7 l_count = if_wd_context_node~get_element_count( ).

8 if l_count = 0.

>>>>> raise exception type cx_wd_context exporting textid = cx_wd_context=>NODE_EMPTY node_name = l_node_name.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The pasted code suggest me that you are doing it wrong.

if_wd_context_node~get_path( ). ? how do you get the instance of it?

normally i would do like

l_node = wd_context->get_child_node( name = 'name of the node here' ).

l_count = l_node~get_element_count( ).

former_member305388
Active Contributor
0 Kudos

Hi Baskaran,

This is the standard code where the dump is being shown in st22.

Former Member
0 Kudos

Then go lower in the stack and see where you access node(element). i think it is caused by zwebdynpro component.

former_member305388
Active Contributor
0 Kudos

Hi Bhaskaran,

Sorry but to check lower in stack as in the code before the dump occurs or the dump log in st22?

former_member305388
Active Contributor
0 Kudos

I am getting the dump in following place now after changing some on the values in webdynpro program,

1 method IF_WD_CONTEXT_NODE~SET_LEAD_SELECTION.

2

3 data:

4 cl_element type ref to cl_wdr_context_element.

5

6 if me->is_finalized = abap_true.

7 me->_temp_text = me->if_wd_context_node~get_path( ).

8 raise exception type cx_wd_context exporting textid = cx_wd_context=>finalized node_name

9 endif.

10

11 * check whether elements are supllied or not

12 if me->elements_supplied = ABAP_FALSE.

13 me->supply_elements( ).

14 endif.

15

16 cl_element ?= element.

17

18 read table me->collection transporting no fields with table key table_line = cl_element.

19 if sy-subrc <> 0 or element is initial.

20 tempText = me->if_wd_context_node~get_path( ).

>>>>> raise exception type cx_wd_context exporting textid = cx_wd_context=>invalid_lead_select

22 endif.

23

24 me->_set_lead_selection( sy-tabix ).

25

26 endmethod.

Former Member
0 Kudos

I am not sure what you have changed. Probably you try to set a Lead selection to a node which has no elements at all.

Explain more about your webdynpro and post you code which is called just before dump.