cancel
Showing results for 
Search instead for 
Did you mean: 

CX_WD_CONTEXT runtime error.

Former Member
0 Kudos

Hello Experts:

I am getting the following runtime error:

"The exception 'CX_WD_CONTEXT' was raised, but it was not caught anywhere along

the call hierarchy.

Since exceptions represent error situations and this error was not

adequately responded to, the running ABAP program

'CL_WDR_CONTEXT_NODE_VAL=======CP' has to be

terminated."

Error analysis

An exception occurred which is explained in detail below.

The exception, which is assigned to class 'CX_WD_CONTEXT', w

therefore caused a runtime error.

The reason for the exception is:

Invalid index 2 when setting lead selection; context node:

V_AO_SOCO_GAF_3.1.REVIEW.1.REVIEW_HEADER.1.TRANS_TYPE_DRPDWN

Information on where terminated

Termination occurred in the ABAP program "CL_WDR_CONTEXT_NODE_VAL=======CP" -

in "IF_WD_CONTEXT_NODE~SET_LEAD_SELECTION_INDEX".

The main program was "SAPMHTTP ".

In the source code you have the termination point in line 15

of the (Include) program "CL_WDR_CONTEXT_NODE_VAL=======CM014".

SOURCE CODE EXTRACT

method IF_WD_CONTEXT_NODE~SET_LEAD_SELECTION_INDEX .

if me->is_finalized = abap_true.

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

raise exception type cx_wd_context exporting textid = cx_wd_context=>finalized node_name = me->_temp_text.

endif.

  • check whether elements are supllied or not

if me->elements_supplied = ABAP_FALSE.

me->supply_elements( ).

endif.

if index > lines( collection ) or index < if_Wd_context_Node~No_Selection.

tempText = me->if_wd_context_node~get_path( ).

>>>>> raise exception type cx_wd_context exporting

textid = cx_wd_context=>invalid_lead_selection_index

integer = index

node_name = tempText.

endif.

me->_set_lead_selection( index ).

endmethod.

Could anyone please provide any tip to solve this error?

Thank you in advance.

Regards.

Cristian R.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello again experts, sorry for the late response....

Following your instructions I was able to solve this error. Thank you very much for your help.

Kind Regards

Cristian R.

Former Member
0 Kudos

Hi Cristian,

I am also facing this problem.

could you please guide me what changes I need to do in the system.

Please give me the steps to resolve it

Thxx

Waqkas

IBM SAP

former_member182372
Active Contributor
0 Kudos

Well, pretty clear:


if index > lines( collection ) or index < if_Wd_context_Node~No_Selection.

either you trying to set lead selection to the value greater than number of elements in the node or less than a no_selection constant (which is -1 afair)

Former Member
0 Kudos

Hi cristian,

I think you are trying to use SET_LEAD_SELECTION_INDEX with index 2, but the node does not have

values whose index is 2. once check the table in debugging mode whether you have values in it.

I hope this might be the problem.

If this doesnt solve your error can you please post the code you have written so that you might

get help.