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

converting an sap file output program into xml output

Former Member
0 Likes
844

Hi,

I have developed a program from which i am able to generate outptut as a file. Since this file is going to be used by the third party system, user has come back asking me to generate an conversion program into xml of the file output.

Since i have not handled previously about generating the xml conversion program. Please let me know how to do this or if you could provide me the sample program it will be great.

Thanks in advance.

Sunil Kumar

Hi,

I have developed a program from which i am able to generate outptut as a file. Since this file is going to be used by the third party system, user has come back asking me to generate an conversion program into xml of the file output.

Since i have not handled previously about generating the xml conversion program. Please let me know how to do this or if you could provide me the sample program it will be great.

Thanks in advance.

Sunil Kumar

2 REPLIES 2
Read only

Former Member
0 Likes
515

Hello

Just for example:


data: itab type standard table of sflight.
data: xml_out type string,xmltab type swbhtmltable.

select * from sflight into table itab.

call transformation ('ID')
source tab = itab[]
result xml xml_out.
call function 'SWA_STRING_TO_TABLE'
exporting
character_string = xml_out
importing
character_table = xmltab.
if sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

call function 'GUI_DOWNLOAD'
exporting
filetype = 'BIN'
filename = 'C:\xmlfile.xml'
tables
data_tab = xmltab.

P.s. search SDN for CALL TRANSFORMATION

Read only

Former Member
0 Likes
515

Dear Sunil,

You can try these links:

/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using-xml

http://wiki.sdn.sap.com/wiki/display/SI/OLEconceptfordownloadingthereportoutputintoexcel

/people/otto.gold/blog/2010/02/11/happy-reporting-with-excel-ii

Hope these proves to be helpful...:)

Regards

s@k

Edited by: siemens.a.k on Apr 5, 2010 4:57 PM