Cancellation of sales order

Hi,
            How to cancel the sales order?
It is very urgent.............
Thanks in advance

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

Similar Messages

  • Cancellation of Sale Order

    Hi all,
    I have an issue with SD/FI.   The details are given below:
    I would like to cancel a Sales Order due to wrong sold-to-party selected. There is an existing accounting document created.
    How do I proceed with the cancellation of the Sales Order? I want to prevent this SO from being used.
    This is the first transaction.   Actually, the Accounting document generated through Billing Document and the same was cleared against down payment. 
    Is it possible to cancel the Sale Order to change the sold-to-party without affecting the Sale Order.
    As per my observation, it is not possible once the accounting document generated.
    If we want to cancel the Sale Order, is it possible?
    Reverse the clearing document, down payment document & billing document.
    Then cancel the billing document. 
    Hence, we can cancel the Sale Order.  
    It will affect the previous period balances.   Is it correct??
    Can any one give some guidelines.  Whether I am correct or not??
    Thanks & Regards,
    SAP

    Thanks for all your efforts and replies.
    As per discussion, I convinced to make JV for subsequent adjustment.  
    How to protect the concern sale order to avoid future use.
    I hv tested in SO through development after selecting "Cancel Sales Deal" in the field Reason for Rejection.
    Tried for billing and it is not allowing.
    Can I suggest this methodology??
    Pls note that there is no sales scenario.    The contract and deposit money transactions handled
    through SD.
    Please give your opinon or give some more stop to prevent the SO.
    Regards,
    SAP

  • How to Cancel a Sale Order without cancelling the subsequent document.

    Dear All,
                 I want to cancel sale order but the sale order have a subsequent document is there is any soulution that when i cancel the sale order all the subsequent document, outbound delivery and invoice cancelled in jn\ust one step, if not then what is the other way to solve that problem.

    Hi
    You can reject the sales order by going to VA02
    Go to-> Item -> Enter Reason for Rejection
    and save the order.
    This will reject the order even if the subsequent documents are created so that no further open quantities can be delivered.
    Reward points if useful.
    Regards,
    Nimit
    Edited by: Nimit Raiya on Jul 3, 2008 4:03 PM

  • Auto cancellation of sales order

    Dear All,
    Here we are having make to stock scenario. Is it possible to put any expiry date limit for the sales order like quotation??? also is it possible to auto cancel of sales order which are expired ???
    Regards,
    Sagar Wairagade

    Hi Sagar,
    suggestion:
    get a program developed to pick up SOs older than some date or whatever you like to define..
    setup a variant and setup a bkgd job to run everynight to delete or reject all line items with a reason code.
    I hope this helps.
    Regards,
    Raghu.

  • BAPI/IDOC to cancel the sales order ?

    Hi folks,
    What is BAPI /IDOC to cancel the sales order in ECC via PI .
    Thanks.,
    Shiva

    Hi Shiva,
    To my thinking you can use the BAPI for canceling and updating the sales order.
    For further reference you can have a look on the below link:
    BAPI SALESORDER CHANGE
    In this link you will find the values to be filled for performing different function for the BAPI.
    Regards
    Ravi Anand

  • Cancellation of sales order through VA02

    Hi experts,
    My user wants to cancel some sales orders through VA02.He select line item 10 and then goes to "reasons for rejection" and put " 51 cancelled".then save it.Systems shows following error and he unables to cancel it.
    You cannot select assembly order 16000014794 for deletion
    Message no. V1748
    Diagnosis
    Due to the current situation of the document, the system has attempted to mark the procurement element 16000014794 with a deletion flag.
    This could, however, not be carried out, as the procurement element was in a state that does not allow the deletion flag to be set.
    System response
    The deletion flag is not set.
    Procedure
    Eliminate the reasons that stop you setting the deletion flag, and repeat the change carried out on the sales order.
    Please advise.
    Regards,
    Samaar

    Not answered

  • Cancel a Sales order with a PP order

    Hi
    I want to cancel a sales order that has a production order assoiced with it . the production order has status REL  Released
    MSPT Material shortage
    PRT  Printed
    PRC  Pre-costed
    GMPS Goods movement posted
    RESA Results analysis carried
    SETC Settlement rule created
    The order dose not have any varent dollars assocated with it and the conformation has been removed 
    I can not cancel the sales order

    Hello,
    As the production order is associated with the sales order, it may not allow you to cancel/delete the sales order.
    TECO the production order, set deletion flag, if the production order is not to be used. After this reject the sales order with a Reason for Rejection or delete the sales order.
    Prase

  • User Exit for Cancel in Sales Order

    Hi ,
    Can anybody tell me which user exit is fired when a sales order is cancelled?
    I want to clear all the entries made in the additional data B tab which updates a custom table.
    Thanks in advance.

    Hi Andrea,
    That userexit is fired when we delete a sales document. But I want an exit which will be triggered when we cancel a Sales order while creating.
    When I create a sales order through VA01 and give data in additional data B, and press the cancel button, the values in the tab are not getting cleared for the next sales order.
    So I want an exit which triggers when pressing cancel button though VA01.
    Thanks.

  • How to cancel the sales order - header and line status are in Entered Stage

    Dears,
    I have some sales order to be cancelled in which the header and line status are in *"Entered"*. I am not able to cancel these sales order.
    Also note that these orders are for maintenance service.Once i book these orders the lines will change to closed status.
    So it is not possible to book and cancel the lines.
    Kindly me to resolve this.

    926530 wrote:
    Boss,
    If i do Action-->cancel on header, it just makes the qty to zero.But the header and line status still showing as entered.It will not cancel the order.
    The problem for me is that these lines are coming in my monthly reports. This is what your question says...be more specific as what is your issue..which in turn is your problem
    How to cancel the sales order - header and line status are in Entered Stage
    Coming to your Action-->cancel...as far as i know ...the header status will change to canceled..
    unless until you have some processing constraints in place...which is stopping you...
    HTH
    Mahendra

  • How  to find cancel of sales order data?

    hii friends,
    now i am creating a sales register so i have need  to calculate the value of cancel of sales order and return of sales material. sp plz give me table name and bill type for sales return and cancel.

    Table for Sales Return is ORDN for header and RDNX for lines.  As for canceled Sales Order, there are no special table but the same ORDR with field value for CANCELED as 'Y'.
    Thanks,
    Gordon

  • How to view the cancelled/deleted sales order?

    Hi SAP Gurus
    I there any T.code/Table to view the cancelled or deleted sales order.
    I am not able to view the order even in VA03.
    Regards
    Giridhar

    Dear Sushmitha,
    T. Code: SE16
    Key-in -
    Table: CDHDR - Change Document Header.
    Table: CDPOS - Change Document Items.
    and "Enter". On to next page, Key-in
    Field: Change doc. object (OBJECTCLAS) as VERKBELEG
    Field: Transaction Code as VA02
    Field: Appl.obj.change, as D - Delete, and execute (F8).
    Then you will get object values (sales orders) and document numbers. Pass these two values along with objectclas: VERKBELEG) to table CDPOS to get more details about these deleted orders.
    Also, Go to -
    T. Code: SE38,
    and execute Report: RVSCD100.
    Enter Sales Document Number and Execute. This will provide information, who deleted the order.
    Best Regards,
    Amit

  • Configurable material - Partial cancellation of sale order

    Hi
    I created a sale order with configurable material with variant pricing. For example 50 Qty( VA01). If  i do the partial cancellation in VA02 for example 25 qty, the following message is getting popped up.
    Changing date/quantity may result in differen
    - Please configure
    Can anyone suggest what are all the settings i need to do? or any other procedure is there for partial cancellation of configurable material?
    Thanks in advance.
    Regards,
    Raman

    Hi
    The scenario is
    Create a sale order on VA01 for configurable material with variant configuration for the quantity 50. The material doesnt have BOM.
    Change the quantity in VA02 for the above material the following warning message is appearing.
    Change in quantity / date may result in different BOM. Pls configure.
    I am not going to create PR or Delivery document as a subsequent document for the same.
    Pls advice. Why the message is getting pop-up.
    Thanks in advance
    Raman

  • Cancel a Sales Order via IDOC processing

    Hello,
    I am trying to cancel an item within a sales order using ORDERS05 (IDOC_INPUT_ORDCHG).
    My IDOC contains the following data:
    E1EDK01-ACTION = 003 (Changes in one or more items)
    E1EDK02-QUALF  = 002 (Vendor Order)
    E1EDK02-BELNR  = SAP Sales Order Number to be updated.
    E1EDP01-POSEX  = SAP Sales Order Item Number to be deleted (eg. 000010).
    E1EDP01-ACTION = 003 (Item cancelled)
    E1EDP19-QUALF  = 002 (Material number used by vendor)
    E1EDP19-IDTNR  = SAP Material Number of Item to be deleted
    However it does not seem to be working correctly. Instead of removing the item from the sales order - it actually creates a new item.
    Has anyone had any experience with successfully cancelling an item using IDOC processing?
    Any assistance would be greatly appreciated.
    Thanks and Regards,
    Corinne

    Hi Corinne,
    I don't think you'll get back the response you want from SAP.  This idoc was originally created to support the EDI scenario where your customer makes a change to their purchase order.  The EDI message would be sent to SAP to update the corresponding sales order in your system (after being mapped to an Idoc).
    As your customer does not normally not have your sales order item number in their system, they can only send their own purchase order item number.  SAP then uses this number to look up the corresponding SAP sales order item number via the VBAP-POSEX field (which in this scenario is originally populated by the Idoc which created the order from the customers original purchase order EDI message).
    So, I dont think SAP will change this functionality.  They may offer, however, a work around!
    What I still think is strange though, is that, having not found a match for your item on the POSEX field, SAP ignores the deletion flag and adds a new item to your order.  At the very least you would expect it to just ignore the item (a quick look at the code in 4.7 seems to imply that this is what SAP is trying to do - maybe a change from your version?).
    Hope that helps.
    Brad

  • Cancel Open Sales Order

    Hi Guru's ,
    I had a query regarding open sales order . We want to cancel the open sales order daily .
    The requirement is to cancel the order if it is open for 3 working days automatically through a report .
    Can I directly update the entry in the table VBAP AND VBAK depending on the order status .
    Is there any other alternative for this .
    Please suggest .
    Regards,
    Archana W

    Never ever update a SAP db table directly.
    Find a relavant BAPI to do so, and write a report program which will be run in background. Schedule the job using SM36.
    If you don't find a relavant BAPI (after thorough research) create a BDC using SHD0.
    regards,
    Aabhas
    Edited by: Aabhas K Vishnoi on Sep 25, 2009 3:25 PM

  • Cancelation of Sales order shipment doesnt reduce the withdrawal quantity

    Hi,
    I have this scenario, where if a Sales order shipment gets cancelled with a 602 Goods movement, I dont see the correct reflection of withdrawal quantity in RRP3. For eg: There was a total of 26 shipments initially, the withdrawal qty is 26 in APO, User cancelled quantity of 3 of them from a sales order delivery, so ideally the Forecast Tab in RRP3 should indicate 23 in Withdrawal and the 3 should be in the Allocated column.
    FYI:
    Forecast Consumption happens in SNP ( Consumption characteristics are Material/Plant/Customer ).
    Please advise whether we are missing any Config or is this a standard beheavior where the withdrawal quantity remains static irrespective of Delivery cancelation.
    Regards
    Gk

    Hi Gopakumar,
    If CIF is not useful for you in getting the right qty, order in live cache is not getting updated.
    in ECC you can run SDRQCR21 by giving order number can be useful as suggested by Bhramankar.
    Or you can delete the order & its delivery from live cache.
    1) get Order GUId from /SAPAPO/OM16
    2) Provide the internal order number in /SAPAPO/OM_DELETE_INCON_ORDERS and delete the order from live cache.
    3) Do CIF for the sales order and check, data will be replicated.
    Thanks,
    Bala.

