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: 

Downloading Xml file to application server

Former Member
0 Kudos

Hi All ,

I am converting a internal table into XML fomat using FM 'SAP_CONVERT_TO_XML_FORMAT' and then download it to application serever .

The code to download is

OPEN DATASET p_fpath IN binary mode FOR OUTPUT .

LOOP AT XMLTAB INTO ls_XMLTAB.

TRANSFER ls_XMLTAB TO lv_filename.

CLEAR ls_XMLTAB.

endloop.

The file is downloaded on application with some junk characters in the end . when i open in explorer there an error in bottom of file is the error.

Any input will be great , Thanks

Thanks And Regards

Vinay Kolla

7 REPLIES 7

mvoros
Active Contributor
0 Kudos

Hi,

what is the type of variable ls_XMLTAB. It looks like it is a structure. Probably you do not want to transfer each component of the structure into the file. Maybe it should something like ls_xmltab-data.

Former Member
0 Kudos

Hi Martin ,

The made the change but same error occurs at the bottom ,

If download the same xmltab with FM gui_download to pc it downloading okay .

Thanks For u r response f, further help will be great

Regards

Vinay Kolla

mvoros
Active Contributor
0 Kudos

I can not think anything else. Did you try to use text mode instead of binary mode?

Former Member
0 Kudos

Hi Martin ,

I tried 'text mode ' as well the problem with text mode is I cant convert to

TRANSFER ls_XMLTAB-data TO lv_filename.

And its short dumping at that point .

Thanks And regards

Vinay Kolla

mvoros
Active Contributor
0 Kudos

What is the reason for short dump?

Former Member
0 Kudos

Runtime Errors UC_OBJECTS_NOT_CHARLIKE

>>>>>>>TRANSFER ls_XMLTAB-data TO lv_filename.

Thanks And Regards

Vinay kolla

former_member181995
Active Contributor
0 Kudos

Refer: