Deleted sales documents

hi,
I want to get report based on the deleted sales order documents. I know CDPOS/CDHDR stored all the deleted documents. how can i get all those deleted documents in BW side with old values. is it possible? and give me a suitable information. guide me....
Thanks,

Hello,
You can get cancellation indicator from the VBAP and VBAKas well as I guess.Did you looked into these tables??
CDHDR and CDPOS dopes keep trace of all the changes but then you will have to keep the track for change numbers and from the CDPOS you will have to track the field which is getting changed.
I am not sure how will you related change numbers to sales document because these tables do not contain sales doc and you need an object type to as a key for these tables to trace the changes related to sales doc to a particular attribute in document.
Also these are very very huge so you need all the keys of the tables to make a selection and for a good performance.
Thanks
Ajeet

Similar Messages

  • How to eliminate deleted sales document?

    Hello experts,
    I have a report based on 2LIS_11_VASCL and 2LIS_11_V_SCL. The problem I have is there was a sales document in R3 which was deleted (0doc_number) this deleted sales document is also shown in the report. How do I avoid this?
    Thanks in advance
    Fazal

    Hi,Fazal:
        You can use field ROCANCEL to eliminate the delete document.
    Best Regards
    Martin Xie

  • Deleted sales Document - Unique issue

    Hi Experts,
    We have created a contract (VA41)in the system, but failed to save or deleted by somebody. How can I see the document whether it is deleted?
    I treid with tables Tables CDHDR, CDPOS
    Use Change doc. Obje = VERKBELEG (sales documents)
    But no results, can anybody suggest?
    Prase

    Try this,
    GOTO SE16—Enter table name VBUK—Press table contents (F7)—GOTO Settings and Field for selection—select Field name BLOCK and enter
    In BLOCK enter ‘A’ i.e. Document has been selected for archiving and execute.
    Sthen

  • Sales document not able to save with rection reasons after delete the reference order

    Hi Experts,
    Good day!!
    My user wrongly created a sales order with sales document type as ZOR instead of ZORS.
    Then with reference to ZOR sales order, user created another sales order with sales document type as ZORS.
    Once he created sales order(ZORS)  with document type ZOR, he has deleted ZOR sales order.
    But after deletion of ZOR sales order user has to make those sales order line items as reasons for rejection but system not allowed to change.
                          Request you to please help how to over come this issue.
    Test case on above scenario:
    Same above scenario am trying to do but system not allowing to delete the sales order and the information message shows as "
    Item 000010 cannot be deleted (CRM does not allow deletion) Message no. V2251" Plz help this one also.
    Regards,
    Sree

    Hi,
    I've tried to simulate the scenario you were in in standard SAP system, but failed to have it reproduced, and therefore, I suppose this issue could be something relevant to the specific environment you have
    my exercise:
    create a sales order with type OR, and then create another one with OR with reference to the first one, and then have the first one deleted, check in document flow from the second order and make sure the first one is marked 'archived', and then set rejection code for the line item in the second order - I was able to save it => at last, I've got two orders, the first one archived, while the second one completed

  • To view the reference sales document of a deleted delivery

    Is there a table in SAP where I can see the reference sales document of a deleted delivery?
    Or is there a way that I can see the reference sales document of a deleted delivery.

    I dont think it is possible to track sale order reference for a deleted delivery through standard tcode.  Of course, you can see the deleted delivery details in MB51.
    thanks
    G. Lakshmipathi

  • Sales document is deleted still billing plans are in billing due list

    Hello,
    Sales document is deleted which have billing plans, But still billing plans are showing in billing due list for billing. Please let me know how to delete the entries in billing due list.
    Thanks and Regards
    Vikram.M

    Run program  RVV05IVB in SA38 to correct the billing index. Before running the program read OSS Note 128947 - Correction of SD document indexes with RVV05IVB on the checks to be done before running the program.
    Regards,

  • Warning 'sales document is not yet complete' with BAPI_SALESORDER_CHANGE after deleting correspnding delivery

    Hi,
    I'm trying to change a sales order (add some positions) after deleting the corresponding delivery to it.
    But I get the warning "sales document is not yet complete: Edit Data", because of incomplete dates in schedule lines.
    The schedule lines are filled correctly.
    When I have a Sales Order without corresponding delivery, this Order could be changed successful with BAPI BAPI_SALESORDER_CHANGE.
    But if there is a Sales Order with corresponding Delivery (where I do delete the delivery first with BAPI BAPI_OUTB_DELIVERY_CHANGE ), than the BAPI for changing the Order gives a warning "sales document is not yet complete: Edit Data".
    This is confusing.
    Is there something I have to consider when changing a sales order after deleting its delivery?
    Coding:
    "1. delete delivery to sales order
    CLEAR ls_header_data.
       CLEAR ls_header_ctrl.
       ls_header_data-deliv_numb = iv_vbeln.
       ls_header_ctrl-deliv_numb = iv_vbeln.
       ls_header_ctrl-dlv_del    = abap_true. "set flag for deletion
    * call BAPI to delete delivery
       CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
         EXPORTING
           header_data    = ls_header_data
           header_control = ls_header_ctrl
           delivery       = iv_vbeln
         TABLES
           return         = et_msg.
    IF ...
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.
    "2. change Sales order (adding new item positions)
    "add new/changed data
       LOOP AT IT_NEW_ITEMS ASSIGNING <ls_new_items>.
         CLEAR: ls_order_item_in,
                ls_order_item_inx,
                ls_schedule_line,
                ls_schedule_linex.
         add 10 to lv_posnr.
         ls_order_item_in-itm_number = lv_posnr. "posNr
         ls_order_item_in-material = <ls_new_items>-matnr. "material
         ls_order_item_in-target_qty = <ls_new_items>-menge.  "quantity
         ls_order_item_in-sales_unit = <ls_new_items>-MEINH. "sales unit
         APPEND ls_order_item_in TO lt_order_item_in.
         "fill order item check table
         ls_order_item_inx-itm_number = lv_posnr.
         ls_order_item_inx-updateflag = 'I'.
         ls_order_item_inx-material   = abap_true.
         ls_order_item_inx-target_qty = abap_true.
         ls_order_item_inx-sales_unit = abap_true.
         APPEND ls_order_item_inx TO lt_order_item_inx.
         "schedule lines
         ls_schedule_line-itm_number   = lv_posnr. "posnr
         ls_schedule_line-sched_line   = '1'.
         ls_schedule_line-req_qty      = ls_order_item_in-target_qty. "quantity
         ls_schedule_line-req_date      = lv_lfdate.               "schedule line date
         APPEND ls_schedule_line TO lt_schedule_line.
         "schedule lines check table
         ls_schedule_linex-itm_number   = lv_posnr. "posnr
         ls_schedule_linex-sched_line   = '1'.
         ls_schedule_linex-req_qty      = abap_true. "quantity
         ls_schedule_linex-req_date      = abap_true.               "schedule line date
         ls_schedule_linex-UPDATEFLAG  = 'I'.
         APPEND ls_schedule_linex TO lt_schedule_linex.
       ENDLOOP.
       "call bapi to add items to sales order
       CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
         EXPORTING
           SALESDOCUMENT    = iv_sales_order
           ORDER_HEADER_INX = ls_order_header_inx
         TABLES
           RETURN           = et_msg
           ORDER_ITEM_IN    = lt_order_item_in
           ORDER_ITEM_INX   = lt_order_item_inx
           SCHEDULE_LINES   = lt_schedule_line
           SCHEDULE_LINESX  = lt_schedule_linex.
    IF....
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.

    The first thing I would try is to use fm BAPI_TRANSACTION_COMMIT (with parameter WAIT = 'X') instead of COMMIT WORK AND WAIT which is directly put in your code (this is almost the same but not exactly).
    Then make sure that if your code performs two BAPI calls one after the other, they are separated with either a call to fm BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK.
    Then - if the above is applied and still does not help - I would suspect that some invalid / incomplete data is passed to fm BAPI_SALESORDER_CHANGE.
    regards

  • Deleted sales order remains in document flow

    Hello!
    The problem:
    We had sales order with reference to a contract. We deleted the sales order (it doesn't appear in VBAK anymore), but, the sales order still appears in VBFA (if we see the document flow for the contract, the sales order still appears there as archived!!!)
    I deleted  the sales order in a regular way via VA02.
    I heared that there is a function module or another solution to fix the document flow.
    I also saw a solution for this kind of problem for delivery (SAP note 74513).
    Please assist,
    Thanks

    Hi!
    Thanks to Jelena!!!
    As she wrote that in these cases OSS can solve the problem and it happens a lot, we opened an OSS and got an answer:
    OSS answer:
    when you delete an order the corresponding entry in VBFA is not
    deleted. The system is not able to differ between archived and deleted
    orders, so to ensure that the document flow is also showing archived
    documents the entries in VBFA remain. This is also described in
    attached note 390905. When you are sure which entries in VBFA can be
    deleted you can use report SDVBFA00 to delete the entries.
    What we need to do:
    go to SE38 and run report SDVBFA00.
    Sales document is a contract number (preceeding document)
    "Delete" - put X or leave empty.
    The logic is:
    You put the preceeding document and leave the field "Delete" empty.
    The program finds by himself all the sales orders (following documents) that are connected to this contract and are deleted.
    You check that the system suggests to delete the correct sales orders
    Run this report again, but this time put X in "Delete" field and the sales orders will be deleted.
    Apparently there are several reports exist to solve VBFA problems SDVBFA00,SDVBFA01 etc.
    Thanks!

  • Sales document flow(vbfa) entries are deleted

    Hi Guys,
            I am facing a problem with VBFA table. Actually for some delivery i am able to get Sales order number from VBFA table but for some delivery there is no records exists in VBFA table. So just want to know is there any program or Funtion module which delete entries from VBFA table if not then is there any functional configuration which not allowed to enter data in VBFA table. In my system i searched for all the programs and function module  but no luck.
    I can saw the Sales document flow in VL03N but no entries in VBFA table.
    thanks,
    Baidya

    Hi  Guys,
          Thanks for the replies.
    But this is true for some delivery there is no entries in VBFA table but entries are exist in LIKP and LIPS. We are using userexit in sales order program for creating delivery. The Function module  which creates delivery inside the USER-EXIT is : BAPI_OUTB_DELIVERY_CREATE_SLS.
    If anyone face this type of problem please reply..
    Thanks,
    Baidya

  • Sales document 400136021 is currently being processed (by user MNAUSHAD (C2

    Hi Friends,
       Iam using Mobile Sales and iam getting an error when iam opening the sale order created in laptops
       Scenario : Sale order created in laptop got replicated in CRM and R/3 and delivery got created in
                       R/3.
                       The replicated sales document is not seen in the Document flow in CRM enterprise
                        I could not find any queue's in SMQ2 or in SMQ1 both in R/3 or in CRM.
                        when i open the same sale order in VA02 iam getting the error.        
       Sales document 400136021 is currently being processed (by user MNAUSHAD (C2)
       Let me know if any of you has faced the same issue,
       Regards,
       Satish Kumar

    Hi Wolfard,
    Please find my answers,
    1. Does this error also occur when creating a similar sales document in CRM directly (i.e. it is rather a   CRM related issue than mobile related)? -  No from CRM enterprise to R/3 i dont find an error-  It is more of a Sync issue between Mobile> CRM> R/3.
    b) Do you know a user or batch name in CRM resp R/3 with that name mentioned by you?
        I know the user name - but this user name is not at all related.
    c) Please be aware that those queues smq1/2 are dynamical i.e. after processing the data the entries were deleted again; only in case of a sys fail the queues would be stopped; in the particular case of waiting for processing in R/3 there would be a queue status "WAITUPDA"
    I accept the queues are dynamic and it will deleted after it is processed,, The issue is that i dont find any queue in SMQ1 in R/3 and also in SLG1 on that particular date i could find the Log number with the error
    With the help of Log error i can find out the sale order.
    Trust it is ok
    satish

  • Report on deleted sales orders ( va02)

    hi,
    i got one requirement to write a program to display the list of deleted sales orders (through VA02 Tcode).
    to my knowledge when a sales order is deleted through VA02 the order will be deleted from the database itself and will be deleted from all the SAP tables.
    if that is correct, is there any possibility that we can create a Ztable and update the data before deletion or any other solution for the above requirement?
    thanks in advance,
    Rajani yeluri

    hi rajani,
    u will get deleted data from using tables CDHDR,CDPOS,CDRED and function module '  CHANGEDOCUMENT_READ'.
    i am sending u some sample code, i hope it will helps u
    DATA: it_editpos    LIKE cdred OCCURS 0 WITH HEADER LINE,
                                     "Change documents, display structure
          it_editpos1   LIKE cdred OCCURS 0 WITH HEADER LINE,
                                     "Change documents, display structure
          x_editpos1    LIKE cdred,  "Change documents, display structure
            x_editpos     LIKE it_editpos,
                                     "Change documents,display structure
    *-----Calling FM to populate the structure 'EDITPOS'
      CLEAR it_editpos.
      CALL FUNCTION 'CHANGEDOCUMENT_READ'
           EXPORTING
              objectclass                = ' ' 
           TABLES
                editpos                    = it_editpos
           EXCEPTIONS
                no_position_found          = 1
                wrong_access_to_archive    = 2
                time_zone_conversion_error = 3
                OTHERS                     = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR: x_editpos,
             it_editpos1.
      LOOP AT it_editpos
        INTO  x_editpos
        WHERE tcode = 'ME21N' OR  "Here u have 2 pass 'VA02'
              tcode = 'ME22N' OR
              tcode = 'ME23N'.
        APPEND x_editpos TO it_editpos1.
        CLEAR x_editpos.
      ENDLOOP.
    now it_edipos1 has all CHANGENR numbers, so now u have to fetch data from F_NEW and F_OLD Fields
    i hope this will helps u
    Regards,
    prasad

  • Reg:Deleting sales orders in bulk

    Hi Gurus,
    Can anybody through some light on the below mentioned queries.I faced this in one of my interviews .
    1.How to delete sales orders in bulk ?
    2.How to print invoices in bulk ?
    Thanking you in advance.
    With Regards,
    Sash......

    Dear sash
    1) To delete sale orders in bulk (subject to no subsequent documents), either you can use LSMW or BDC
    2) To print invoices in bulk, two options are there.  One is foreground and another one is background
    - To schedule foreground, run T.Code VF31
    - To schedule background, run T.Code VF06 where you can see a tab [Job started on]   If you fix a date and time here, that time, invoice will be printed out in mass
    thanks
    G. Lakshmipathi

  • List of deleted sales orders

    How can we find the list of deleted sales order documents.
    Is there any specific table.

    hi,
    SE16--> CDPOS->enter Object class : VERKBELEG    table name: VBAK     & enter change id:D---> keep the max no of hits  has blank----> execute
    this is give u teh details
    regards,
    Arun prasad
    Message was edited by:
            arun prasad

  • 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

  • Error while deleting SALES ORDER.

    Hi All,
    I am getting this error 'Document is being distributed - changes are not possible*' while i am trying to delete a Sales Order.
    Only SOLD to Party entry has been made for this Sales Order.
    Will be gald in case i get some pointers as to where i can find these Processing and how can i stop these Processing?
    Thanks,
    VS

    Hi VS,
    This error occurs when the SAP CRM is trying to send the sales document to the corresponding OLTP system; you need to check if it's mandatory to your business scenario distribute this document to other system.
    If your answer is NO: You can filter which document should be distributed in transaction R3AC1 (adapter object SALESDOCUMENT).
    If your answer is YES: Keep going with the currently configuration and please check if the SAP NOTE 1248701 is applied in your system. The program CRM_CHECK_DISTRIBUTION_STATUS for blocking sales and distribution documents does not work if you enter a document interval as a selection criterion, and this note fixes this issue.
    I hope it helps.
    Regards,
    Gabriel Santana

