cancel
Showing results for 
Search instead for 
Did you mean: 

getting UNCAUGHT_EXCEPTION CX_WD_CONTEXT at using alv sort function

Former Member
0 Kudos

Dear colleagues,

I developed a simple application which displays records in an ALV and at lead-selection shows detailed data in a form. Everthing is working fine except one is clicking on the sort functionality at the top of the ALV short dump is thrown.

In trx ST22 I find :

The lead selection has not been set. V_DEFAULT

"UNCAUGHT_EXCEPTION" "CX_WD_CONTEXT"

"CL_WDR_CONTEXT_NODE===========CP" or "CL_WDR_CONTEXT_NODE===========CM00R"

"_RAISE_ELEMENT_NOT_FOUND"

Lead selection is checked and also debugging the code did not bring me any further.

Any help is greatly appreciated.

Thanks in advance

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215843
Active Participant
0 Kudos

Hi Michael,

Sorting in the ALV will lead to a change of the context node contents. If you use the ALV with external context mapping, this node will be invalidated and refilled by the ALV component !!!

During this the contens of any subnodes are deleted, and you have to refill it.

You have 2 options:

Either register to the standard functions of the ALV

Or refill the subnode via supply-function.

Another option is to disable the sorting at the ALV component.

Ciao, Regina

Former Member
0 Kudos

Hi Regina,

first of all thanks for your quick answer and explanation. I'm not sure what you mean with 'register to the standard functions of the ALV' because this is a functionality which works in other ALVs without register any event method to them or do you mean that in my case I have to react to the sorting in a new method in the view controller? Concerning 'refill the subnode via supply function' I'm doing this already.

Disabling the sorting is no option anymore because the users already know and love this feature

Regards

Michael