2009 Nov 17 11:30 AM
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
2009 Nov 17 11:46 AM
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
2009 Nov 17 11:46 AM
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
2009 Nov 17 11:59 AM
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
2009 Nov 17 1:44 PM
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
2009 Nov 17 12:00 PM
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.
2009 Nov 17 12:03 PM
If it is one time upload and data is in excel sheet then you can use se16 ot table maintenance generator.
2014 Jul 14 12:51 PM
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
2009 Nov 17 12:12 PM
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