05-24-2013 9:50 AM
Hello,
I need a Function or BAPI to delete Internal Order. Or How can I do it? Now I delete rows from tables "coas" and "COBRB", but I cannot create any order then.
To create I use BAPI_INTERNALORDER_CREATE.
Can you please help me?
Regards
Vladislav Shakhmatov
05-29-2013 1:51 PM
To delete an order (transaction KO02) you have to use BAPI_INTERNALORDER_SAVEREPLICA, setting deletion status in parameter OBJECTSTATUS (STAT = 'I0013'). This will only set the deletion flag, you will have to archive data (*) to actually delete records from database.
Now I delete rows from tables "coas" and "COBRB"
I hope you did not use open-sql statements on standard detail tables, didn't you or did you also delete corresponding records in evry related CO tables like COBK, COSS, COSP, etc.
Regards,
Raymond
(*) Transaction SARA, starting with an object like CO_ORDER and checking dependant objects - Archiving Internal Orders (CO-OM-OPA)