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: 

Perfomance improvement using ALSM_EXCEL_TO_INTERNAL_TABLE

Former Member
0 Kudos

Hi All ,

I am using ALSM_EXCEL_TO_INTERNAL_TABLE to upload excel file .

When i execute the program it is taking time to get records from excel to internal table type intern .

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

      EXPORTING

        filename                = p_file

        i_begin_col             = '1'

        i_begin_row             = '2'

        i_end_col               = '5'

        i_end_row               = '5000'

      TABLES

        intern                  = i_alsmex_tabline

      EXCEPTIONS

        inconsistent_parameters = 1

        upload_ole              = 2

        OTHERS                  = 3.

    IF sy-subrc <> 0.

      MESSAGE text-018 TYPE c_e.

    ENDIF.

Is there any way to increase the perfomance using FM ALSM_EXCEL_TO_INTERNAL_TABLE .

I am connecting SAP through citrix and file is in presentation server .

Please help.

Thanks and Regards,

Sijin K P.

7 REPLIES 7

Former Member
0 Kudos

Hi sijin,

         

          If the FM ALSM_EXCEL_TO_INTERNAL_TABLE  is taking too much of time in uploading data in sap when you are connecting using Citrix, then try for other function modules also and try to find out which one is efficient in your case.

1)TEXT_CONVERT_XLS_TO_SAP

2)GUI_UPLOAD

if above FMs also have same problem try go for class concepts

CALL METHOD cl_gui_frontend_services=>gui_upload

this may increase the speed.

thanks & regards

Arun prasath

Former Member
0 Kudos

Hi,

I've often used this FM and and I have not any problem with performance.

You can try split your file into multiple files.

Regards

Ivan

Message was edited by: Ivan Marconato Hi, If the answers have helped you, please closed this issue Regards Ivan

arindam_m
Active Contributor
0 Kudos

Hi,

Looks like you are trying to process it in bunches with specification such as

        i_begin_col             = '1'

        i_begin_row             = '2'

        i_end_col               = '5'

        i_end_row               = '5000'

Looks like you have 5 columns and and 4999 rows. I think If you extend 5000 to a bigger number excel can take in 65536 rows in a sheet. So leaving header you still have room for 65535. It might get processed quicker.

Cheers,

Arindam

Former Member
0 Kudos

hi sijin,

can you try with same data into .csv format it is good and easy to use .

thanks

saikiran

Former Member
0 Kudos

Hi,

In my experience i too have seen this FM to be Slow whether you connect via Virtual Desktop or VPN. Do as suggested by Saikiran. Also if data is too huge then try splitting the input file into smaller ones and run multiple programs in foreground with different split files. Should give you some parallelization.

Hope it helps.

Thanks,

Ankit.

Former Member
0 Kudos

TRY this FM:

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

   EXPORTING

*     I_FIELD_SEPERATOR        =

*    I_LINE_HEADER            =  'X'

     I_TAB_RAW_DATA           IT_RAW       " WORK TABLE

     I_FILENAME               V_FILENAME

   TABLES

     I_TAB_CONVERTED_DATA     = IT_DATATAB[]    "ACTUAL DATA

  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.

gurunathkumar_dadamu
Active Contributor
0 Kudos

Hi,

Use the following code,then check the perfomance of the report.

Data: lv_file TYPE string.

PARAMETERS: p_file  TYPE rlgrap-filename OBLIGATORY.

**- Fetching data from excel to itexcel.

  lv_file = p_file.

  CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

      filename                = lv_file

      has_field_separator     = 'X'

*     filetype                = 'ASC'

    TABLES

      data_tab                = it_final

    EXCEPTIONS

      file_open_error         = 1

      file_read_error         = 2

      no_batch                = 3

      gui_refuse_filetransfer = 4

      invalid_type            = 5

      no_authority            = 6

      unknown_error           = 7

      bad_data_format         = 8

      header_not_allowed      = 9

      separator_not_allowed   = 10

      header_too_long         = 11

      unknown_dp_error        = 12

      access_denied           = 13

      dp_out_of_memory        = 14

      disk_full               = 15

      dp_timeout              = 16

      OTHERS                  = 17.

  IF it_final[] IS INITIAL.

   Message "No Data' type 'E'.

  ENDIF.

hope may your problem will solve.

Regards,

Guru