Application Development and Automation 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: 
Read only

Error in bdc.

Former Member
0 Likes
976

Hi all,

I am getting an error excel file cannot be processed while using function TEXT_CONVERT_XLS_TO_SAP to upload an excel file.

Can anyone help me in resolving it.

Thanks in advance,

Neela

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
881

Hi,

Make sure that the excel is closed before upload. I hope you are using .xls file. If you are using office 2007 it saves the file as .xlsx by default. Convert this to 2003 format and upload.

Your subject and actual question are no where matching. Please use proper subject to get fast responces

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Dec 29, 2009 12:32 PM

6 REPLIES 6
Read only

vinod_vemuru2
Active Contributor
0 Likes
882

Hi,

Make sure that the excel is closed before upload. I hope you are using .xls file. If you are using office 2007 it saves the file as .xlsx by default. Convert this to 2003 format and upload.

Your subject and actual question are no where matching. Please use proper subject to get fast responces

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Dec 29, 2009 12:32 PM

Read only

0 Likes
881

Hi Vinoth,

It is 2003 and not 2007.

Read only

0 Likes
881

Hi,

Can you post the piece of code for upload? Are you getting any exceptions from FM or error message?

Thanks,

Vinod.

Read only

0 Likes
881

Hi,

Use the function module as shown below.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                = l_file
        i_begin_col             = 1  "Begin of COLUMN
        i_begin_row             = 2  "Begin of ROW
        i_end_col               = 256  "End of COLUMN
        i_end_row               = 65536  "End of ROW
      TABLES
        intern                  = t_intern   "Internal Table for Excel-Data
      EXCEPTIONS
        inconsistent_parameters = 1
        upload_ole              = 2
        OTHERS                  = 3.

Read only

Former Member
0 Likes
881

Maybe u can use this part of code;


  DATA: lv_file TYPE rlgrap-filename value 'sample.xls'.
  DATA: t_internal TYPE zalsmex_tabline OCCURS 0 WITH HEADER LINE.

  CALL FUNCTION 'Z_ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                      = lv_file
      i_begin_col                   = 1
      i_begin_row                   = 3
      i_end_col                     = 16
      i_end_row                     = 65536
    TABLES
      intern                        = t_internal
*   EXCEPTIONS
*     INCONSISTENT_PARAMETERS       = 1
*     UPLOAD_OLE                    = 2
*     OTHERS                        = 3
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Read only

Former Member
0 Likes
881

Thank u all my issue is resoved,

Regards,

Neela