Skip to Content
0
Nov 04, 2011 at 08:19 PM

Read Excel file from Appl server in Background

331 Views

Hello,

I am trying to read an excel file (.xlsx) from the background placed in appl server path from the background .

It works fine when i run this in foreground.

i am using the following code:

open dataset p_file for input in text mode encoding default ignoring conversion errors.

if sy-subrc eq 0.

call function 'TEXT_CONVERT_XLS_TO_SAP'

exporting

  • I_FIELD_SEPERATOR =

i_line_header = 'X'

i_tab_raw_data = it_raw " WORK TABLE

i_filename = p_file

tables

i_tab_converted_data = it_file_data[] "ACTUAL DATA

exceptions

conversion_failed = 1

others = 2.

Please suggest.

Thanks