Skip to Content
0
Former Member
May 30, 2008 at 08:13 PM

GUI_UPLOAD - Problem in uploading xml file

1217 Views

Hi,

I have problem in uploading xml file into itab.

Here is the code

begin of GS_STRING,
        STR(72) type C,
      end of GS_STRING,

      GT_STRING like standard table of GS_STRING,

 call function 'GUI_UPLOAD'
      EXPORTING
        FILENAME                = FILE_NAME
        FILETYPE                = 'ASC'
      TABLES
        DATA_TAB                = GT_STRING
      EXCEPTIONS
        FILE_OPEN_ERROR         = 1
        FILE_READ_ERROR         = 2
        NO_BATCH                = 3
        GUI_REFUSE_FILETRANSFER = 4
        INVALID_TYPE            = 5
        NO_AUTHORITY            = 6
        UNKNOWN_ERROR           = 7
        BAD_DATA_FORMAT         = 8
        HEADER_NOT_ALLOWED      = 9
        SEPARATOR_NOT_ALLOWED   = 10
        HEADER_TOO_LONG         = 11
        UNKNOWN_DP_ERROR        = 12
        ACCESS_DENIED           = 13
        DP_OUT_OF_MEMORY        = 14
        DISK_FULL               = 15
        DP_TIMEOUT              = 16
        others                  = 17.
    if SY-SUBRC <> 0.
      message I499(SY) with 'File upload failed'.
      stop.
    endif.
  endif.

In debuggin mode, i can see the itab uploaded with xml payload. But in that same place, the hexadecimal format has double zeros 00 after each character.

XML message : <?xml

Correct Hexadecimal : 3C3F786D6C

Hexadecimal in itab : 3C003F0078006D006C00

This makes the resultant xml invalid.

can anyone help me to solve this?

Thanks,

Uma

Edited by: Uma Maheswari on May 30, 2008 4:15 PM