‎2010 Jun 15 11:35 AM
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
‎2010 Jun 15 11:45 AM
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
‎2010 Jun 15 12:40 PM
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
‎2010 Jun 15 1:24 PM
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
‎2010 Jun 15 3:40 PM
‎2010 Jun 15 4:00 PM
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