Sales Order Recovery from Archive

Dear Experts,
I have a Sales Order which has been deleted....
I want to recover the same..... When i use transaction code SDQRCR21 i put the material code and the plant name and tick the option for Data Transfer and then execute it....
But it does not show any data... Is this because data might have been archived... how can i recover the sales document if it is archived or otherwise...
Please help me out on this...
Regards,
Jitesh

Noone provided a solution as yet... now reason for keeping it open...

Similar Messages

  • Sales Order uplaod from JAVA to SAP R/3

    Hi all,
    My cousin is working on uploading Sales Order Document
    from java server to R/3.
    for that he is having a code from JCO jar.
    the below is the file from which one can upload his SO details from JAVA to R/3.
    But in this program he is  just able to upload one Item detail for one Sales document.
    but requirement is to upload 'n' item details for one Sales document.
    Here is the Java code.
    @author pega
    TODO To change the template for this generated type comment go to
    Window - Preferences - Java - Code Style - Code Templates
    Created on Jun 24, 2004
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    package com.sap.satyam.salesorder;
    import java.sql.Timestamp;
    import java.util.Calendar;
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.IRepository;
    import com.sap.mw.jco.JCO;
    public class SalesOrder {
         static final String SID = "R3";
         static final String errorID = "E";
         IRepository repository;
         //String orderNumber = orderCreation("M-01","3000","0002",3,"ST");
         int counter;
         public SalesOrder()
                   try {
                        // Add a connection pool to the specified system
                        JCO.addClientPool(SID,            // Alias for this pool
                                             10,            // Max. number of connections
                                             "800",           // SAP client
                                             "develop",  // userid
                                             "bslabap", // password
                                             "EN",         // language
                                             "172.18.33.20",    // host name
                                             "00");
                        // Create a new repository
                        repository = JCO.createRepository("MYRepository", SID);
                   catch (JCO.Exception ex) {
                        System.out.println("Caught an exception: \n" + ex);
         //     Retrieves and sales order Create
         public void createSalesOrder(String PO_NO, String MAT,String RQTY,String CUSTMAT, String SOLD_NAME, String SOLD_STREET,String SOLD_COUNTRY, String SOLD_POST_CODE,String SHIP_NAME, String SHIP_STREET,String SHIP_COUNTRY, String SHIP_POST_CODE)
              try {
                   // Get a function template from the repository
                   IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_SALESORDER_CREATEFROMDAT1");
                   JCO.MetaData so_metadata = new JCO.MetaData("BAPI_SALESORDER_CREATEFROMDAT1");
                   // Create a function from the template
                   JCO.Function function = new JCO.Function(ftemplate);
                   // Get a client from the pool
                   JCO.Client client = JCO.getClient(SID);
                   // Fill in input parameters
                   // Header
                   JCO.ParameterList input = function.getImportParameterList();
                   JCO.ParameterList tables = function.getTableParameterList();
                   JCO.Structure input_header = input.getStructure("ORDER_HEADER_IN");
                   // Item details
                   JCO.Table table_item = tables.getTable("ORDER_ITEMS_IN");
                   //JCO.Structure input_item = table_item.getStructure("ORDER_ITEMS_IN");
                   // Partner details
                   JCO.Table table_partner = tables.getTable("ORDER_PARTNERS");
                   // Populate the header details
                   input_header.setValue("ZAD5","DOC_TYPE"); // Document Type
                   input_header.setValue("3000","SALES_ORG"); // Sales Organization
                   input_header.setValue("10","DISTR_CHAN");  // Distribution Channel
                   input_header.setValue("00","DIVISION");  // Distribution Channel
                   input_header.setValue("20041212","REQ_DATE_H");// can be changed in yyyymmdd (Requested date)
                   input_header.setValue(PO_NO,"PURCH_NO_C");// can be changed ( Customer PO Number )
                   //Populate the item detalis
                   table_item.appendRow();
                   table_item.setRow(1);
                   table_item.setValue("000010","ITM_NUMBER");
                   table_item.setValue("AA01","PO_ITM_NO");// can be changed
                   table_item.setValue("IAD-SC3000","MATERIAL");
                   table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
                   table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
                   table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
                   table_item.appendRow();
                   table_item.setRow(2);
                   table_item.setValue("000020","ITM_NUMBER");
                   table_item.setValue("AA01","PO_ITM_NO");// can be changed
                   table_item.setValue("IAD-SC3000","MATERIAL");
                   table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
                  table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
                   table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
                   //Populate the Partner details
                   // Sold to Party
                   table_partner.appendRow();
                   table_partner.setRow(1);
                   table_partner.setValue("AG","PARTN_ROLE");
                   //table_partner.setValue("0000002007","PARTN_NUMB");
                   table_partner.setValue("0000100067","PARTN_NUMB");
                   table_partner.setValue(SOLD_NAME,"NAME");  // can be changed
                   table_partner.setValue(SOLD_STREET,"STREET"); // can be changed
                   table_partner.setValue(SOLD_COUNTRY,"COUNTRY");
                   table_partner.setValue(SOLD_POST_CODE,"POSTL_CODE"); // can be changed
                   // Ship to party
                  table_partner.appendRow();
                   table_partner.setRow(2);
                   table_partner.setValue("WE","PARTN_ROLE");
                   table_partner.setValue("0000100067","PARTN_NUMB");
                   table_partner.setValue(SHIP_NAME,"NAME");// can be changed
                   table_partner.setValue(SHIP_STREET,"STREET"); // can be changed
                   table_partner.setValue(SHIP_COUNTRY,"COUNTRY");
                   table_partner.setValue(SHIP_POST_CODE,"POSTL_CODE");// can be changed
                   // Call the remote system
                   client.execute(function);
                   // Print return message
                   JCO.Structure ret = function.getExportParameterList().getStructure("RETURN");
                   System.out.println("BAPI_SALES_ORDER_GETLIST RETURN: " + ret.getString("MESSAGE"));
                   // Get table containing the orders
                   //JCO.Table sales_orders = function.getTableParameterList().getTable("SALES_ORDERS");
                  JCO.Field sales_order = function.getExportParameterList().getField("SALESDOCUMENT");
                   // Print results
                   String so = sales_order.getString();
                   String message = ret.getString("MESSAGE");
                   String message_type = ret.getString("TYPE");
                   if  (message_type.equalsIgnoreCase("E"))  {
                        System.out.println("Error in Sales Order Creation:" + message);
                   else{
                        System.out.println("Sales Order " + so + " Created Succesfully");
                   // Release the client into the pool
                   JCO.releaseClient(client);
              catch (Exception ex) {
                   System.out.println("Caught an exception: \n" + ex);
         //     Retrieves and sales order Create
          public void listSalesOrders()
               try {
                    // Get a function template from the repository
                    IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_SALESORDER_GETLIST");
                    // Create a function from the template
                    JCO.Function function = new JCO.Function(ftemplate);
                    // Get a client from the pool
                    JCO.Client client = JCO.getClient(SID);
                    // Fill in input parameters
                    JCO.ParameterList input = function.getImportParameterList();
                    //input.setValue("0000002007", "CUSTOMER_NUMBER"   );
                    input.setValue(      "3000", "SALES_ORGANIZATION");
                    //input.setValue(         "0", "TRANSACTION_GROUP" );
                    //input.setValue("PO_NUMBER_JAVA01","PURCHASE_ORDER_NUMBER");
                    // Call the remote system
                    client.execute(function);
                    // Print return message
                    JCO.Structure ret = function.getExportParameterList().getStructure("RETURN");
                    System.out.println("BAPI_SALES_ORDER_GETLIST RETURN: " + ret.getString("MESSAGE"));
                    // Get table containing the orders
                    JCO.Table sales_orders = function.getTableParameterList().getTable("SALES_ORDERS");
                    // Print results
                    if (sales_orders.getNumRows() > 0) {
                         // Loop over all rows
                         do {
                             counter++;
                              System.out.println("--" + counter + "--
                              // Loop over all columns in the current row
                              for (JCO.FieldIterator e = sales_orders.fields(); e.hasMoreElements(); ) {
                                   JCO.Field field = e.nextField();
                                   System.out.println(field.getName() + ":\t" + field.getString());
                              }//for
                         } while(sales_orders.nextRow());
                    else {
                         System.out.println("No results found");
                    }//if
                    // Release the client into the pool
                    JCO.releaseClient(client);
               catch (Exception ex) {
                    System.out.println("Caught an exception: \n" + ex);
         public static void main(String[] argv) {
              SalesOrder so = new SalesOrder();
              so.createSalesOrder("PO_NUMBER_JAVA02", "","0000000020000","121-223-2332-1231", "SOFTWARE SYSTEME GMBH-WE", "STREET-SH","US", "53125","SOFTWARE SYSTEME GMBH-WE", "STREET-SH","US", "53125");
              //so.listSalesOrders();     
    >>>>Please if any of SDN users can help in resolving this issue. It will be very helpful to my cousin.

    Before:
    //Populate the item detalis
    table_item.appendRow();
    table_item.setRow(1);
    table_item.setValue("000010","ITM_NUMBER");
    table_item.setValue("AA01","PO_ITM_NO");// can be changed
    table_item.setValue("IAD-SC3000","MATERIAL");
    table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
    table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
    table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
    table_item.appendRow();
    table_item.setRow(2);
    table_item.setValue("000020","ITM_NUMBER");
    table_item.setValue("AA01","PO_ITM_NO");// can be changed
    table_item.setValue("IAD-SC3000","MATERIAL");
    table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
    table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
    table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
    Try to add:
    //Populate the item detalis
    table_item.appendRow();
    table_item.setRow(2);
    table_item.setValue("000020","ITM_NUMBER");
    table_item.setValue("AA01","PO_ITM_NO");// can be changed
    table_item.setValue("IAD-SC3000","MATERIAL");
    table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
    table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
    table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
    table_item.appendRow();
    table_item.setRow(2);
    table_item.setValue("000020","ITM_NUMBER");
    table_item.setValue("AA01","PO_ITM_NO");// can be changed
    table_item.setValue("IAD-SC3000","MATERIAL");
    table_item.setValue(CUSTMAT,"CUST_MAT");// can be changed
    table_item.setValue("20041212","REQ_DATE");// can be changed in yyyymmdd
    table_item.setValue(RQTY,"REQ_QTY");// can be changed Qty * 1000
    Regards.

  • Which table I can get sales order no from delivery numbar.

    Hi,
    I want sales order no from delivery no. right now I am using table VBFA where I am passing VBELN and POSNN and geting sales order no. but performance of select query is very poor bcouse I am not passing first two key fields in the select query.
    Is there any other tablefrom where we can get sales order no. from delivery no. so that performance of report can be improved.
    Thanks,

    hi,
    sales doc header ( table VBAK ) copy to Delivery header table( LIKP)
    sales doc item table ( VBAP) copy to Delivery item table( LIPS)
    you can see this in copy control VTLA ,
    now u want slaes doc no. from dilv doc. no.
    so go to t-code se11.....
    fill table LIKP u will get VBELN field for deliv doc no, & TERNR field for sales doc. no.
    so if u want to call sales doc no from dilv doc no.. u can use table LIKP in ur report.
    i hope it will help u.

  • Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and  yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Thanks for your advise.
    However, I missed to mention that we have two set of users  One is for Finished Goods and another for Spares.
    Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
    As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
    Further, I tried to test one scenario through Processing Constraints but it did not work.
    Application
    OM
    Validation Type
    Entity
    Temp
    Short Name
    TBL
    Validation Semantics
    Created By
    Equal To
    User(Myself)
    Processing Cosntraint
    Application
    OM
    Entity
    Order Header
    Constraint
    Operation
    User Action
    Create
    Not Allowed
    Conditions
    Group
    Scope
    Validation Entity
    Record Set
    Validation Template
    101
    Any
    Order Header
    Order
    Above Created
    Please advise.

  • Stop sales order replication from CRM to R/3

    Hi friends,
    How can we stop the sales order Replication from CRM to  R/3? Pls Guide me.
    Thanking u in advance.

    Hi Madhu,
    You can do by making distribution lock set in further statuses  of the CRM sales order.
    It will stop replication of CRM sales order to ECC.
    Regards,
    Madhu

  • No new item in sales order refernced from quotation

    Dear All,
    I am creating sales order which is referenced from Quotation.
    I should not able to add item directly in sales order other than item which i got from quotation. i have checked copy control of QT to OR but could not find
    how can i do this?
    please help

    Hi friend ,
    In order that you should not be able to enter any item in the sales order apart from reference to  the quotation .
    1. Goto VOV8 .
    2. Select your sales order type , enter into it , in General Control , Select Reference Mandatory press F4 select  " With Reference to Quotation".
    This will solve ur problem .
    Reward if it helps .
    Regards,
    Aditya.

  • How to get master sales order number from delivery number

    Hi All,
    I need logic for getting master sales order number from available Delivery number.
    Note: There can be many SO's in diffrent levels.
    Finally i need to pick up master sales order no.
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have a outbound delivery[VL03N] 'X' in my system .
    Then for getting sales order no i am writing below code:
      SELECT single vbelv vbeln
             from vbfa
             INTO (vbelv, vbeln)
             where vbeln   EQ p_vbeln AND
                   vbtyp_n EQ 'J'.
    Then vbelv i need to pick up master sales order no.
        SELECT vbelv vbeln
               from vbfa
               INTO TABLE i_so
               where vbeln   EQ l_vbelv AND
                     vbtyp_n EQ 'C'.
    If i write code as above it is giving four sales orders which one of them is master sales order no!
    Thanks,
    Deep.

  • Archive sales order BOM for archived sales order.

    hi,
    i have a very strange situation.
    i have few sales order BOMS to archive, we have VC (variant config) in place.
    now while trying to archive the BOMS i get the error message that "the sales order doesn't exists in the database or archived".
    i checked in the SD tables, and it seems that sales orders are archived. now how to archive those order BOMS????
    kindly give your inputs.
    Best regards,
    Maulin

    Hi Mr. Maulinmunshi,
    As per my understanding, you can't archive the BOMs with making the sales order visible in system.
    Try to check the order in T-code SARI.
    Talk to your basis team and get back those sales order in the system
    Hope this helps.
    Regards,
    MT

  • Workflow fo returned sales order modified from updating the billing block t

    please tell me how to find returned sales order modified from updating the billing block to delivery block and how to create blocks here.i want to know updating means what is happening here.

    Thread locked.
    Beginner questions are very welcome, but your question makes it obvious that you didn't even bother looking at the help or searching on SDN.
    Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] on how to post a good question and make a little effort yourself before expecting people to give up their time to help you.

  • Find Sales order number from IDOC number

    I have a bunch of SO idocs, in status 64. They are then posted and Sales orders are created.
    How can I programatically find the Sales order Number from the Sales Order idoc number once it is in status 53 (other than going to EDIDS and checking if status = '53' and grabbing the 'STAPA2' field there ).

    Look at table EDIDS for sales order idocs and you can see SO number in any of STAPA1/2/3/4 variable for specific message id and message number.

  • Sales Order data from CRM

    Hi all,
    I want to upload Sales Order data from CRM to BW with DataSource "0CRM_SALES_ORDER_I".
    The upload fails due to missing information that are needed in the first update rule of the Sales ODS "0CRM_SALO". In this update rule some formulars on data field level are created that require this information.
    Examples of fields that are not delivered from the CRM:
    0CRMLREQSCH     L. Req. Deliv. Date
    0CRM_DLVSCH     Last Delivery Date
    0CRMPAVSCHW     MAD (Requested)
    0CRMPAVSCHC     MAD (Confirmation)
    0CRMPGISCHW     Pl. GI Date (Req.)
    0CRMPGISCHC     Pl. GI Date (Conf.)
    So what is to do? Enhance the extractor or are there alternatives.
    Cheers
    jb

    Hello jb,
      Were you able to resolve your problems with Sale Order?
          thanks,
              dmitriy.

  • Fetch Sales order & item from Prod ord to TR Header text when staging mat

    Hello
    We have a need to see Sales order and item number in TR header text when selecting TR to be processed in transaction LB10.
    TR´s are created via transaction LP10. Is there any solution to get Sales order number from Production order to be automatically pasted to TR header text field when generating TR?
    SO & item is always available in Production order General data.
    Thanks for answers!
    -A
    Edited by: A_R_FIN on Feb 5, 2010 8:34 AM

    Hi,
    I hope the below link will help you.
    Help needed with BAPI_SALESORDER_CREATEFROMDAT1 parameters
    Thanks,
    Khushboo.

  • Sales order released from Credit block, but Purchase Requistion not created

    Hi,
    In third party sales scenario based on Scheduline Line category configuration purchase requistion creates when the order is created. If order is blocked for credit check then purchase requistion will not be created until order released from credit.
    Here my scenario is
    I have two users like A and B. When A releases the order from credit block by using transaction VKM1, Sales order releasing from credit and creating Purchase requistion. But, if the order is released by B, Sales order is getting released from credit but purchase requstion is not getting created.
    There is no issue from security side, we activated trace and analysed everything it is not security issue.
    Thanks and Regards
    Alokam Chandra Sekhar

    Hi Lakshmi,
    Thanks for reply. I followed your instructions, pls find my observations below.
    1. Can you check the below settings:
    What is the Credit status in the header status tab page of the sales order for the B's sales order?
    Is it "Not approved or releasedu201D If it is not approved, you might have released the sales order in VKM3, but you might not have saved it.
    Reply: We are releasing order through VKM1 and after releasing the order the status is showing as "Released".
    2. Did you use the same material for B's Sales order? If it a different material check the Item category and Schedule line category whether these are same with A's sales order.
    Reply: Both the orders has same information, like material Item category and scheduline category
    3. Check in the Schedule line tab page --> Procurement button whether you have maintain vendor, Source determination and Info record.
    Source list has been verified through ME03 transaction and vendor data maintained correctly.
    I really appreciate your time and efforts on this.. looking forward some more suggestions...
    Thanks and Regards
    Alokam Chandra Sekhar

  • Duplicated Reqments when generating a sales order starting from a quotation

    Hi to all,
    we have a problem when we create a sales order starting from a quotation with ATP check activated on both the objects.
    The problem is that the system does not delete the requirements of the material on the quotation and so the requirements are duplicated (from quotation and sales order).
    The quotation rows are correctly closed but the requirements are still alive.
    Have you got any suggestion to solve it?
    Thanks in advance!
    Maria

    Dear Sai,
    Thanks for this note I am going to try it, however I have some concerns because the issue is only happening in production, with 1 custoemr only, and QA is an updated copy of production and I could not replicate the error in QA using the same customer....
    If anyone has any other ideas please I would appreciate it
    thanks
    Kikas

  • Stoping Sales Order types from specific plant

    Dear Friends,
    My client want to stop creation of specific sales order types from a specific plant. Means if that specific plant entered in sales order then system should not process that sales order further.
    Note : Material transference must not be affected while implementing above requirement.
    Kindly suggest the solution in this matter.
    Thanks & Regards,
    Savi

    The best way would be to prevent this through your organizational design (Enterprise Structure)
    You can limit which plants can be used for each combination of sales org/distribution channel  & you can define which order types can be used for a given sales area.
    You can use exclusion procedure and records to stop the combination of orders type and plant. This is not a use fiendly solution as the user doesn't receive a very useful error message.
    You can use the user exit as mentioned before.

Maybe you are looking for

  • IDoc - ORDERS05 - Inbound - IHREZ_E

    What segment/field/qualif should I be using to populate the field VBKD-IHREZ_E at the header level? When creating a new sales order, I am able to populate VBKD-IHREZ_E at the item level by using E2EDP02/BELNR and qualifyier 044. However, i would like

  • Deletion of name in trading partner identification of host trading partner

    Hi, Is there a way to delete the name of host trading partner under Trading partner identification? I have two names to the same host trading partner "MyCompany" and "TestCompany". Now i want to delete "TestCompany" from the list (It is not showing m

  • How do I remove duplicate "(backup)" files on iTunes?

    I just got a iPhone and they transfered all my contacts from my old phone to the iPhone at the AT&T store. I setup Exchange on it and now I have a duplicate of just about every contact. When I go back to group view, I see duplicates of all the contac

  • Customize list using Info-path - Data Connection Error

    We have an issue while customizing list using Info-path, we are configured a data connection inside the info-path the connects to SQL and it works fine. then we decided to migrate it to another site under another web application on the same server, b

  • Unable to download ODAC

    When I try to download the Oracle Data Access Components the download never starts. File: http://download.oracle.com/otn/other/ole-oo4o/ODTwithODAC1110621.zip When I try to ping download.oracle.com I get no response. This problem has been occurring f