nkk777
28th January 2003, 12:09
A record has been created in sales order table (tdsls040) with the value of sales order as 0. (through a background session - how it got created is still unknown)

We are neither able to delete the zero sales order nor create new sales order. Please suggest ways to remove this junk record.

Thanks

jaapzwaan
28th January 2003, 13:23
Try session ttaad4100

nkk777
28th January 2003, 14:11
Thanks for your response

I am not able to delete even in GTM, I am getting reference errors

OmeLuuk
28th January 2003, 14:24
I assume the order number equals 0?
Change it into something different "989898" that you can find, then delete that record...

xesklu
28th January 2003, 14:24
Hi,

with the session ttaad4229m000 you can print the references of a table and then delete the records with ttaad4100.

I hope this helps.

xesklu

hsteenwi
28th January 2003, 19:22
Or maybe through SQL?

delete
from baan.ttdsls040company
where t$orno = 0
/
commit


Henk.

maximus
29th January 2003, 09:12
Hi,

We had similar issue in migration with 0 valued records. If you have spare time and system can have some amout of down time and you do not want to touch other table, then you may use the methd mentioned below. But beware that this is not the the ideal method to do it.

1. Take a dump of the table using Seq Dump.
2. Edit the file and delete the 0 valued record.
3. Delete the original table (delete the data).
4. Load the edited dump with Create tab from Seq dump with the ignore ref option.

this should get the junk record out of the system , and also the users will not be able to access the related ref records as the junk record is not present anymore.

IMP - Just a fast fix sol, not advisable if you have time to delete all ref first.

Regards
Max