Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

System error while reading XML using CALL TRANSFORMATION

Former Member
0 Kudos

Hi all,

We are trying to READ XML file by XSLT_TOOL using CALL TRANSFORMATION.

we are using below code :-

TYPES : BEGIN OF ls_xml,

                raw(262143) tYPE c,

           END OF ls_xml.
   DATA : l_xml_1 TYPE ls_xml.


DO.
       READ DATASET w_fich INTO l_xml_1.
       IF sy-subrc EQ 0.
         CONDENSE l_xml_1.
         APPEND l_xml_1 TO lt_xml_tab.
       ENDIF.
ENDDO.


CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
     EXPORTING
       text   = l_str
     IMPORTING
       buffer = fw_xml
     EXCEPTIONS
       failed = 1
       OTHERS = 2.


CALL TRANSFORMATION   zsepa_sdd_trans1
                 SOURCE XML lv_xml
                 RESULT document = itab.

Getting EXCEPTION in CALL TRANSFORMATION.

Issue:-

The issue is that, when we are trying to READ an XML file of size grater than 262143.It is giving exception i.e.
"System expected a value for the type C" or "END OF TAG IS MISSING <TAGNAME>".

Thanks in advance.

Please let me know if needed more clarification.

Thanks,

Pratima

1 REPLY 1

rdiger_plantiko2
Active Contributor
0 Kudos

Hi Pratima,

of course there are details missing, also the code above is only fragmentary (what happens to lt_xml_tab after the DO... ENDDO? Why putting such a large amount of data into a structure? What is l_str, and where is it filled? Why convert it into an xstring? And where is the resulting xstring fw_xml used, anyway?)

But I would suggest another approach:

- Your error is about an XSLT transformation on an XML file. Did you try this transformation in another environment? Did you save the sample xml and the XSLT transformation to files, and then applied the latter on the first with another tool? For example, in windoze you may use this script to perform the transformation as a test: http://pastebin.com/F3zQK1VF If it doesn't work this way, you can't expect to work it in ABAP.

- If you tested this and are sure that the XSLT transformation works properly on the XML file, please send or attach the XML file and the XSLT transformation.

Regards,

Rüdiger