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

Mass upload of data into Custom table

Former Member
0 Kudos
13,270

Hello all,

I made search in SDN and could not find the best solution to my problem and hence posting .

What is the best way for Mass upload of data into Custom database table ?

I think LSMW would not be a viable option as it would take longer time .

Locking of the table also needs to be taken care.

PLease let me know if you have a alternative to this and the best way to do this .

Comradely,

K.Sibi

1 ACCEPTED SOLUTION
Read only

NAeda
Contributor
0 Kudos
3,016

hi,

Write one small program to upload the date into custom table

1.Upload into one internal table

2.Loop the internal table and use MODIFY (ZorY)TABLE.

rgds

Aeda

7 REPLIES 7
Read only

NAeda
Contributor
0 Kudos
3,017

hi,

Write one small program to upload the date into custom table

1.Upload into one internal table

2.Loop the internal table and use MODIFY (ZorY)TABLE.

rgds

Aeda

Read only

Former Member
0 Kudos
3,016

Hi Aeda ,

Thank you for your reply . But the problem here is locking .Do you think Enque and Deque will preserve the data consistancy in the database level ?

Comradely,

K.Sibi

Read only

0 Kudos
3,016

Hi Sibi,

See Lock objects are required when we enter the data through screen level, or multiple users should not enter the data at same time.

Create one Lock object in SE11, It automatically creates FM.

DEQUEUE_EYTEST2 Release lock on object EYTEST2

ENQUEUE_EYTEST2 Request lock for object EYTEST2

Call these FM in your program.

EX: Refer this links

1 http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm

2 http://wiki.sdn.sap.com/wiki/display/Snippets/lockingandunlockingofthe+tables

Rgds

Aeda

Read only

Former Member
0 Kudos
3,016

Hi,

If the data in excel sheet or in a text file, then use FM GUI_UPLOAD to collect data into an internal table.

Then, insert these internal table contents into custom table.

U can use the enquing for critical data.

Read only

Former Member
0 Kudos
3,016

If it is one time upload and data is in excel sheet then you can use se16 ot table maintenance generator.

Read only

0 Kudos
3,016

Hii Harsh,

Can u plz tell me how to upload excelsheet data into Z-table using SE16 or table maintenance generator?

Waiting for ur reply..Be grateful for ur reply..

regards,

Smith

Read only

Former Member
0 Kudos
3,016

Hi,

Fastest way is to use GUI_UPLOAD Function module and then get records into one internal table.

Then lock the custom table by enque function use MODIFY statement and MODIFY ZTABLE FROM T_TABLE.

After updating the data use deque and unlcok the table.

Regards,

Subhashini