2013 May 31 5:56 PM
Hi friends,
I have requirement that by using XML file will be present in the desktop, and which will be converted into EXCEL file through abap code and i have to place in desktop or 'C' folder.
Actually through some other program, by using smartforms layout will be populating into XML file and saved in the desktop.
In that layout i have to write data and save as excel file.
It will be greatful for me to provide solution to the given requirement.
Really i strucked up with this issue. Please provide solution if any one knows.
Thanks & Regards,
J. Jayasankar Goud
2013 May 31 6:53 PM
Hi Jayasankar,
Go through this link you will get an clear idea of converting xml to xls. The step by step procedure is mentioned in this link
2013 May 31 8:35 PM
Hi Satish,
Thank You very much for spending your valuable time and send reply to me.
I have gone through the given link and i have placed the code to fulfill my requirement. By using XML file Excel file is placed successfully, but only XML data is diaplying in excel file.
Actually we have used call transformation and coming as XML data and changed the code accordingly. But XML data only displaying in excel file.
If i try to convert XML file manually like SAVE as MICROSOFT EXCEL then it is converting successfully.
If you any other idea to convert XML to excel file data please reply.
Thank You so much for your valuable time spending for me....
Thanks & Regards,
J. Jayasankar Goud
2013 Jun 01 9:02 AM
2013 May 31 11:58 PM
Hi,
You will have to achieve this with TRANSFORMATIONS. Check the Link below:
wiki.sdn.sap.com/wiki/display/Snippets/XML+XLS+transformation
Should be helpful.
Cheers,
Arindam
2013 Jun 04 3:33 PM
Hi Arindam Mondal,
Thank You very much for spending your valuable time for me to provide solution.
WIth your idea, now i have successfully creating excel file.
Also In my system i am opening successfully.
But actually my user is sending to his personal mail id and he has to show this excel file to the customers to bargain the product.
He will carry the IPOD or IPHONE and he will try to open this file and he is getting XML data.
If i generate XML file in my system(Desktop) then manually if i save that file as excel file and send to my iphone then i am able to open this file in excel successfully in my iphone.
I think only the issue is now that the file we are creating excel file with our code that is not converting totally to excel file and data remains in XML code only.
Is there any function modules to convert that file totally to excel file.
Thank you very much Arindam, now atleast i have succeded to 80% of my requirement.
But only 20% pending to convert that excel to pure excel file with out XML code in that file.
Just for example what ever link you have given, just you try to create once in your system and send that file to your personal mail id and try to open that in IPHONE or IPOD then i think you can get exact idea.
If you get any idea pls share with me.
Again thank you very much for your valuable time spending for me.
Thanks & Regards,
J. Jayasankar Goud
2013 Jun 05 11:45 PM
Hi,
Check the link below, hope you get your options.
http://wiki.sdn.sap.com/wiki/display/ABAP/Excel+with+SAP+-+An+overview
Also what is the pure excel format. Can you post some screens, should help me understand it better.
Cheers,
Arindam
2013 Aug 07 5:42 PM
Hi Arindam,
As per my requirement i am saving XML file in my desktop.
By using call transformation, and function modules like 'SCMS_STRING_TO_XSTRING' &
'SCMS_XSTRING_TO_BINARY' and by using
CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
This XML file looks like Smartform Layout.
Later on one more requirement came that users want Excel file also along with XML file.
I am trying to create Excel file only by using this XML file. Initially i have tried by using same code of XML file code and just extention i have given '.XLS' and even that is creating successfully on my desktop.
And i am able to open in my system also.
But my SAP user will send this file to his IPOD or IPHONE and he wants to show this file to the customer.
Here the problem is when he tries to open excel file in IPOD or IPHONE, the data in excel file is displayuing like XML data.
So i have tried with OLE functions to create Excel file. And now i succeded.
My requirement is fulfilled now.
But here the small issue is performance issue is coming due to Macros.
How to include Macros functions in OLE code.
Please share knowledge If any one having idea to include Macro's code to write data into Excel file.
Or any alternative method to create excel file.
Thanks & Regards,
J. Jayasankar Goud