Application Development and Automation 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: 
Read only

delete entries from database table

Former Member
0 Likes
1,801

Hi,

I wanted to delete on entry for database table VBAP where sales order no is 5441.

The sales order having two line items i.e. 10 & 20.

any body will suggest me how to write the code to delete the above mentioned entries from DBtable VBAP.

I think that I need to write

delete VBAP where vbeln = '5441'.

Is it remove the two line item.

Pls reply me asap.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,227

DELETE VBAK WHERE VBELN = '0000005441'.

COMMIT WORK.

7 REPLIES 7
Read only

Former Member
0 Likes
1,227

delte vbak where vbeln = '0000005441'.

it delete in vbak and vba also.

Reward Points if it is useful

Thanks

Seshu

Read only

Former Member
0 Likes
1,227
delete from VBAP where vbeln = '0000005441'.

else

use conversion routine before delete statement to convert the value to database format.

Regards,

Santosh

Message was edited by:

Santosh Kumar Patha

Read only

Former Member
0 Likes
1,227

Hi Neha

It wont remove items. because items are stored in another table. So u should find the item table and try to delete. Or else u can delete directly from VA01 or va02 transaction. U can also delete using BDC.

need ur reward points if its helpful.

Regards

Ravi

Read only

Former Member
0 Likes
1,228

DELETE VBAK WHERE VBELN = '0000005441'.

COMMIT WORK.

Read only

ferry_lianto
Active Contributor
0 Likes
1,227

Hi,

Please check this FM.

BAPI_SALESORDER_CHANGE

BAPI_SALESDOCUMENT_CHANGE

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,227

Hi neha,

delete from vbap where vbeln = '0000005441'.

commit work.

This deletes item level data only.but header level data still remains.

But when we display the sales order using VA03 we can't get it.

To delete the sale order,goto VA03 and delete it.

reward points if useful

rami

Read only

Former Member
0 Likes
1,227

This table is logically connected to a number of other tables, so you should not update it directly. Use a BAPI or BDC.

Rob