07-03-2007 7:04 AM
Hi,
How to cancel the sales order?
It is very urgent.............
Thanks in advance
07-03-2007 7:08 AM
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
07-03-2007 7:12 AM
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