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

Function Module(which is released by SAP) for excel upload

Former Member
0 Likes
1,057

Hi,

When we are trying to upload excel sheet from presentation server, when the excel sheet contains 65536 records using the following FMs, it behavaes in an unexpected manner.

GUI_UPLOAD--- the importing internal table from this FM is then passed to FM TEXT_CONVERT_XLS_TO_SAP.

FM TEXT_CONVERT_XLS_TO_SAP shows a message in taskbar "Read and convert row <row_number>".

So when we use an excel file with 65563 rows, the FM goes into an infinite loop and the <row_number> in the task bar goes beyond 15lacs despite the excel file having only 65536 rows.

On further observation we found that the FM TEXT_CONVERT_XLS_TO_SAP is not released for customers. So we tried using FM ALSM_EXCEL_TO_INTERNAL_TABLE. But Even this is not released for customers.

Could you guys please suggest a stable FM that is released for customers to upload such huge Excel data.

Thanks,

Tirth

5 REPLIES 5
Read only

Former Member
0 Likes
768

Hi Tirth

I used FM: ALSM_EXCEL_TO_INTERNAL_TABLE and it worked perfectly. I used this for a large no of entries as well.

Sample Code:

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = p_file
        i_begin_col                   = 1
        i_begin_row                   = 2
        i_end_col                     = 40
        i_end_row                     = 655356
      TABLES
        intern                        = gt_test
      EXCEPTIONS
        INCONSISTENT_PARAMETERS       = 1
        UPLOAD_OLE                    = 2
        OTHERS                        = 3
              .

Hope thjis helps.

Harsh

Read only

0 Likes
768

Hi Harsh,

Thanks for the prompt reply.

The basic problem is that I need a FM that is released for Customer.

If you go into the attributes tab for the FM you ahve suggested, you will see that the FM is not released.

Could you please suggest an FM which is released?

Thanks,

Tirth

Read only

0 Likes
768

The only way you will get this, is if you copy the FM to your own. All standard SAP FM's are only modifiable through Enhancement Point Technology.

thanks.

JB

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
768

Check class CL_UA_EXCEL_TOOLS

Read only

Former Member
0 Likes
768

Moderator message - Welcome to SCN. Please see note 933420. Also bear in mind that ABAP developers have been using unreleased FMs for years. You do have to be aware though that at upgrade time, you have to test the programs that use them to ensure that they still work. Also, Please read and and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again. Rob