Maybe you are looking for

  • Component binding inside h:dataTable fails

    Hi, I'd like to create a component binding for each commandLink to a distinct child bean inside an h:dataTable like so: <h:dataTable value="#{parent.children}" var="child">     <h:column>         <h:commandLink binding="#{child.command1}" value="do i

  • Unable to paste image from Powerpoint to Adobe X Standard

    Good Morning all, We currently have Adobe X Standard (10.1.3) installed on a Windows 2008 R2 environment shared between a dozen users. One user is attempting to copy an image from Powerpoint 2010 into a PDF. Trying the standard ctrl+c & ctrl+v comman

  • Why does the error console continuosly keep filling up ? in yellow, pink & blue messages ??

    Ok, first I am using an older, slower Mac G4 400 Mhz, PCI, "YIKES" model machine. ..... The problem is that after browsing mail for 1/2 hr., Fire Fox slows down a lot. Most likely related to my machine speed. I understand that and this machine is a b

  • Watching HDCP video on Ipad 2

    I thought it would be a simple question but every google attempt and every attempt to find an answer in this community has not answered my question...... Can a Movie from the Itunes Store that says, "your display and computer must support HDCP" be wa

  • How to import photos into iphoto from backup drive to new computer

    2008 "Vintage"  iMac recently died. Data was saved on external hard drive. Purchased new iMac, OS 10.9.4, how to get old iphoto library from hard drive to new computer. Iphoto 9.5.1. Thanks