2010 Jul 16 5:43 PM
Hi,
How can I read Excel file in ABAP in backround task? It's easy in GUI session using OLE, but how can I do it in background?
BR
Maxim.
2010 Jul 16 5:57 PM
2010 Jul 16 6:13 PM
SAP Upload Function modules can not work in Background ,Use Open dataset command for background pupose.
Thank you
Seshu
2010 Jul 16 7:35 PM
Ok, I'll define more precisely my question:
I need read excel file and analyze it in ABAP in background. Not just upload it to internal table. I need to convert information from it and create other documents from it.
Now I have a program that runs in dialog process and it requires user control. Now I want to write a program that runs in background processing excel file content according to logic required.
BR
Maxim
2010 Jul 16 9:48 PM
2010 Jul 17 8:08 AM
Thank you very much Jelena.
Your answer didn't help me. I've read the links you proposed and others as well before asking. There is no solution for my question.
Do you have other links?
Looks like that answer to my question is: It's impossible to read and analyze Excel sheet data in ABAP in background.
Maxim
2010 Jul 17 4:25 PM
Ivan Femia's excellent blog is about .xlsx files (I really advise this format).
If you don't have the possibility to process .xlsx files, you have 3 possibilities to process in background native Excel files (.xls which are neither masked CSV or tab-delimited text files):
1) you can use Excel in background, if you install it on a Windows computer made server (license cost to check). To do so, you can for example (the simplest way to do it I think):
- install RFC server on Windows server (free download from SAP Marketplace)
- create a program on the RFC server (an excel file prog.xls with an Open macro is sufficient; note: the macro is executed automatically when prog.xls is opened) which will convert a given excel file into a CSV file.
- Read clues for [starting and registrating the server in that blog|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2?quicklink=index] (you'll have to setup saprfc.ini on the server, and create a TCP/IP RFC destination "as registered program id" using SM59).
- From the ABAP program, you will copy the excel file to convert at the expected location, call the program (call RFC_REMOTE_PIPE function module with RFC destination created previously to start prog.xls), and process the returned CSV file.
Otherwise, you must use an external software. For example:
2) purchase a SAP [BC-XDC|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1230a590-0201-0010-3081-f4d94be46b6f] [certified third-party software|http://www.sap.com/ecosystem/customers/directories/SearchSolution.epx] that would allow to convert native Excel 97/2003 format. Then, you can call it easily from SAP by RFC.
3) purchase any other converter software
2010 Jul 17 4:10 PM
Hi,
I'm working on xlsx2abap in order to read Excel 2007 file and modify from abap.
[Generate your Professional Excel Spreadsheet from ABAP|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20046] [original link is broken] [original link is broken] [original link is broken];
You should wait a while
Regards,
Ivan