Application Development and Automation 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: 
Read only

UPLOAD a .XML file

Former Member
0 Likes
611

Hi!!

I need upload a .XML file, but the report don´t show me it complete.

I have this code:

DATA: begin of tab_fin occurs 0,

r(500),

end of tab_fin..

break sandovalj.

CALL FUNCTION 'UPLOAD'

  • EXPORTING

  • CODEPAGE = ' '

  • FILENAME = ' '

  • FILETYPE = ' '

  • ITEM = ' '

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

TABLES

data_tab = tab_fin

  • EXCEPTIONS

  • CONVERSION_ERROR = 1

  • INVALID_TABLE_WIDTH = 2

  • INVALID_TYPE = 3

  • NO_BATCH = 4

  • UNKNOWN_ERROR = 5

  • GUI_REFUSE_FILETRANSFER = 6

  • OTHERS = 7

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

clear tab_fin.

loop at tab_fin.

write: tab_fin.

endloop.

Wha´s the problem?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
588

Try using GUI_UPLOAD and define your internal table with a string.

data: itab type table of string with header line.

REgards,

Rich Heilman

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
589

Try using GUI_UPLOAD and define your internal table with a string.

data: itab type table of string with header line.

REgards,

Rich Heilman

Read only

0 Likes
588

Hi Rich!!

Ok, this work, but is possible show it no like a string??

Read only

0 Likes
588

I guess it is showing all in one line, yes?

Regards,

Rich Heilman

Read only

0 Likes
588

ok, thanks.

Bty.

Read only

0 Likes
588

Ok, if it is all in one row of the internal table, move this line to a single string. Then call the xml document printer.

data printXMLDoc type ref to cl_xml_document.
data rc type sysubrc.
data xmlstring type string.

read table itab into xmlstring index 1.


  create object printXMLDoc.
  rc = printXMLDoc->parse_string( xmlString ).
  call method printXMLDoc->display( ).

Please remember to mark your post as solved when answered completely. Thanks.

Regards,

Rich Heilman