Maybe you are looking for

  • PCI-E slot possibly not working (P67A-GD53)

    Hello all, New guy here. New MSI customer and everything. I just built a new PC today with a MSI P67A-GD53. I first plugged in the VGA (a MSI GeForce GTX 560Ti OC Twin FrozR II) to the top PCI-E slot. On boot, I get what I think is a VGA problem beep

  • Not correctly localized for this language???

    Error message: this version of iTunes has not been correctly localized for this language. Please run the English version. I get this message when trying to open iTunes. I haven't changed any settings since last accessing iTunes successfully. What do

  • How to exclude files within Packages?

    I'd like to exclude certain files (or directories) from Time Machine's backup, but these files are within a Package file. iWebSites is an application that manages multiple Domain files for iWeb. It does so by copying and moving a Domain file for each

  • How to use update trigger in sql server 2008 with specific column

    Hello friends currently my trigger updates on table update, and I need to change this to only fire when specific column changes. /****** Object: Table [dbo].[User_Detail] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Us

  • SQLDeveloper Data Modeler corrupted -- No option to Open a Design

    After utilizing SQLDeveloper Data Modeler for about a day, the configuration appears to be corrupted in the following manner; Most of the tools and menus are either grayed out or have gone missing. For example, the File menu item no longer has an "Op