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: 

Regarding ALSM_EXCEL_TO_INTERNAL_TABLE

Former Member
0 Kudos

Hi,

I am uploading data using this FM but I want to know the maximum number of records it will take?Actuallty I have 100 records in the Excel file,but when I have uploaded using this FM into 1 internal table it is taking only 37 records?

Kindly solve this issue!

Points Rewarded !

1 ACCEPTED SOLUTION

former_member632991
Active Contributor
0 Kudos

Hi,

u can upload this much rows from excel. there will be some problem in ur program.

Check wherther in exporting parameter u have given the end row as 100.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = p_file

I_BEGIN_COL = 1

I_BEGIN_ROW = 2

I_END_COL = 10

<b>I_END_ROW = p_lineno</b>

TABLES

INTERN = asset_excel

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 2

OTHERS = 3.

Regards,

Sonika

7 REPLIES 7

Former Member
0 Kudos

The number of rows read depends on the following parameters

i_begin_col = 1

i_begin_row = 1

i_end_col = n

i_end_row = 65535

Check whether the parameter I_END_ROW is set to something like 37 in your program.

Regards

Wenceslaus

0 Kudos

I hope u r right ,but i_end_col = n this parameter should be changed..Any way u r right!

former_member632991
Active Contributor
0 Kudos

Hi,

u can upload this much rows from excel. there will be some problem in ur program.

Check wherther in exporting parameter u have given the end row as 100.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = p_file

I_BEGIN_COL = 1

I_BEGIN_ROW = 2

I_END_COL = 10

<b>I_END_ROW = p_lineno</b>

TABLES

INTERN = asset_excel

EXCEPTIONS

INCONSISTENT_PARAMETERS = 1

UPLOAD_OLE = 2

OTHERS = 3.

Regards,

Sonika

0 Kudos

Thanks for ur response ...I gave points to all..one more thing this FM is consuming lot of time why?Did anyone knows the reason !

0 Kudos

Hi,

i don;t think there should be any problem with this FM, check that u have given the right parameters.

Regards,

Sonika

Former Member
0 Kudos

hi,

give row positions like this.

DATA : c1 TYPE I VALUE 1,

r1 TYPE I VALUE 1,"first row

ce TYPE I VALUE 10,

re TYPE I VALUE 100."end of row

INCLUDE BDCRECX1.

START-OF-SELECTION.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = 'C:\xl1.XLS'

I_BEGIN_COL = c1

I_BEGIN_ROW = r1

I_END_COL = ce

I_END_ROW = re

TABLES

INTERN = ITAB1

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.

Former Member
0 Kudos

Hi Shankar,

U can use the another function module it is very use ful. it can upload the from directly excel sheet to sap. use this function module.

TYPE-POOLS: truxs.

DATA: it_raw TYPE truxs_t_text_data.

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

  • I_FIELD_SEPERATOR =

i_line_header = 'X'

i_tab_raw_data = it_raw

i_filename = p_file1

TABLES

i_tab_converted_data = it_itab

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

If u want i will send program also.

*****Rewards points for useful aswers.

Rgds,

P.Naganjana Reddy