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

Excel File Upload

Former Member
0 Likes
757

Hi,

Iam using FM "ALSM_EXCEL_TO_INTERNAL_TABLE" to uplaod the data from excel file to UNIX.

It is working fine up to 10000 records but my file contains more than 50,000 records.When iam trying to upload this file it is uploading only 10000 records.

Is it possible to uplaod an excel file more than 50,000 records?? if so, how?

Thanks & Regards,

Vijitha.

4 REPLIES 4
Read only

Former Member
0 Likes
700

Hi,

Welcome to SDN.There is a limit for uploading the data from excel.

The limit is 65535.You can go beyond 10000 records.

Message was edited by: Phani Kiran Nudurupati

Read only

0 Likes
700

Pls check parameters

VALUE(I_BEGIN_COL) TYPE I

VALUE(I_BEGIN_ROW) TYPE I

VALUE(I_END_COL) TYPE I

VALUE(I_END_ROW) TYPE I

You need to specify these in order to read records.

Read only

Former Member
0 Likes
700

Hi,

Parameters: begcol TYPE i DEFAULT 1 NO-DISPLAY,

begrow TYPE i DEFAULT 1 NO-DISPLAY,

endcol TYPE i DEFAULT 100 NO-DISPLAY,

endrow TYPE i DEFAULT 32000 NO-DISPLAY.

CALL FUNCTION <b>'ALSM_EXCEL_TO_INTERNAL_TABLE'</b>

EXPORTING

filename = filename

i_begin_col = begcol

i_begin_row = begrow

i_end_col = endcol

i_end_row = endrow

TABLES

intern = internal table

EXCEPTIONS

inconsistent_parameters = 1

upload_ole = 2

OTHERS = 3.

Thanks

Sudheer

Read only

Former Member
0 Likes
700

Hi,

Refer this piece of code.

DATA : GT_FILE TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS :P_FILE  LIKE RLGRAP-FILENAME OBLIGATORY. "Excel file name
SELECTION-SCREEN END OF BLOCK B1.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

*To browse and get the file name
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
      FIELD_NAME    = 'c: '
    IMPORTING
      FILE_NAME     = P_FILE.

START-OF-SELECTION.
* To upload the file from Presentation server
  PERFORM UPLOAD_EXCEL.
FORM UPLOAD_EXCEL .
  REFRESH GT_FILE.
  REFRESH GT_DATA.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      FILENAME                = P_FILE
      I_BEGIN_COL             = 1
      I_BEGIN_ROW             = 1
      I_END_COL               = 4
      I_END_ROW               = 65536
    TABLES
      INTERN                  = GT_FILE
    EXCEPTIONS
      INCONSISTENT_PARAMETERS = 1
      UPLOAD_OLE              = 2
      OTHERS                  = 3.

  CASE SY-SUBRC.
    WHEN 1.
      MESSAGE E049.
    WHEN 2.
      MESSAGE E050.
    WHEN OTHERS.
* Do Nothing
  ENDCASE.
  SORT GT_FILE BY ROW COL.

ENDFORM.                    " upload_excel

Regards,

Gayathri

Message was edited by: Gayathri Hariharan