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

custom tables data deletion (data cleanup)

Former Member
0 Likes
847

Hai guys,

any one can help on below issue.

Data from the custom tables in compshop(SD) needs to be deleted. All the tarnsactional data , the shops , the schedules, the visits , the competitors needs to be deleted from the existing tables

The transactional data needs to be purged as it is severly impacting the performance of this fucntionality. Should be able to purge based on creation date.

Please can you explain how to do it.

5 REPLIES 5
Read only

Former Member
0 Likes
792

If its a Custom table, you could write peice of code and do the deletion of the data using DELETE FROM <custom table name> WHERE <conditions>

Thanks

Abhi

Read only

0 Likes
792

GAH!

No, s/he should not. S/he should check with her/his FI/CO-functionals first, whether there are data in those tables that are fiscally or legally relevant. In such a case s/he should develop an archiving object (or extending an existing archiving object) to see to it, that those data are archived with the proper relation to SAP-standard data. There's a whole section on the NW Library on the How-to to develop such.

Otherwise: face legal problems!

If there are no such data in those custom tables, go to your MM/PP-functionals and aks whether you have long standing contracts with customers/vendors where you have some kind of written agreement to provide special data for up to 10 years back (sorry, don't know the English word ... in German it's: Produkthaftung). Is there such an agreement, see above ...

...

Read only

0 Likes
792

Hai Abhi,

Yeah they are custom tales only.

Please can you tell what piece of code required to delete the data.

I have 11 tables and data should be deleted from that tables.

for example i have talbes like YDCS_CR, YDCS_REP .Each table having lot of entries . All the entries should be deleted from that tables.

Please can you help.

Thanks and Regards

krishna

Read only

0 Likes
792

I would suggest to first backup the data into some flat file and then delete the data from the ztables..

declare a internal table of type as the ztable.

get all the data into it..

write to file. Once the write is complete

delete table <ztable>. Hit and F1 on delete for the syntax.

Read only

0 Likes
792

>

> Yeah they are custom tales only.

>

It does not matter whether these are custom tables - as long as they are linked (via key) to objects like sales-orders, service-orders, purchase orders, billing documents etc. they are fiscally (legally) relevant! Delete at your own peril!!

If you want to get them clear real quick, drop the tables using SE14.

Otherwise a search of SDN will provide you with the correct coding, since you are not the first one to try this