Hi Deletion indicator - Sales order

Hi friends,
anybody know how to get the deleted sales oreder.
requirment is :
need to create a function module to fetch new,updated and deleted sales order details with in the particular time period and sales org..
for new orders : can get it from VBAK.
and updated : from CDHDR.
but for the deleted orders also in <b>cdhdr</b> its shows status as updated ( U ).
pls reply me ASAP if any one have idea abt this.
its urgent.
jai.

Look in table CDPOS for the same OBJECT/OBJECTID combination, with TABNAME = VBAK, TABKEY = client+SO number, FNAME = KEY and CHNGIND = D.
If the SO is deleted, you should be able to find it there.
Hope this helps.
Sudha

Similar Messages

  • WHILE DELETING A SALE ORDER GETTING A RUNTIME ERROR " Screen: Illegal message"

    Hi Experts,
    While deleting a sales order giving run time error.  PFB runtime error details.
    If you know any OSS message, please let m know. I tried, but there is no luck.
    Short text
        Screen: Illegal message
    What happened?
        The current screen processing action was terminated since a situation
        occurred where the application could not continue.
        This is probably due to an error in the ABAP program or in the current
        screen.
    What can you do?
        Note which actions and input led to the error.
        For further help in handling the problem, contact your SAP administrator.
        You can use the ABAP dump analysis transaction ST22 to view and manage
        termination messages, in particular for long term reference.
    Error analysis
        The program attempted to issue a " " message during "Exit Command" processing.
        This is an illegal operation.
        The program was terminated.
        Screen name.............. "SAPMV45A"
        Screen number............ 4001
    How to correct the error
        The program must be modified to correct the error.
        The modification must be made in "Exit Command" processing.
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
    Source Code Extract
    Line  SourceCde
        1 *---------------------------------------------------------------------*
        2 *       FORM YVBEP_LESEN                                              *
        3 *---------------------------------------------------------------------*
        4 *       Lesen der Tabelle YVBEP (nicht sortiert)                      *
        5 *---------------------------------------------------------------------*
        6 FORM YVBEP_LESEN USING US_POSNR
        7                        US_ETENR
        8               CHANGING CH_TABIX.
        9
       10   YVBEP = SPACE.
       11   YVBEP-MANDT = VBAK-MANDT.
       12   YVBEP-VBELN = VBAK-VBELN.
       13   YVBEP-POSNR = US_POSNR.
       14   YVBEP-ETENR = US_ETENR.
       15   READ TABLE YVBEP.
       16   IF SY-SUBRC > 0.
       17     MESSAGE E506 WITH US_POSNR US_ETENR.
       18   ENDIF.
    >>>>>   CH_TABIX = SY-TABIX.
       20
       21 ENDFORM.
    Could you please help on this issue.
    Thanks
    Srinu

    Hi Srinu,
    it looks like you got the error message Schedule line &1 &2 is missing in table YVBEP while deleting the sales order.
    It seems, that there are no SAP notes regarding this issue. Do you have this issue with all orders or with a single order?
    If only a single order causes this issue, maybe something was wrong during an update.
    If you get this error for many orders, then custom code (modification, enhancement, user exit in MV45AFZZ, ...) may be the reason for it.
    If you have no custom code in module pool SAPMV45A, then contact SAP for this issue.
    Regards,
    Klaus

  • Interesting scenario- user facing error while deleting a sales order

    Hello All,
    I have one interesting scenario and want feedback from your side as soon as possible
    Scenario-
    One of my clients is facing a problem while deleting a sales order.
    the sales order he is trying to delete is the old order created in 2007.
    when i see the document flow the user has created the export order, then delivered it, invoiced and sent it to accounting, accounting document is also cleared. then he cancelled the invoice, reverse PGI and deleted the delivery. the status of the sales order system is showing is being processed. but please note in this case after reversing PGI and deleting a delivery the delivery document disappears from the document flow.
    document flow looks like this
    Order - 200004715                     Being processed
    invoice- 700005310                    completed
    accounting 700005311                 cleared
    Cancel Invoice 700005315            completed
    Accounting 700005316                 cleared
    Now, in 2008 user is trying to delete the sales order but he is unable to do the same. system is giving him message "unable to delete sales order because of subsequent document 70005310 (which is invoice number)"
    Can somebody please throw some light on this problem.
    Thanks in advance.

    Hi,
    As fas as I know, this is standard system behaviour. The reason - you have done PGI (which has created a material document as well as accounting doc) and invoiced & reversed (which again has created accounting documents & rversal documents). All these documents are referencing the sales order.
    If you delete sales order, sales order number gets deleted from VBAK /VBAP tables.
    Hence, in relational data base scenario (meanin SAP in this context), deletion of sales order after creation of subsequent documents is not feasible.
    Hope it clarifies the issue.
    Regards
    Murali

  • Restrict deletion of sales order line items

    Hi,
    I need to restrict deleting of sales order line item, I think we can use the user exit, MV45AFZB, USEREXIT_CHECK_XVBAP_FOR_DELE.
    But when i set the flag to 'X', even though it does not delete at tht instance when the sales order save is clicked again the line item gets deleted.
    ANy idea , to prevent that?
    Thanks
    Keshi

    Hi Keshi,
    That is the correct exit, we are using the same without any problem. Just set US_EXIT  = CHARX.
    Regards,
    John.

  • How to delete a sales order which has already approved

    Hi,
    Could anyone please tell me how can we delete an already approved Sales order if no delivery doc is created and billing document has already been cancelled.
    When i try to delete the order it is not allowing to delete the sales order.
    It allows to put the reason for rejection in the sales order.
    It does not allow me to put the reason for rejection in the sales quotation.
    Please help and guide me.
    Thanks and Regards

    Hi,
    My query is regarding if the delivery is not there and the sales order is already approved and if the billing docu has been cancelled then why can not we delete the sales order?
    After that i need to put the reason for rejection in the sales quotation.
    So please guide me.
    Thanks and Regards
    Edited by: MPVash Vash on Jul 22, 2008 7:29 AM
    Edited by: MPVash Vash on Jul 22, 2008 7:29 AM

  • I have deleted a sales order,how to retreve the same document number

    Hai,
        I have deleted the sales order,so that document number is out.When i craete the next order will i get the same number which i have already deleted.
    I want the same number again,for that what should i do...
    I dont want that number be missed,the reason is there should be a flow in number,with out missing some numbers in between.
    Thx
    Venu
    Edited by: venugopal on Aug 6, 2008 9:12 AM

    Dear Venu
    Yes this is possible but should not hand over the responsibility to end users.
    B4 implementing this in production, please test a document and proceed.
    Go to VOV8, select your order type and execute.  There see what numeric value is maintained against the field "No.range int.assgt".  Now go to VN01, [click on Status]  tab and go to that number.  On your right, you can see the last generated sale order number with editable option.  You can change it.
    For example, if your last created sale order reference is 805, you will see this 805 in the above area.  Change it to 804 and save.  Now if you create a new order, the reference of that particular sale order will again be 805.
    But as I already mentioned, each and every time, you need to go and change this area which is not recommended. 
    thanks
    G. Lakshmipathi

  • Deletion of sales order

    Hai Gurus,
    I want to mass delete the pending sales order for which no delivery hasnt yet done.
    Please guide me with any t.code for mass deletion as there are 2500 nos so deleting one by one is a hectic task.
    As i have pull out all the sales order from Va05. with organisation data.
    With regards

    Dear Saju
    Create a recording for VA02 for LSMW and delete.  But it is not advicable to delete the sale orders instead you assign a reason for rejection and close the sale orders.  At a later date, if you want to track these sale orders, you can do so if you assign reason for rejection.
    thanks
    G. Lakshmipathi

  • Can we delete the sales order?

    hi,
    can we delete the sales order?

    Use transaction code SARA for deletion of sales order but as every body said it is not recommended as it might affect the documents made against it and also the master data.
    So its better to reject the sales order.
    Regards
    Prashant

  • Where Can I settle an enhancement to delete a sales order item according to the data in BDOC from CRM?

    Hi expert,
    I have an urgent requirement from the client.
    Delete the sales order item totally in ECC.
    I planned to implement this enhancement in ECC. Check the data in BDOC from CRM middleware, according to the user status in the order item,decide whether the item can be deleted.
    My question is,where can I settle this enhancement? The BADI name,user exit?
    Thanks in advance.
    Jerry.

    Hi Jerry,
    It may be delayed. you may found the solution.
    Use BADI CRM_DATAEXCHG_BADI and try the code in MBDOC_FILL or BAPI_FILL method.
    Regards,
    Bala

  • Mass Deletion of Sales order line items

    Dear Gurus..
    There is a transaction VA02 for change and deletion of sales order line items. it takes time to delete line item of sales order one by one.. is there any abap program to do this process..
    if so please let me know
    regards
    Saad Nisar

    Hi,
    You can use trx MASS with object type BUS2032 to change sales order items. Please check this link:
    Re: Mass deletion of  sales orders
    Or try LSMW.
    Regards,
    Csaba
    Edited by: Csaba Szommer on Apr 10, 2009 8:18 AM
    Edited by: Csaba Szommer on Apr 10, 2009 8:21 AM

  • Where can i see who deleted the sales order

    Where can i see who deleted the sales order?

    Hi Raja,
    Thnks for the reply.But I wanted to see Delivery Document which is not in the database as it has been deleted.
    As in this program , When I enter This Delivery Number , it says - No Changes carried out.
    Kindly provide me the program fo Delivery Document.
    Best Regards,
    Ankur

  • Is there any FM or BAPI to delete the sales orders

    Hi,
    Is there any FM or BAPI to delete the sales orders
    Thanks,
    srinivas.

    BAPI_SALESORDER_CHANGE
    [Link|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_salesorder_change-delete-sales-order-ver-470-1081398]

  • Deletion of sales orders

    hi all
    how can i delete the list of sales order from a particular date to particular date.
    regards
    venkat.

    Hi Tarun
    you can delete sales orders only if there are no subsequent documents.
    if accounting documents are generated for a sales order then
    after reversing the accounting documents with the help of FI guys then
    cancel the invoice by VF11
    reverse PGI thru VL09 and making the picking qty '0' in the delivery doc
    delete the delivery using VL02N
    then delete the sales order by VA02.
    Hope this will help you.
    Rewards point if helpful
    Regards
    Hansraj meena

  • Deleting Open sales order - in mass

    When i checked VA05 , I found many open sales order over a period of time.I want to know whether any method is there to select some sales orders from that list and delete them in mass ie at one stretch.

    Hello,
    Please use the search option at SDN forum and do not post the repeated question !! Please refer the following link for detail information !!
    [DELETING OPEN SALES ORDER|Re: Mass sales order reject/delete]
    [LINK|http://sap.ittoolbox.com/groups/technical-functional/sap-log-sd/mass-deletion-of-sales-order-1201141]
    Regards,
    Sarthak

  • Deleting the Sales Order Linked to Prodution Order

    Hi all,
      I have created Production Order with ref. to Sales Order and made the status Released.
    Now my requirement is when i am able to delete the sales order which has been linked to the production order.I.e,At what status of production order the linked sales order will be able to get deleted.
    For Eg.If the Status is settlement rule completed.them am i able to delete the Sales order.
    And how do i know the status of production order that it is being processed or it is yet to get processed.
    Thaks in advance,
    M.Badrinarain.

    Hi,
    This is common problem of deletion of sales order in MTO scenario. First thing is that you cannot delete entire production order from database. you need to TECO for the that production order.
    sales order does not gets deleted unless its subsequent document gets deleted (production order).
    So only solution here is TECO for the that production order & then reject the line item in sales order by giving reason for rejection.
    Pls refer below link
    How can I terminate the sales order item?
    Regards,
    Sankaran

Maybe you are looking for

  • Im Trying To Learn Java :o(

    Hey All, I have decided to get my mind active and randomly learn Java. I say randomly because i am going to be a student again in IT but i like the kinda 3D side and modelling and nice pictures and flash actionscript lol not all this stuff. Anways i

  • Can't add a program to an account in parental controls

    I'm a teacher who recently received a number of IMacs. I've set up a parental controlled account using only simple finder. I've also only allowed certain programs to be accessed via their account. My problem is that I've added the program Digicel Fli

  • How to connect to AD without using ADWS?

    How to connect to AD without using ADWS? Is it possible to do it? If yes, can teach me how to connect to AD and find their attributed?

  • Slow motion woes

    I am trying to slow down a clip of DVCProHD 25p footage to run at 50%. I have used the timing tab and set it to 'adaptive' with 'best' motion and, as there is no camera movement, set the flow smoothness to 0. Once rendered there is a bizarre warping

  • Cannot add Currency Unit in CUbe

    Hello, I am trying to add a currency unit (ZCURR1) which I created to my Unit Dimension in my InfoCube. This unit is created under the 0UNINOTASSIGNED InfoArea. The problem is I dont see any of the units (currency units etc) under the 0UNINOTASSIGNED