09-11-2018 7:54 AM
Hi All,
I've used opendataset statement condition i.e.,
(OPEN DATASET lv_path FOR OUTPUT IN TEXT MODE ENCODING DEFAULT) and transfered the data from the excel sheet to the Application server (AL11)...
There the data has converted to txt format and stored in the directory (D:\usr\sap\VSD\SYS\src\File.xls) in the application server.
My requirement is to schedule a background job to upload the data from the excel file to the database system....
While I'm trying to execute the program by giving the directory filename it is giving the error "Excel file D:\usr\sap\VSD\SYS\src\File.xls cannot be processed"
Can anyone help me, how to achieve this functionality....
09-11-2018 1:53 PM
Manually try opening the excel file in the application server and check if it is throwing any pop up which necessitates manual action.
If required, check which excel format is appropriate for the data transfer both read and write on the application server.
K.Kiran.
09-11-2018 3:12 PM
Your whole question makes no sense, or perhaps that is the problem. Let's decode it:
I've used opendataset statement condition i.e., <-- Statements and conditions are very different
(OPEN DATASET lv_path FOR OUTPUT IN TEXT MODE ENCODING DEFAULT) <-- You are writing a TEXT file
and transfered the data from the excel sheet <-- an excel sheet is your source
to the Application server (AL11)...
There the data has converted to txt format <-- It's already text, you're converting a text file to text format
and stored in the directory (D:\usr\sap\VSD\SYS\src\File.xls) in the application server. <-- you've just said it was converted to txt. It's a text file - .xls is a binary format.
My requirement is to schedule a background job to upload the data from the excel file to the database system.... <-- No you just told us it's a text file
While I'm trying to execute the program by giving the directory filename it is giving the error "Excel file D:\usr\sap\VSD\SYS\src\File.xls cannot be processed" <-- Correct, as it's a text file. It's not excel.
Can anyone help me, how to achieve this functionality....
The system is responding as I would expect. Please describe your problem coherently.