cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete sales order from VBAP?

Former Member
0 Kudos

Hi,

I have a situation where user entered wrong data (high order volume), now sales order is saved and when i try to view the order i get run time error. I am not in a position to enter into sales order either via VA02/03.

I need help how I can delete this sales order from the system? what program I can run to delete this order entry?

Regards

Yash

Accepted Solutions (0)

Answers (3)

Answers (3)

Lakshmipathi
Active Contributor
0 Kudos
i get run time error

In normal circumstances, you can delete any line item in sale order either in VA01 or VA02 provided, no subsequent document exists for that line item. In your case, if that is not happening but some run time error is coming means, update the forum what run time error message system shows.

thanks

G. Lakshmipathi

Former Member
0 Kudos

I got a similar problem. Try using BAPI_SALESORDER_CHANGE to delete the sales Order.

1. Give SALESDOCUMENT under Import parameters.

2. Give 'D' under UPDATEFLAG for ORDER_HEADER_INX and ORDER_ITEM_INX.

Note: You will need to run BAPI_TRANSACTION_COMMIT after executing the BAPI.

Check if this solves your problem!

former_member315051
Active Contributor
0 Kudos

Check weather order is saved or not , if it is saved you can see in VA02.

For runtime error you can check in T Code - ST22 , also check with your ABAPer.

Regards,

Ramesh

Former Member
0 Kudos

Yes, order is saved. Now i can't go into order via VA02/03. I can see the order created in VBAP table.

former_member315051
Active Contributor
0 Kudos

Ok, As you said when your viewing the sales order you got the runtime error, so check with your ABAPer about the error analysis.

What is the Run time error message you are getting in VA02 ?

Former Member
0 Kudos

HEY FRIEND,

if you have no other options ( LIKE ask the end user to delete the order via va02 ) :

go to transaction SM30 :

table name : vbak

field "vbeln" : enter your sales order number

mark all the line and push on button delete .

do the same to tables vbap,vbeln,vbkd .

and again : DO this only if its your last option because it have an effect on the data base .

if you want , publish the run time analysis here and i would take a look

BR

ASA

Former Member
0 Kudos

There are two ways of deleting the Sales Order directly from VBAK table.

1) go in debugging mode of table VBAK and delete the entries of each field

2) Go to SE16N and put the table name VBAK

once you enter all the fields will be editable in this

you can make it as blank.

Once again, it is recommended not to delete the sales Order and just reject it.

If you think that it is the only solution and will not have any other impact, still check it once again before you proceeed.

Regards

Prashant Ranalkar

safeer_rahman2
Contributor
0 Kudos

Hi Yash,

If your issue is to delete the entry from the table you can execute the transaction SE16 N and enter the corresponding table name.

Then type the Tcode &SAP_EDIT which would allow you to edit/delete/change the entries in the table as you prefer.

Thanks,

Safeer Rahman

safeer_rahman2
Contributor
0 Kudos

Hi Yash,

Before doing that you need to ensure you have necessary permission to do so.

Thanks,

Safeer Rahman

Former Member
0 Kudos

Hi Yash,

What does the ABAP Dump state? perhaps this might also be happening for other sales orders, so better to check with an ABAPer on the Dump issued. However, if you want to delete it from the table level it can be done through SE16 in debug mode provided you have appropriate developer access.

thanks