Navin Tenani
30th October 2006, 13:57
Hi,
We have got data of around 4 years. There are a huge nos. of undelivered sales order lines. Numbers of Such sales Orders will be grater than 10000.
Can anybody help me in guiding how I can Delete such Lines in one go.
Regards
Navin Tenani
NirajKakodkar
30th October 2006, 14:23
Hi ,
Well , i dunno wether it might help you , but i suggest you to archive the data rather than deleting it .
Write a script that will change the sales status code to deleting lines ( say 9 ) in the table tdsls045 and change the procedure mask .
Now you can archive the data to some other company .
Regards,
Niraj
Navin Tenani
30th October 2006, 15:14
Hi Niraj,
Sorry I forgot to mention that in the site every sales oredr is being treated as a project. Hence unless and untill i close or delete the planned inventory movements the projects cannot be closed.
Hence the best solution which came to my mind was that if I am able to delete these undelivered Sales Order Lines the task would be done.
Please let me know if you have any other suggestion.
Regards
Navin Tenani
sukesh75
30th October 2006, 16:12
Navin,
The undelivered items could be partially delivered as well isnt it? In which case you wont be able to delete the lines but just the undelivered part from Maintain And Confirm Back Orders.
Deleting the items using a script is extremely tricky as the memories of doing such a practice in one of our sites still haunts. So i would advice extreme caution and have all the grounds covered. tipcs500, tipcs021, tdinv150, tdsls045, tdsls040, tdsls041, tdsls050, tdsls051 are the few tables that comes to my mind..
sk
Navin Tenani
31st October 2006, 07:30
Hi Sukesh,
Backorders have alraedy been confirmed.
Now the question is only for 100% undelivered lines and manually deleteing or making them "0" is going to be a hurculian task.
Please suggest.
Rgds
Navin Tenani
sukesh75
31st October 2006, 07:59
A series of script can do the job provided you take care of all the tables i mentioned. Below are the steps you need to do if you want to remove the undelivered lines.
1) You need to take off the reference to Project numbers from the line item and change the Item category from Customized to Standard Item or Make Customized in tdsls41 table.
2) Then you take off the planned qty from tipcs500 table so that allocated figures on all those projects will go off.
3) Delete the Allocated figure in tipcs21 if present. I dont think it will after step 2.
4) Delete the entries in project parts tipcs25 table.
5) Delete the lines from the tdsls41, tdsls45, tdsls51 table.
6) Check if any of these line items are present in tdinv150. If yes then delete them too.
Since each sales order is treated as a project, you can only close it once you do the above procedure. Once these lines are deleted you can Finish and Close the projects using the Global Update of Project Status and Close Project sessions. Are these projects by any chance have production orders in planned or released stage?
This is a major undertaking so i would advice you to first do this on a test environment and see the results before you apply on the live company.
sk