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 Upload - Internal Table

Former Member
0 Likes
524

How Do Everyone!

I am trying to upload an excel spreadsheet into an internal table. This excel

spreadsheet contains over 16,000 rows.

I am using the following FM :

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

filename = pa_file

i_begin_col = '1'

i_begin_row = '2' "Do not require headings

i_end_col = '21'

i_end_row = '50000'

TABLES

intern = excel_itab

EXCEPTIONS

inconsistent_parameters = 1

upload_ole = 2

OTHERS = 3.

However, the program seems to only load 9,999 rows even though the

end_row is set to 50,000.

Does anybody have any ideas what is going on.

Thanks

Andy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
496

Hi Andy,

Use the FM <b>TEXT_CONVERT_XLS_TO_SAP</b>.it will convert the excel to an internal table formet.I have use the FM in one of my reqirement.

*Reward points if is useful.

regards

4 REPLIES 4
Read only

Former Member
0 Likes
496

Hi Andy ,

The reason for this is that the FM returns an internal table with Row and Col and iif you check the tyep of these feild they are NUM 4 , so they can store up to 9999,hence only 9999 records are read.

So now whay you will have to do is call this FM a number of times , each time changing the parameters I_BEGIN_ROW , I_END_ROW .

Process this result you get each time and append it to your internal table.

This process will continue till the FM returns an intial table , indicating that no further values are to be read.

Hope this helps.

Regards

Arun

Read only

Former Member
0 Likes
496

try this FM TEXT_CONVERT_XLS_TO_SAP

and after that use GUI_DOWNLOAD

Read only

Former Member
0 Likes
496

you can check function module documentation.

Read only

Former Member
0 Likes
497

Hi Andy,

Use the FM <b>TEXT_CONVERT_XLS_TO_SAP</b>.it will convert the excel to an internal table formet.I have use the FM in one of my reqirement.

*Reward points if is useful.

regards