Yet another “from database or internal table to Excel”
Opened in Excel “As a read-only workbook”
And there is even another option where you can play around with called “Use the XML Source task pane”…
So here the coding for a very small program to read database table T005 and put it in an XML-file:
DATA: lt_t005 TYPE STANDARD TABLE OF t005.TYPES: xmlline(1024) TYPE x.DATA: lt_xml TYPE STANDARD TABLE OF xmlline.SELECT * FROM t005 INTO TABLE lt_t005.CALL TRANSFORMATION id SOURCE data_node = lt_t005 RESULT XML lt_xml.CALL METHOD cl_gui_frontend_services=>gui_download EXPORTING filename = ‘C:\table.xml’ filetype = ‘BIN’ CHANGING data_tab = lt_xml.
And if you then open “table.xml” in Excel “as an XML list” it will show you the T005 really like in SE16:
Have fun
Harry



I ran your code as it is and opened the file in Excel, however the file is not like what is shown by you. I just get plain XML.
Is it dependent of certain version of Excel. I have Excel 2000 installed.
Regards
Sidharth
didn't know about this XML feature. I did is sometimes similar by using ordinary HTML. Simply let your code generate an HTML fragment that only includes an HTML table. e.g.
Save this document as type ".xls" and Excel will open it just like any Excel document.
Good and gr8.
Can i export database user list to excel sheet or msword or notepad from R/3 database and can we get exact ie columns and rows structure. If possible, let me know..plz.
Srini Nookala
I tried to import the XML with Word 2003 also, but it seems not to be as usable as the Excel 2003 for "normal" database tables. The Word 2003 version looks similar to the XML version - the tags are in and the structure is a deep one.
What do you exactly want to do with your XML from the user list?
Regards
Harry
I tried your code. It worked but i get the field name like "/asx:values/DATA_NODE/Z6TEU001V/ANLAGE" for field ANLAGE (table EANL in IS-U). Can you tell how can i get the description of the field instead.
I Use XL 2002.
Best regards
P. Rousseau
In the standard there is no way in doing this. You will have to change the XML structure so it contains the description texts.
You could perhaps do this by using normal char tables or a string as target of your transformation and in this target structure replace the /asx:values/DATA_NODE/*/ANLAGE with the description...
Kind regards
Harry