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: 

Not able to upload more than 2000 lines into SAP.

Former Member
0 Kudos

Hi Experts,

      Greetings!

      I had developed a report which takes records from an input excel file and depending on the choice made, uploads them to 5 different tables. There are many validations and code in place. The input excel file has multiple columns which defines the fields it should go into and then after validation, the report uploads them to the table.

      The User now says that he is not able to upload more than 2000 lines at one go. They are definitely not using the old version of Excel, I am sure about that, which I guess had a limit till 65k records or so. Can anyone let me know what might be the solution to this or is it a standard behaviour of SAP? I tried finding a solution to this in the forum, but couldn't get one. Hence, thought to post it here.

      Any approach or input would help. Thanks!

Thanks.

Amrita.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Is it possible that you are using

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' ?

If so, there is a parameter, i_end_row.  I would expect that you have it set to 2000.  Run it up to 65535.

Neal

8 REPLIES 8

Former Member
0 Kudos

Is it possible that you are using

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE' ?

If so, there is a parameter, i_end_row.  I would expect that you have it set to 2000.  Run it up to 65535.

Neal

0 Kudos

If that's not it, We will probably need to see appropriate snippets of the code to help.

Neal

venkat_aileni
Contributor
0 Kudos

Hi-

Could you please provide us more details like which FM are you using? I have just given a trial by uploading more than 5000 records using FM ' TEXT_CONVERT_XLS_TO_SAP' and it's working perfectly.

-Venkat

Former Member
0 Kudos

Can We Know Which Function Module you are using for Uploading data into SAP ?

Regard's

Smruti

0 Kudos

The function module is : ALSM_EXCEL_TO_INTERNAL_TABLE

0 Kudos

what is I_END_ROW and I_END_COL you are passing to it?

Thanks

Nabheet

0 Kudos

Hi,

this is an example how you can use ALSM_EXCEL_TO_INTERNAL_TABLE

      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                = p_pcfile
        i_begin_col             = '1'
        i_begin_row             = '2'
        i_end_col               = '256'
        i_end_row               = '65536'
      TABLES
        intern                  = t_excel_tab
      EXCEPTIONS
        inconsistent_parameters = 1
        upload_ole              = 2
        OTHERS                  = 3.

   PARAMETERS p_pcfile  LIKE rlgrap-filename.

   DATA t_excel_tab TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE.

Cheers

Ivan

0 Kudos

Read first 933420 - ALSM_EXCEL_TO_INTERNAL_TABLE which explains some "limitations" of the FM.

  1. The module is not released for customers.
  2. The module is only available in a SAP_APPL system.
  3. The output structure is limited to 9999 rows and columns.
  4. The output structure is limited to 50 characters per cell.

So either copy the FM to your namespace and adapt, or analyze the source and create your own tool which uses OLE2.

(Also use search tool, this is a FAQ which many threads in SCN)

Regards,

Raymond