Error records from S912 ( Purchasing ) table never get deleted.........
We loaded Purchase Orders using BAPI_PO_CREATE1. There were a couple of records with blank Statistical Delivery date, had used a Conv routine to convert the date to internal format, so value <b>/ /</b> was passed to the BAPI. The BAPI created the PO's but with the Statistical Delivery date as <b>/ /</b> .
Correspondingly records were created in table S912 with SPMON field as <b>/ /</b> and other relevant PO details like Material/Plant/Material Grp/Vendor/Quantity etc. Now we need to delete the records with bad S912-SPMON data.
<b><i>Our Case :</i></b>
If we change the faulty dates or delete the POs; new records will be created with correct SPMON after changing and purchasing details like Qty, Invoiced Qty for existing entries are blanked in case of delete, but the existing records with bad SPMON will remain in the table.
It seems that SAP never tried to do any error handling, before any data is updated on S912 table or while <b>/ /</b> was passed to the BAPI ( I totally agree that it was a developer mistake in first place to pass <b>/ /</b>) ..
Has anybody encountered this issue before or has a solution for this..