2008 Dec 03 5:17 AM
Hi!
How to upload a custom table with 200,000 records directly from a excel file or a flat file.
Is there a sample program for that can be used.
Thanks
Saumya R
Hi!
How to upload a custom table with 200,000 records directly from a excel file or a flat file.
Is there a sample program for that can be used.
Thanks
Saumya R
2008 Dec 03 5:19 AM
Hi Soumya,
[Have a look at this Link.|http://www.erpjobs.co.uk/forum/showthread.php?t=299]
Thanks,
Sai
2008 Dec 03 5:19 AM
2008 Dec 03 5:20 AM
2008 Dec 03 5:22 AM
2008 Dec 03 5:22 AM
Hi
Check This Code
DATA: xcel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
REFRESH: xcel, ltab.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = pa_file
i_begin_col = 1
i_begin_row = 2
i_end_col = 200
i_end_row = 5000
TABLES
intern = xcel
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.
* Fill the internal table with the values
LOOP AT xcel.
ltab-field1 = xcel-value.
CASE xcel-col.
WHEN '0001'.
ltab-field2 = xcel-value.
WHEN '0002'.
ltab-field3 = xcel-value.
ENDCASE.Ranga
2008 Dec 06 5:48 PM
Hi Ranga !
but will it work when I need to upload the table with like 500,000 or more records, or do I have to add something to this report to make it happen. Can anyone please help me out .
Saumya
2008 Dec 06 6:03 PM
If you are talking about 5,00,000 records ,you are most likely to get short dump.
You can try in such a that you can divide your records in many files and then upload them one by one into internal tables.
Regards
Neha
2008 Dec 07 6:29 AM
uploading a ztable with more than 2 lakh or greater records ...
in all u need to have a code in the production environment which does the table update ..
if u have a to do so by excel u need to take care of mulitple excel sheets as u cant upload more than 60000 records into a single excel sheet ..(to the best of my knowledge ) ..
maintain the count and using fm alsm_excel_tointernaltable and writing a program to update the table..
even i doubt with the content of the file in .txt as it can report time out from gui_upload fm for such big entries..
this can be done but lot of sequences has to be done.. it works but more work is required ..
remember that this is fore ground execution and takes some time to execute ..
second option which im assuming is if at all you can have the dump file stored in application server ..
of your development ,quality, and production..
then the job is done in a single shot by using the open dataset , read statment picking the data from application server and updating the table . you need to run this report in bg mode for faster execution..
but basis team has to make the file present in al11 .. check this option if possible ..
br,
vijay...
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |