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

XML File Creation Problem in FTP Server

Former Member
0 Likes
996

Hi.. Experts

My Internal Table is as follows


Types: Begin of ty_xmlfile,
         xmlline(60000)        type C,
       End of ty_xmlfile.

Data: it_xmlfile type standard table of ty_xmlfile,
        wa_xmlfile type ty_xmlfile.

When I download the file to my desktop using GUI_DOWNLOAD. It works fine



 CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            BIN_FILESIZE = lv_size
            FILENAME     = lv_file_name
            FILETYPE     = 'ASC'
          TABLES
            DATA_TAB     = it_xmlfile
          EXCEPTIONS
            OTHERS       = 10.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

In the debug mode when I download the internal table(IT_XMLFILE) into an excel file it doesn't open and it says tag is missinig(/basic_material_text) and also when I create the file in Application Server and transfer it to FTP Server it doesn't open there..and also in debug mode I find the length until DIMENSION AN.. for that row when I double click on that line in debug mode it shows all the text until </baisc_material_Text>

*

<basic_material_text>4.500 +.000/-.010 O.D. X 213.0&quot; LG.(F) (A)ASTM A276 CONDITION &quot;A&quot; 317LTYPICAL MILL CERTS REQ&apos;D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AN*

The above statement is incomplete when the file is open in FTP Server.

But when the file is created on to my desktop. It displays all the text....

*

<basic_material_text>4.500 +.000/-.010 O.D. X 213.0" LG.(F) (A)ASTM A276 CONDITION "A" 317LTYPICAL MILL CERTS REQ'D.DIMENSION REFERENCE:(A) = ALLOWANCE IS INCLUDED FOR MACHINING(F) = THIS IS A FINISHED DIMENSION AND WILL BE USED AS RECEIVED(T) = TO FINISH TO THIS DIMENSION FOR FORGING AND BILLET MATERIAL ONLYVENDOR TO SUPPLY THE FOLLOWING ENGINEERING/QUALITY ASSURANCE DATATYPICAL MILL TEST CERTIFICATES/CERTIFICATES MUST ACCOMPANY THE MATERIAL.* COPIES REQUIRED:(2)ALL CERTIFICATES MUST HAVE LIGHTNIN PART NO.CLEARLY MARKED ON THEM.* COPIES REQUIRED:(2)</basic_material_text> *

I could not understand why it takes only until DIMENSION AN

Any suggestions would be very helpful...

Thanks,

Chaitanya

-Points will be awarded for helpful answers.

6 REPLIES 6
Read only

Former Member
0 Likes
780

Hi...

I think each XML Line will be of length 256. So I have to split the String into 256 of each Line.

Hope it works out....I will try for that and Close the Post...

Thanks,

chaitanya K

Read only

0 Likes
780

Thanks for sharing the results with the forums members.

Thanks,

Greetson

Read only

0 Likes
780

Yes it worked out..and I have to Split the string the MAX is 256. If the PO Header text or Item Text is more than 256 Chars. Split by using offset or...

Thanks,

Chaitanya K

Read only

0 Likes
780

Thanks for sharing.

Thanks,

Greetson

Read only

0 Likes
780

Hi Chaitanya,

Can you let me know how did you download your data in ITAB in xml format in application server. I mean how did you create a XML file on application server?

Thanks and Regards,

Arun

Read only

0 Likes
780

Hello,

I need to also save an XML to FTP. Could you kindly help on this? I think the file need to be converted to the format accepted in FTP. Thanks in advance!