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

Upload a custom table from excel file

Former Member
0 Likes
5,032

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 Soumya,

[Have a look at this Link.|http://www.erpjobs.co.uk/forum/showthread.php?t=299]

Thanks,

Sai

8 REPLIES 8
Read only

Former Member
0 Likes
2,751

Hi Soumya,

[Have a look at this Link.|http://www.erpjobs.co.uk/forum/showthread.php?t=299]

Thanks,

Sai

Read only

Former Member
0 Likes
2,751

HI

just refer to this thread

hope it helps

regards

Aakash Banga

Read only

abdul_hakim
Active Contributor
0 Likes
2,751

Hi

Use GUI_UPLOAD Function Module.

Cheers,

Hakim

Read only

Former Member
0 Likes
2,751

hi,

Use functon GUI_UPLOAD .

thanks

Read only

Former Member
0 Likes
2,751

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

Read only

0 Likes
2,751

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

Read only

0 Likes
2,751

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

Read only

Former Member
0 Likes
2,751

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...