Skip to Content
0
Former Member
Oct 25, 2007 at 02:59 PM

XML to ABAP from server file

9 Views

Hello everyone.

I'm trying to import XML file from server file and without using a transformation.

I'm using a parser to get the data into an internal table.

When i use GUI_UPLOAD all works fine ...

By means of READ DATASET, parser is returning errors.

The way i'm reading the data fom server file:

DATA: BEGIN OF it_dados OCCURS 0,

data(256) TYPE x,

END OF it_dados.

OPEN DATASET l_sfile FOR INPUT MESSAGE msg IN BINARY MODE.

IF sy-subrc NE 0.

WRITE: / msg.

STOP.

ENDIF.

REFRESH it_dados. CLEAR it_dados.

CLEAR l_file_size.

DO.

READ DATASET l_sfile INTO it_dados LENGTH l_line_size.

IF sy-subrc NE 0.

EXIT.

ELSE.

ADD l_line_size TO l_file_size.

ENDIF.

APPEND it_dados.

ENDDO.

Please provide some help.

Thank you all.

Mário

Message was edited by:

Mario Semedo