on 12-30-2005 2:21 PM
Hi friends,
I am trying Abap mapping in my scenario.
I am using DOM parsers
By default the first line of the output xml document generated is
<b><?xml version="1.0" ?></b>
But I want to add encoding to it. i.e it should be
<b><?xml version="1.0" encoding="UTF-8"?></b>
I have written the code to change this , but it is not working. my code is
data: temp1 type string.
temp1 = 'UTF-8'.
data : encode type ref to IF_IXML_ENCODING.
encode->set_character_set( CHARSET = 'UTF-8' ).
data: odocument type ref to if_ixml_document.
odocument = ixmlfactory->create_document( ).
odocument->SET_ENCODING( encode ).
This code is giving exception
- <u><CX_XMS_SYSTEM_ERROR>
<ID>APPLICATION_PROGRAM_ERROR</ID>
<P1>Z_COSTCENTER_ABAP_MAPPING</P1>
<P2>SAP-ABAP</P2>
<P3>UNCAUGHT_EXCEPTION</P3>
<P4>Program Z_COSTCENTER_ABAP_MAPPING=====CP Include Z_COSTCENTER_ABAP_MAPPING=====CM001 Line 1</P4>
<INFO />
<CATEGORY />
<AREA />
<RETRY />
</CX_XMS_SYSTEM_ERROR>
<CX_XMS_SYSERR_MAPPING />
</cls:CX_XMS_SYSERR_MAPPING>
- <cls:CX_SY_NO_HANDLER id="o215">
- <CX_ROOT>
<TEXTID>1F09B73915F6B645E10000000A11447B</TEXTID>
<PREVIOUS href="#o216" />
<KERNEL_ERRID>UNCAUGHT_EXCEPTION</KERNEL_ERRID>
- <INTERNAL_SOURCE_POS>
<PROGID>196</PROGID>
<CONTID>47</CONTID>
</INTERNAL_SOURCE_POS>
</CX_ROOT>
<CX_NO_CHECK />
- <CX_SY_NO_HANDLER>
<CLASSNAME><b>CX_SY_REF_IS_INITIAL</b></CLASSNAME>
</CX_SY_NO_HANDLER></u>
Can anyone please tell me how to add the encoding parameter in the Output XML document which we are building through ABAP MAPPING.
Thanks,
Yomesh
Hello Did you solve the problem?
Ernesto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you gone through abap mapping guiide in SDN?>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.