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: 

cancellation of sales order

Former Member
0 Kudos

Hi,

How to cancel the sales order?

It is very urgent.............

Thanks in advance

2 REPLIES 2

Former Member
0 Kudos

hi,

Use BAPI_SALESORDER_CHANGE to change or delete or insert a sales order.

check this.

DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

DATA: BAPISDH1X LIKE BAPISDH1X.

PARAMETERS: P_VBELN LIKE VBAK-VBELN.

  • SET THE DELETION FLAG

BAPISDH1X-UPDATEFLAG = 'D'.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = P_VBELN

order_header_inx = BAPISDH1X

tables

return = T_RETURN

.

COMMIT WORK.

<b>Reward Useful Points</b>

Message was edited by:

SivaKumar

Former Member
0 Kudos

Hi,

You can cansel a sales order when subsequent doccuments are not there ,if subsequent doccuments are there first you should cansel the subsequent doccuments and then sales order,In VA02 below the menu bar there is reason for rejection tab ,You can select that and set a reason for rejection

You can also delete a sales order which is not advisable

<b>Reward points</b>

Regards