‎2013 Jun 14 1:46 PM
Hi All,
I am using FM named ALSM_EXCEL_TO_INTERNAL_TABLE in my report.
I am unable to upload one open office excel file.sy-subrc value is showing as 2(upload_ole).
Is it problem with open office?
The code is given below:-
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = 9
i_end_col = 123
i_end_row = 60000
TABLES
intern = it_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
Please let me know for any solutions.
Thanks and Regards,
Ati
‎2013 Jun 14 3:10 PM
For open office it will not work. In excel or king soft it will work.
‎2013 Jun 14 4:18 PM
Hi,
If you have open office in your system, then some basis settings need to be made. Try using MS Excel it is already integrated with SAP so no issues. In kingsoft the downloading will work fine, but i am not sure with uploading.
‎2013 Jun 14 8:02 PM
Hello Ati,
What is the reason you need to upload the file while keeping it open? File must be closed before uploading. Close the thread if problem solved.
Prabir.
‎2013 Jun 14 7:54 PM
Microsoft Office is integrated tightly with SAP frame work. Even Text Editors are sync to use the Word and its Underlying Options, That is the reason why text editor is opened as an MS word(if installed in your system). Similarly for Data Upload from legacy system, Excel is used and is more advisable as the mutual conversions happens easily
Use Excel file and the problem will be solved.
‎2013 Jun 15 10:56 AM
Hi,
I think Open Office integration is still not available you can try to save the excel in 2010 or older formats and try.
Cheers,
Arindam
‎2013 Jun 15 11:33 AM
Hi Ati,
Save your openoffice(calc) file as .xls and try like this
TYPE-POOLS: TRUXS.
DATA: RAW_DATA TYPE TRUXS_T_TEXT_DATA.
DATA: BEGIN OF ITAB OCCURS 0,
COL1,
COL2,
COL3,
COL4,
END OF ITAB
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
* I_LINE_HEADER =
I_TAB_RAW_DATA = RAW_DATA
I_FILENAME = 'C:\openoffice.xls'
TABLES
I_TAB_CONVERTED_DATA = ITAB
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2 .
Regards,
Ramesh.T
‎2013 Jun 19 5:08 AM
‎2013 Jun 19 5:38 AM
hi,
try use function module KCD_EXCEL_OLE_TO_INT_CONVER, it works for open office also.
or
if possible try creating the same file using Microsoft excel and try executing with your program..
regards..
anusha.
‎2013 Jun 19 9:32 AM