I want an information to retrive deleted records for a sales order.

Hi technicals,
  This is suresh.I need a help from you .
I have designed a BAPI which is going to retrive the New records ,updated records for a particular sales order based on the sales organization.But when i am trying to retrive the data for deleted records it's not getting any data.
  Is it possible to get the deleted records for particular sales order based on sales organization.
if it is possible ,then let me know whether there is any function module to get the
deleted records based on sales organization.
Please help me to solve the problem.
Thanks in advance,
suresh..

I'm not aware of a FuMo
SAP deletes VBAK hard on database. Only trace in ChangeHist is possible.
Ask Table CDHDR & CDPOS for those...
OBJECTCLAS = VERKBELEG, OBJECTID = vbeln (leading zroses!), TABNAME = VBAK, CHNGID = D
SalesOrg not identificable out there...
Have fun ! Not points wanted!

Similar Messages

  • Sales order line item delete error for MTO sales order

    Dear Experts
    iam facing below error for MTO sales order line item deletion
    "For reasons of cost management, item 000040 cannot
    be deleted"
    Please help
    Regards,
    KEdar

    It looks you try to delete the sales order line item and you get this error message.
    Try to put reason for rejection for the line item and save the order. This is equal to deleting the line item.
    You can also refer the OSS note 14097 - Order item cannot be deleted/overwritten for further information.
    Regards,

  • How to delete or activate the deletion flag for the sales order line item

    Hi All,
    I  have one Cust order & with referance to that cust order one production order is created . The production order user has done the Goods issue with 261 movement type  & GR wi 101 before 4 months back , & he has reverse  the GR  with 102 on todays date . but in materila master the  variable prize is maintain thats why it is showing  a differance in the cost .
    User want to delete the Production order as well as the custemer order From MDO4 , So we have make the Production order TECO & save , it is gone form the MD04 but the Custumer order still there . It is not allow us to cancell or reject . We have tried to maintain the reason for rejection but it showing the message that you can not activate the deletion flag for the order .
    Could you please Help me to find out the way how can i delete the custemer order ?
    Thanks In advance
    Regards
    Piyush

    W ehave Settele that order & then activate the deletion flag for the order & then cancel the sales order.

  • How to release Stock blocked against deleted line items from  Sales order.

    We have Scenario as follows.
    Sales order made for  items available in stock.  Deleted few lineitems from sales order balance items delivered and invoiced. Sales cycle is complete in all sense.
    What we have noticed is when we are creating new sales order / Delivery for deleted items from above Sales order it shows deleted quantity is blocked against old sales order. These line items are no longer
    available in old sales order since it is deleted also it is not appearing in open sales order report (VA05).
    Overall stock available is same as quantity mentioned in deleted line item.
    In MD04 - Sales requirenment transaction it shows sales order / line item against which it is blocked.
                    i.e deleted line item.
    How to release these stock and make available for sales. Any standard process available ? or any other solutions
    Thanks & Regards,

    I got a solution for my question from other forum. for info
    Go to SE38 and enter program SDRQCR21 then execute...
    Enter line item which is blocked for sales order in MD04 and enter plant then check Data
    transfer box and uncheck other boxes... It will pop up information and click yes...
    You will get one report and Stock inconsistency will go off and then check it in MD04....
    regards

  • Delete only itemno from sales order

    Dear all,
       By using this bapi BAPI_SALESORDER_CREATEFROMDAT2 i created the sales order.And i  updated the sales order.When i am deleting the item the whole sales order is deleting.How should i delete only item no in sales order.
                                             regards,
                                              malli

    Mr,
    1) Delete the Sales Order
    SALESDOCUMENT = <doc. number>.
    ORDER_HEADER_INX-UPDATEFLAG = 'D'.
    2) Delete an item of Sales Order
    SALESDOCUMENT = <doc. number>.
    ORDER_ITEM_IN-ITM_NUMBER = <item number>.
    ORDER_ITEM_INX-ITM_NUMBER = <item number>.
    ORDER_ITEM_INX-UPDATEFLAG = 'D'.
    finally:
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    Amit.

  • Purchase Info Record for Frame work Order

    Hi Friends,
    Do we have Purchase info record for Frame work Order(FO) ?. If yes, Please tell me which info category should i need to select to create a Purchase Info Record.
    Thanks

    Hi
    Is that means, Framework  PO will also use the same standard Purchase info record ?
    Thanks

  • To change/update/delete partner function in Sales order before saving it...

    Hi! All,
    I am having a unique requirement to change the partner function( BIll to party and Ship to party) for standard sales order in the  order save badi implemtation.
    Please sugest a FM that will be appropriate for this functionality.
    One more thing that i am able to do is that i am able to add one more BIll to party and Ship to party in the order but I am not able to delete the exsisting Bill to and ship to partner function from that order, SO if there is any Fm that will delete the exsisting ship to and bill to party my purpose would be solved.
    Please provide your suggetionas how can I proceed further.
    Thanks and regards,
    Mayank

    Hi,
    use the CRM_ORDER_MAINTAIN FM for changing the partners. Fill in the IT_PARNTER and the CT_INPUT_FIELDS parameters.
    For how to fill in I advise you set a breakpoint in this FM and do a partner change in the Sales Order Document.
    You can also find a lot of threads in the forums regarding the ORDER_MAINTAIN FM.
    BR,
    Erika

  • Want to change output type for 10000 sales orders through MASS

    Hi Friends,
    I would like to change the Output type in the sales order for 10000 sales orders.
    Can I do with MASS transaction. If so, Plz let me know how ?
    Is there any other process to change the output type for 10000 sales orders, as its difficult to manually in each and every sales order.
    Its very urgent issue, Plz let me know at the earliest.
    Thanks & Regards,
    Praveen Kumar. A

    This may be little tough for 10000 sales orders.
    1. You have to remove the output record for the irrelevant output record using tcode VV12 for the relevant document type. So now for the document type, the old output wont be triggered.
    2. Now, create output records for hte correct output type in VV11 tcode(for the output type BA03) for the document type. Now this output will be triggered for all the document types you are creating from now onwards.
    3. To trigger the output type BA03, in all the old orders, you just have to open these sales orders in change mode (VA02), and just save it. When u open it the output type BA03 will be automatically triggered as the master data is maintained in VV11. But because just opening all the 10000 sales orders in VA02 one by one be a mechanical task, you have to think of some tool for this.
    May be a CATT procedure can do the trick. Else, you can just create a small program, where you can upload these sales orders and the program will just open these orders in change mode and just saves it (without making any changes). Then the output will be retriggered.
    Here again, if you are printing the output directly, it is advisable to trigger the output in batch mode(Date/Time field is 1 in VV11), and then you can again trigger the printing again using the program RSNAST00 after office hours for these 10k orders.
    I hope I answered ur query.
    Pls lemme know if you need some more info. (You can reward me too...)

  • Delete Credit Card from Sales Order

    Hi Gurus
    I have some issue in releasing sales order to accounting... in this process the only solution I am finding is to delete the credit card info from the sales order. Do we have a BAPI or BDC is the only option.
    Thanks
    Ram Kumar

    Mr,
    1) Delete the Sales Order
    SALESDOCUMENT = <doc. number>.
    ORDER_HEADER_INX-UPDATEFLAG = 'D'.
    2) Delete an item of Sales Order
    SALESDOCUMENT = <doc. number>.
    ORDER_ITEM_IN-ITM_NUMBER = <item number>.
    ORDER_ITEM_INX-ITM_NUMBER = <item number>.
    ORDER_ITEM_INX-UPDATEFLAG = 'D'.
    finally:
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    Amit.

  • Condition records in ERP sales order still there after deletion

    Hello,
    I have maintained all the settings needed for lean order (creating ERP sales order from crm opportunity in CRM webui).
    Now when i create a ERP sales order in CRM using LORD, there are certain condition values determined correctly (note that they are variant based condition values).
    However depending upon the sales scenario, certain conditions are to be deleted from pricing details at item level. So, far no issue.
    After I save this ERP sales order, and go to see it in our ERP system, i find that those condition values are still there !
    I am unable to understand why this is happening.
    Please help me.
    Regards

    Hi,
    Thanks for your reply, for your question "One more point confirm with you, you create sale order in CRM as a CRM order ( type LORD), and the order will transfer to ERP by CRM middleware, right?" , the answer is no i dont create a CRM order, however i create an ERP order in crm webclient. This feature of CRM 7.0 is explained in following documentation:
    http://help.sap.com/saphelp_crm70/helpdata/en/17/99fb62928c46c28c10f3ebc52fdfa8/frameset.htm  (then navigate to Entry of ERP Sales Transactions in SAP CRM)
    As you also asked me to change the settings of condition type as manual input, which cannot be done because this will affect our business process to large extent, and my users will not accept it, hope you understand my situation
    Please let me know if you can help me in some other way, or you want me to check some more settings.
    Regards
    Edited by: ar_on_crm on Jan 6, 2011 11:03 AM

  • Not to be able to delete line items from sales orders

    I have to do something so as not to be able to delete the line items from a sales order if I have already received a down payment for this sales order

    Dear Stilianos
    Assign Reason for Rejection for that line item and create a new line item in the same sale order.
    Incidentally, why do you want to delete the line item ??
    thanks
    G. Lakshmipathi

  • Delete Pricing Condition IN Sales Order

    Hello Forum,
    Does anyone know how to delete a specific pricing condition in a Sales Order.
    In a sales order for each line item there are multiple pricing conditions. I need to delete a specific price condition 'ZZZZ' for instance then how do I go about it?
    This is what I have been able to find out so far.
    1. Does NOT seem to be possible by BDC because there is no way to position the cursor on the particular condition record I require.
    2. Although there is BAPI_SALESORDER_CHANGE, SAP via an OSS note specifies that this BAPI CANNOT be used to delete  condition records.
    3. None of the PRICING function modules seems to work for deletion. I did find out a function module PRICING_DELETE_LINE but this seems to rely on being called via SAP Standard function.
    I have tried searching for some means to do this and I hope that someone on this forum can give me some help on the same.
    Regards,

    Hi Peter,
    Your reference to OSS Note 593246 saved me from hitting my head to the wall, I had almost given up. Thanks a lot.
    Here is the code, in case any one needs to add or change a condition type on the sales order.
    REPORT ytest.
    DATA:lt_conditions_in TYPE STANDARD TABLE OF bapicond,
         lt_conditions_inx TYPE STANDARD TABLE OF bapicondx,
         lt_return TYPE STANDARD TABLE OF bapiret2,
         ls_logic_switch TYPE bapisdls,
         ls_order_header_inx TYPE bapisdh1x,
         ls_conditions_in TYPE bapicond,
         ls_conditions_inx TYPE bapicondx.
    ls_order_header_inx-updateflag = 'U'.
    ls_logic_switch-cond_handl = 'X'.
    ls_conditions_in-itm_number = '000010'.
    ls_conditions_in-cond_type = 'PR00'.
    ls_conditions_in-cond_value = '21.11'.
    ls_conditions_in-currency = 'USD'.
    APPEND ls_conditions_in TO lt_conditions_in.
    ls_conditions_inx-itm_number = '000010'.
    ls_conditions_inx-cond_type = 'PR00'.
    ls_conditions_inx-updateflag = ' '.
    ls_conditions_inx-cond_value = 'X'.
    ls_conditions_inx-currency = 'X'.
    APPEND ls_conditions_inx TO lt_conditions_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
       salesdocument               = '0000053232'
      ORDER_HEADER_IN             =
       order_header_inx            = ls_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
       logic_switch                = ls_logic_switch
    TABLES
       return                      = lt_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      conditions_in               =  lt_conditions_in
      conditions_inx              =  lt_conditions_inx
      EXTENSIONIN                 =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait          = 'X'
          IMPORTING
           return         =
    Regards
    Amit Maole

  • Ho wto view deleted items in a sales order

    is there a way to view deleted items in sales order.?
    is there a change log that we can view?
    how can we see the change  log   of any document?
    thanks
    s. krishnan

    Hi Swathi,
    the change log is only recorded for data element fields - For example, go into SE11, choose the radio button for data type. Enter SERAIL for serial number and then go to Further characteristics tab. Here the tick for Change document tells SAP to record the changes for this field in the CDHDR and CDPOS tables.
    Reward points pls.
    Regards,
    Govind.

  • Is it possible to delete the item in sales order .

    Hi
    I have 5 items in the sales order , 
    The delivery and billing is over .
    But the one line item still shows the open status .
    Is it possible to delete that  item in the order ?
    Thanks,
    Phani

    Hi Phani,
    Is the Line Item that you want to Delete is not delivered or not Invoiced Yet?
    If you haven't done any subsequent processing with that line item, yes you can delete that line item from the sales order. result is you will not see that Line Item number again in the sales order. Even if you look at the sales order line item table, you cannot see that LI number.
    Eg:
    If you have 5 line items, 10, 20, 30, 40 & 50, you have NOT DONE delivery billing to any line item (Say 30), you can delete that line item without any issue by selecting DELETE ITEM option in the sales order /Item Overview tab.
    Prime Requirement for Deletion: No Delivery billing should be done
    If you have partially delivered and / or billed, in that case you cannot use that option.
    Then you have another option to close that line.
    Go to Line item & select a "Rejection Reason" there. Though you have partially delivered & invoiced, now your line item is closed. It won't appear in you MRP also.
    Eg: If you have 100 quantity in the line item, and you have delivered 80. and customer don't want any deliveries again, In that case you can do this.
    Best thing is create a new Rejection Reason as "Complete".
    Then assign that  "Complete" rejection reason, for this type of scenarios.
    Best regards,
    Anupa

  • Bapi or FM to delete Pricing condtion from sales order

    Hi,
    I have a requiremnet where i need to delete the pricing condition .The sales order is changed by one proxy program and then the pricing condtion record is appearing twice in order this because of the condition origin is automatic.
    one entry is for automatic and one entry ( changed manually ) is which we are passing to the bapi 'BAPI_SALESORDER_CHANGE' FM in the proxy program  .
    I need to delete the record for automatic .
    I have checked the bapi 'BAPI_SALESORDER_CHANGE'  but not working...
    can anyone let me know any bapi available to delete the procing condition.
    Regards,
    raj

    Hi,
    Any one please.
    Regards,
    raj
    Edited by: kumar raj on Apr 28, 2009 2:25 PM

Maybe you are looking for