cancel
Showing results for 
Search instead for 
Did you mean: 

UNCAUGHT_EXCEPTION CX_SXML_STATE_ERROR

Former Member
0 Kudos

Hi All

I'm getting the following error when running my print form and see that the error is generated in the following macro xml_open_tag i_folder_name. The function module in which this happens is FPCOMP_FOLDER_BEGIN and I'm not sure how to deal with this error. When I 'Generate Preview Data' in SFP->LAYOUT->EDIT->Defaults, the XML is tip-top, but calling the form from my print program generates this error. Any suggestions? Thank you.

Runtime Errors UNCAUGHT_EXCEPTION

Except. CX_SXML_STATE_ERROR

What happened?

The exception 'CX_SXML_STATE_ERROR' 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_SXML_WRITER================CP' has to be

terminated.

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SXML_STATE_ERROR', was not caught

in

procedure "FPCOMP_FOLDER_BEGIN" "(FUNCTION)", nor was it propagated by a

RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

Method 'IF_SXML_WRITER~OPEN_ELEMENT' cannot be called at this position in the

XML stream

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

if your form is working without the data and not with it, there is something malformed somewhere within:)) I can recommend you to experiment with your form context - one after another disable your context elements and find out which one causes the error.

I have experienced such problems when using certain DDIC types which were not processed correctly. I have never found the "right" solution, but I have found that if I replace the "bad" type with some other one which can hold the same information, it works and it is quick. That is what mattered the most for me.

Hope this helps a bit, Otto

Former Member
0 Kudos

I tried just about everything imaginable; then deleted and started from scratch. It might have been context clash between the hierarchy and data view. I think I dragged one to many node around... Anyway, thanks for the effort

Answers (0)