How to delete Sales Orders having billing transactions (invoice)?

The Sales Orders (tables: VBAK, VBAP) having discount which base on rebate agreement were WRONGLY created. The status of the Sales Orders are 'Open'
and invoice(tables: VBRK, VBRP), billing transactions were also WRONGLY generated for them.

It is easy to delete a sales order not having billing transactions.
But, How to delete a Sales Order which already had billing transactions?
I have tried to use the transaction code, VF11 to delete the Billing transactions from the tables, VBRP and VBRK. But, the transactions didn't be deleted and other billing transactions which used to cancel the billing amount were created. The invoice couldn't be deleted so the sales orders also  couldn't be deleted.

If any Sales Order having invoice, is it no way to delete them?
Please suggest if any other method can solve this problem.
leo_wh_cheungAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sharaddCommented:
Hi leo,
If invoice documents are created for Sales Order then the sales order cannot be deleted.

If you try to delete invoice it won't delete the invoice also , instead it will create reverse invoice. Now this way your Sales order status will be open but you cannot delete this Sales order as it has some documents ( invoices ) linked to it.

If you want to use the same sales order number...
What you can do is you mark the items of this sales order as blocked for invoice, blocked for shipping ( if you have shipping for this item ) and then create a new item with correct values.

Now in reporting and printing of order you can discard the wrong item.

This sales order item status will remain open. If you want this status to be completed then you will have to update the status in table VBUP directly.

if you want to delete this sales order and do not want to use the same order number then

The second choice is you update tables manually. ( Though I won't recommend it ).

it is a very tedious process in which you will have to delete number of records in many tables. The tables you can find out in Archive object SD_VBAK.

The third choice is to try to archive this sales order.
Though I haven't tried it but I think you can try with options like not checking Accounting documents, not checking document flow records for this sales order.

I hope this will help you.

Sharad.

0
leo_wh_cheungAuthor Commented:
Hi Sharad,

The third choice that you mention:
Though I haven't tried it but I think you can try with options like not checking Accounting documents, not checking document flow records for this sales order.

Do you know what transaction code or any process to configure the document flow?

The sales orders(ZSB1) generated provision for the customers(no delivery is needed for those S/O). In the normal process, payment needs to be made for the provision in order to complete the payment cycle of the rebate process (transaction code:VB02).
The payments are not made to the customer because the sales orders were wrongly created. But, if I do so, the payment cycle cannot not be completed.
Is there any solution to complete the payment cycle without making the payment?

Leo
0
sharaddCommented:
Hi leo,
Document flow records are in table VBFA.

To archive SD sales order use transaction SARA and in object name enter SD_VBAK. and follow the procedure of archiving.

This will delete Sales order but will not delete invoice documents ( table VBRK, VBRP ). As you have already cancelled the invoices ( ie. Negative posting ) I think you don't have to worry about the rebate processing as net invoice amount would be zero and there will be no rebate for these invoices. And as net invoiced amount is zero there won't be any payment.

If you are using SAP's standard payment run then you can run the payment run and see if there are any payment pruposal for this customer.


I hope this will help you.

If you need further help feel free to ask.

Sharad
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leo_wh_cheungAuthor Commented:
Sharad,

Sorry for the late reply. The monthly payment cycle is OK! Thanks a lot!

Regards,

Leo
0
leo_wh_cheungAuthor Commented:
Sharad,

Sorry for the late reply. The monthly payment cycle is OK! Thanks a lot!

Regards,

Leo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Enterprise Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.