Skip to Content
avatar image
Former Member

How to read an xml file on the server?

Hi all,

we need to read an XML file which will be on the appplication server (visible using the transaction AL11).

We will use the transaction CG3Z in order to upload the file to the server.

When we try to open it using the instruction OPEN DATASET we have a dump. Which way must we use to open an xml file in this case?

Thanks for your help.

David

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 21, 2010 at 10:17 AM

    Please ensure that you use the same mode (the one which was used for writing the file using CG3Z) for reading the file.

    Try debugging CG3Z with breakpoint on statement 'open dataset', you will be able to see the appropriate mode( for eg text mode encoding non-unicode etc ), use the same additions while you read the file, that should hopefully solve your issue.

    Regards,

    Kiran

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 10:20 AM

    Hi

    With open dataset you can open any file on the application server. So it should be working, but maybe you are looking for:

    CALL TRANSFORMATION my_transformation

    SOURCE XML xml_string

    RESULT ROOT1 = field1

    ROOT2 = field2.

    Best regards,

    Guido Koopmann

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2010 at 11:34 AM

    Hi,

    see also this:

    [http://wiki.sdn.sap.com/wiki/display/ABAP/UploadXMLfiletointernal+table]

    Add comment
    10|10000 characters needed characters exceeded