Application Development 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: 

Internal Order Delete (Ko01 Transaction)

Former Member
0 Kudos

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

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

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)