Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using ALSM_EXCEL_TO_INTERNAL_TABLE

Former Member
0 Kudos

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

9 REPLIES 9

Former Member
0 Kudos

For open office it will not work. In excel or king soft it will work.

Former Member
0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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.

arindam_m
Active Contributor
0 Kudos

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

former_member209120
Active Contributor
0 Kudos

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

former_member209120
Active Contributor
0 Kudos

Hi Ati,

Your problem solved or not?

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Try using the FM TEXT_CONVERT_XLS_TO_SAP