‎2009 Dec 21 1:54 PM
Hi Friends
Earlier I used FTP option for picking and transferring files, now Instaed of FTP I am going with application server concept.
while receving, there is no problem between two types.But while transfrring the XML file from SAP to application server it generated some error, the format is not correect like that.But if I pass the same value in foreground its working fine.
here I am attaching the coding for application server and foreground method
open dataset filename for output in binary mode.
*open dataset filename for output in TEXT MODE Encoding UTF-8.
loop at it_xml.
transfer it_xml to filename.
endloop.
close dataset filename.foreground coding
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = 'C:\Delete_Parked_data.xml'
filetype = 'BIN'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.I dont know how to convert this binary file into xml format in Application server concept.
please help me to resolve this.
Thanks
Gowrishankar
‎2009 Dec 22 6:59 AM
HI,
YOu can use CALL TRANSFORMATION for converting into XML format .
CALL TRANSFORMATION id SOURCE root = lt_TABLE
RESULT XML it_xml.
Then call DATASET
Regards,
Seema
‎2009 Dec 30 11:59 AM
‎2009 Dec 30 3:29 PM