Skip to Content
0
Former Member
Nov 04, 2008 at 08:04 PM

Simple transformation problem...

90 Views

Hi i need to deserialize an XML to an internal table and i cant do it! I need if someone could help me to create the correct internal table type.

this is an example of my xml document...

<?xml version="1.0" encoding="utf-8" ?>

<Embargos_ARBA_DOC>

<ns:Embargos_ARBA_MT xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">

<Embargos_ARBA_MT>

<FECHA>20081101</FECHA>

<CUIT>50000002124</CUIT>

<MONTO>0000013794090</MONTO>

<RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>

</Embargos_ARBA_MT>

<Embargos_ARBA_MT>

<FECHA>20081101</FECHA>

<CUIT>55000001456</CUIT>

<MONTO>0000001144410</MONTO>

<RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>

</Embargos_ARBA_MT>

</ns:Embargos_ARBA_MT>

</Embargos_ARBA_DOC>

this is how i declare my table type

TYPES: BEGIN OF embargos_arba_mt,

fecha TYPE d,

cuit TYPE char11,

monto TYPE char13,

razon_social(120),

END OF embargos_arba_mt.

TYPES: BEGIN OF embargos_arba_doc,

embargos_arba_mt TYPE embargos_arba_mt,

END OF embargos_arba_doc.

and this is how i call the transformation

CALL TRANSFORMATION ('ID')

SOURCE XML source

RESULT embargos_arba_doc = i_embargos_arba_doc.

This is the error...

- <cls:CX_XSLT_FORMAT_ERROR id="o106">

- <CX_ROOT>

<TEXTID>4139A341C62FAF3FE10000000A114BF5</TEXTID>

<PREVIOUS />

<KERNEL_ERRID>XML_FORMAT_ERROR</KERNEL_ERRID>

- <INTERNAL_SOURCE_POS>

<PROGID>205</PROGID>

<CONTID>84</CONTID>

</INTERNAL_SOURCE_POS>

</CX_ROOT>

<CX_DYNAMIC_CHECK />

<CX_TRANSFORMATION_ERROR />

<CX_XSLT_EXCEPTION />

- <CX_XSLT_SYSTEM_ERROR>

<MAIN_NAME>ID</MAIN_NAME>

<MAIN_IC>20</MAIN_IC>

<MAIN_GUID>20050307180113</MAIN_GUID>

</CX_XSLT_SYSTEM_ERROR>

- <CX_XSLT_FORMAT_ERROR>

<NODE_TYPE>element</NODE_TYPE>

<URI />

<LOCAL_NAME>Embargos_ARBA_DOC</LOCAL_NAME>

<TREE_POSITION />

</CX_XSLT_FORMAT_ERROR>

</cls:CX_XSLT_FORMAT_ERROR>

Thanks!!!

Mariano