Craete Sales Order with reference to Schedule Agreement

Dear All,
I want to create a sales order with reference to a schedule agreement.
Purpose:
In case of quantity shortages in delivery of the schedule agreement  line item (Doc type - ZDS), customer want to send a replacement for the balance.
This replacement is send using a new sales order (Doc type - ZREP). So the requirement is to refer the schedule agreement to keep the link between initial schedule agreement & the replacement order.
I have maintain the relevant copy controls as well. (ZDS to ZREP)
I have 2 type of item categories used in the schedule agreement (ZDS).
LPN - this is for the normal delivery, billing. (Billing relevance - A in the Item category)
ZPN - this is just to do the manufacturing. No delivery billing is done using this type. (Have Billing Relevance -BLANK)
So when I try to create a Sales order w.r.t. Schedule agreement, only lines with ZPN shows me in the copying dialog.
But I want to copy lines with LPN, not lines with ZPN.
Any idea how to solve this?
Thanks a lot !

Thanks you very much for all replies !!!
Dear Raj/Ankur,
This replacement is due to quality issue in the initial sent material.
So I'm sending the same material I sent earlier from the schedule agreement LI. Only difference is to capture the replacement, I use sales order type ZREP (VA01) other than schedule agreement.
To give you more info on this,
They use Item category ZPN to produce semi-finished goods & keep it ready for that customer. Once customer asked it with specific color, they do color it & deliver & bill. To do delivery & billing they use Item category LPN.
Therefore each Scheduel agreement, they have one line with ZPN - only to production.
one or more LI's with LPN - to do subsequent delivery & billing for that customer.
So replacement should be created with reference to the LI with LPN. Because my initial delivery happened from that LI.
Everything is in place as you have mentioned.
I have maintained copy controls from ZDS to ZREP
I have copy controls from Item Category LPN to my normal order Item category.
I have schedule line copy control as well.
Am I missing anything??
And there is no issue with my Item category group & material master Item category group as well.

Similar Messages

  • Create a Sales Order with Reference to Contract using IDoc / LSMW  ( AFS )

    Hi Gurus,
    I need to crate a Sales Order with reference to a Contract. I need to upload Sales Orders with reference to contract via LSMW.
    So far, I've been able to create the Sales Order with ref to contract. But, the Sales Order Quantity is not getting deducted from the Original Qty in Referred Contract ( When try to create another Sales Order referring to the same Contract.) When a Sales Order is created manually, this is working fine.
    Please tell me if I've missed some parameter which stopping it create the link to exact schedule line ( Sizes level )
    The Details of the IDoc which is been created via LSMW are as follows;
    Message Type: ORDERS
    Basic Type     : /AFS/ORDERS05
    Process Code : ORDE / DELO
    ( Tried with both process codes.  But the Identification is the same for both: IDOC_INPUT_ORDERS )
    *_In Header;_
    Segment : E1EDK02  - IDoc: Document header reference data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped for field BELNR
    *_In Item;_
    Segment : E1EDP02  - IDoc: Document Item Reference Data *
    Qualifier : '043' - Vendor Contract Number ( Tried with ' 005' - Customer Contract, but it's not working )
    Contract Order is mapped to field BELNR
    Line Item of the Contract is mapped to field ZEILE
    I also tried passing the Schedule line of Contract in Segment :  E1J3P01 AFS IDoc: Doc.item general data
    to following fields;
    J_3AETENV
    J_3AVGETE
    /AFS/UETENR
    Still its not getting updated in the VBEP also..
    Please help me with regard to this. Points will be awarded for your valuable contribution.
    Thanks.

    Hi,
    This issue is been resolved.
    One of my friend helped me with resolving this issue..
    Once the below mentioned configurations were done on SPRO, the Sales Order was created with reference to Contract and the Qty was reflected when tried to create a new Order referring the same contract.;
    u2022     SPRO --> SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Define Sales Document Types  --> Field : Outline agreement message; from blank to u201CBu201D.
    u2022     SPRO  -->SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Maintain Sales Document Types for AFS  --> Field : Outline agreement message; from blank to u201CAu201D

  • Sales order with reference to purchase order

    Hi
    I have a scenario where i need to create a sales order from PO raised in another company code
    My client has 4 company codes
    1000 company code
    2000 company code
    3000 company code
    4000 company code
    Now
    2000 company will raise a PO on company code 1000
    So in company code 2000 i need to create a sales order with reference to PO from compcode 1000
    where all the data has to copied from PO with schedules
    so when i create a order in VA31 i have to create scheduling agreements with refernce to PO all the schedule line items should be copied?
    Is there any standard process or do i need to go for development?
    Regards

    Hi,
       As per my Understanding,
    I guess, you can do this same as creating Purchase Order-NB ( In ordering Company code)-ME21N,
    Vendor- Plant of Supplying Comp code ( Create this Plant as Vendor in ORdering Comp code)
    Purchase org/Group-
    Comp Code - Ordering Comp Code
    Material-
    Plant - Receiving Plant.
    Try n Revert-
    No Need to go for Userexit,
    My Query is: -
    Why you want to create Scheduling agreement wrt "PO" of Diff Comp Code.
    We can use the PO from Ordering Comp Code is a ref for any dispatches ( To Pass the PO requirements to Production in Supp.Comp code, while creating PO by maintaining Checking rule )

  • Creation of delivery order With Reference to Scheduling Agrrement

    Hi,
    Iam creating delivery order(VA01) with reference to scheduling agreement(VA31),in the delivery order iam getting grey on sold to party, I need the change mode in sold to party area.
    And also i changed the copy control of scheduling agreement to salesorder there i put as in coping requirments as Headder Diffrent customer,But still iam getting grey in sold to party.
    Regards,
    Ashok.

    Hi Ashok,
    Scheduleing Agreement is basically a Contract between Sold-to Party and the company. In this type of agreement We have details like what is the Material, Qty, deliveyr date etc. Agreement itself is like a order and agreement also has schedule lines so you can directly create a delivery with ref to Scheduling agreement and Tcode for creating Delivery is VL01N and Not VA01. VA01 is for creating a sales order.
    You need to set up conpy control between Scheduling agreement and Delivery and not Sales order.
    For more info go thr below link:
    http://web.mit.edu/sapr3/windocs/bpors11m.htm
    Reward if it helps.
    regards
    Srini

  • EDI: creating a sales order with reference to contract

    Dear gurus,
    we would like to create a sales order with reference to a SD contract from an ORDERS IDoc.
    OSS say we have to populate the E1EDx02 segments with the contract number to do this.
    We tested this in our system by manually editing the incoming IDoc and this is what we found:
    - qualifier u201C005  : Customer Contract Numberu201D set and BELNR = u201Cthe customeru2019s outline agreement number in his MMu201D (= normal MM behaviour) -> reference is not processed at all, sales order is created without reference
    - qualifier u201C043: Vendor Contract Numberu201D set and BELNR = our contract number in SD -> Sales order successfully created. BUT where can I store an external outline agreement number in MM so that the BELNR in the IDoc is populated with it?
    - qualifier u201C058: Customer Contract Numberu201D set and BELNR = the customeru2019s outline agreement number in his MM -> Error:
    The system could not determine a contract number
    Message no. VG226
    Diagnosis
    The system could not determine a contract number for the selection criteria: external contract number 5100000020 and customer number 0044000004.
    This error appears although we maintained the external number 5100000020 in the PO number field (VBKD-BSTKD) in our SD contract.
    Could anyone please explain what we do wrong?
    Cheers
    Alicia

    Hi again,
    @Lakshmipathi: Thank you, but it is VG226, like I wrote. But still, the OSS note is interesting: "You create a sales order with reference to an MM contract using EDI." Where's the sense in that? Why would I ever want to create a sales order with reference to an outline agreement in MM???
    @Rags: Sure we could do that, but I find it hard to believe that there is no standard way to do this. Especially given there are plenty of OSS notes stating that this is possible, e.g. note 562710.
    Any other ideas?
    Cheers
    Alicia

  • COPY CONTROL: SALES ORDER WITH REFERENCE TO QUOTATION

    Hi.
    We are creating a sales orders with reference to a quotation. When copying, we'd like to be able to include another new position type in the sales orders.
    For example:
    QUOTATION:
    POSITION 10: TYPE ZTAB
    SALES ORDERS:
    POSITION 10: TYPE ZTAB
    POSITION 20: TYPE IRSS.
    Where could we place this change?. We suppose when saving the sales orders. Does anybody know how could we make this change?.
    Thank you very much!.
    Raú

    What do you mean by position type?
    Please use the language used by SAP so that it could be easily understood.
    What is ZTAB & IRSS. Are they materials?
    Regarding copying, this is a brief theory
    In copy control, you define control data for the document flow of sales documents.
    You can specify for a particular sales document type, which document type is to be assigned to copied reference documents, and which item categories or schedule line categories are to be copied.
    You must also make specifications for copying requirements and data transfer, as well as quantity and value updates in document flow.
    In precise, you are telling the system what data to copy from QT to sales order. It copies data from Quotation order type to Standard order type basing on settings you indicated in copying control.
    System won't do anything more than copying from preceding documents and it would transfer data based on copying rules in copy control.

  • Sales order with reference to sales order

    Hi,
       I need to create a sales order with reference another sales order using bapi CreateFromDat2.  Please note, Sales Ord. Dist. channel, Div, sold-to to of the new order are different from original order.   I gave reference order in field order_header_in-REFDOCTYPE .  I am getting following error when I perform single test " FB Call: insufficient parameters.  Can any of you tell me how to overcome this issue.  And is it possible to create an order refering to another Saler order with different Sales Ord, Dist. channel, Division, sold-to ?
    <b><REMOVED BY MODERATOR></b>
    Cheers
    Sudhaker
    Message was edited by:
            Alvaro Tejada Galindo

    There is an OSS note <a href="https://service.sap.com/sap/support/notes/370988">Note 370988 - BAPIs in SD: Creation with reference</a>
    <i><b>Symptom</b>
    This note describes the problems of the 'Create with reference' function when using BAPIs to create sales documents.
    If you are working online, you can use this function module to create a sales document with reference to an existing sales document or a billing document (for example, a debit or credit memo request) according to fixed rules. The rules for transferring information from the source document to the target document are defined in the copying control on header and item level. The creation with reference permits an item selection.
    When you use BAPIs in SD, a function of this type is not fully available. A reference is only possible for a quantity contract, so that the target quantity of the contract can be reduced by the order quantity of the sales document. Furthermore, the document flow is also updated.
    As an alternative to 'Create with reference' in Transaction VA01, two variants are provided for solving the 'Create with reference' problem in the BAPI.
          1. Create a '1:1 ' - that is, a document copy of a sales document (customer quotation, order) with 'BAPI_SALESDOCUMENT_COPY'. At this point, you cannot create the 1:1 copy of either a billing document or a delivery.
          2. Create a sales document that refers to an existing document with 'BAPISDORDER_GETDETAILEDLIST' and 'BAPI_SALESORDER_CREATEFROMDAT2'.
    <b>Other terms</b>
    BAPI_SALESDOCUMENT_COPY, BAPI_SALESORDER_CHANGE, BAPI_CUSTOMERINQUIRY_CHANGE, BAPI_CUSTOMERQUOTATION_CHANGE, BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPISDORDER_GETDETAILEDLIST
    <b>Reason and Prerequisites</b>
    As of yet, no method exists for creating a sales document that refers to an existing document.
    Solution
    For solution No. 1
          1. Create the documents using the BAPI_SALESDOCUMENT_COPY function module. However, this only permits a 1:1 copy without factoring out individual items.
          2. After you have created the document copy, you can use a change BAPI to edit this copy.
    For solution No. 2
          1. Collect the data for the reference document (for example a customer quotation) with the 'BAPISDORDER_GETDETAILEDLIST' function module. In the example code, focus exclusively on the partners, items, schedule lines and conditions.
          2. Prepare the Data. Execute the 'copying control' manually. This way, you decide which values are to be transferred.
          3. Create the sales document using the 'BAPI_SALESORDER_CREATEFROMDAT2' function module by transferring the prepared data.
          4. Finally, you must remove a COMMIT WORK so that the sales document can be written into the database.
    An example of solution 2 is attached as a text file. You are allowed to select items and quantities for example, if you use input parameters. If there are no entries, then transfer 1:1 from the reference document. When you enter the 'condition type' parameter, you can determine whether conditions are copied or recalculated ('G' for transferring from the preceding document; 'B' or ' ' for re-determining, and 'C' for re-determining with transfer of the manual elements).</i>
    Sample : <a href="https://websmp108.sap-ag.de/~sapidb/012003146900000486112004E/BAPI_COPY_WITH_REF.txt">ZZ_MS_BAPI_COPY</a>
    Regards

  • Sales order with reference to PO(STO)

    Dear All
    i have a requirement where production order is booked against sales order,after production order is completed then only i able to do delivery and PGI(allesble to order scenerio).While doing STO sales order has to be created with refernce to PO otherwise i acnnot create delivery and PGI,stock wont get confirmed against purchase order.Please suggest how to create sales order with reference to PO(STO)
    all answers are rewarded
    Regards

    Hi,
    If a sales order is created in SAP R/3, a check is run in SAP APO
    to see if the required stock is available or if a production order
    already exists to cover the requirement. If not, a planned order is
    created in SAP APO to cover the requirement, and the confirmation
    date is the next date on which a block has free capacity to
    produce the relevant product. Scheduling takes place at the end
    of the block, that is to say, at the latest time. Accordingly, a
    planned order can be moved to a later date within the block
    without affecting the confirmed delivery date..
    In ur requirement you have to create a STO based on P.O.
    Open the link for configuration of STO.
    help.sap.com/bestpractices/BBLibrary/Documentation/J53_BB_ConfigGuide_EN_ZH.doc ,
    Create a Sale Order and the delivery date is confirmed based on the Production Order
    Using STO post stock to the required storage location and u can proceed with normal PGI and Billing.
    REvert back if you have any clarification.
    Regards,
    Sarosh

  • Sales order with reference to contract using IDOC_INPUT_ORDERS

    Hi all,
    I had the requirement to create sales order with reference to contract based on some validations of idoc values and then passing the modified idoc data table to IDOC_INPUT_ORDERS. I have completed the coding till the modification of data in a new function module ('Z') and then calling the IDOC_INPUT_ORDERS FM inside that. Now my problem is while creating the sales order, the bdc for Txn VA01 is not populating those values to screen fields which I want to populate. I could find out that some modifs needs to be done in some user exit for reference to contract case.But finding difficulty in getting the exact place to make the modifications. Any pointer to this problem would be highly appreciated.
    Regards,
    Divya

    Hi,
    This issue is been resolved.
    One of my friend helped me with resolving this issue..
    Once the below mentioned configurations were done on SPRO, the Sales Order was created with reference to Contract and the Qty was reflected when tried to create a new Order referring the same contract.;
    u2022     SPRO --> SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Define Sales Document Types  --> Field : Outline agreement message; from blank to u201CBu201D.
    u2022     SPRO  -->SD  -->Sales  --> Sales Documents  --> Sales Document Header  --> Maintain Sales Document Types for AFS  --> Field : Outline agreement message; from blank to u201CAu201D

  • Sales order with reference to the invoice

    How can we create a sales order with reference to the invoice

    Hi,
    1. Create sales order
    This process step can be triggered as follows:
    The customer accepts the quotation and places an order.
    You create a sales order with reference to a quotation. For more information, see Structure link processing Quotations. The system copies the items from the quotation.
    You create a sales order. This is also possible without performing the previous steps.
    2. Enter products
    You enter products requested by customers.
    Note
    If necessary, you can configure products again for every item of the sales order. You can find more information in the business scenario variant Structure linkQuotation and Order Management (Configure-to-Order) and under Structure linkProduct Configuration in the Sales Transaction.
    3. Check availability, schedule order and create requirements
    The system triggers an availability check and scheduling in SAP APO for every order item in SAP CRM. The confirmed quantities and dates are confirmed by SAP APO to SAP CRM, and saved in the sales order (see Structure linkAvailability Check in the Sales Order). At the same time, a customer requirement is created in SAP APO.
    Note
    You can also execute the availability check in SAP R/3. You can find more information under Structure linkAvailability Check with SAP R/3.
    4. Maintain and determine conditions
    The system determines the prices and the value of individual items. If necessary, you can process these. For more information, see Structure linkPricing.
    5. Perform credit check
    SAP R/3 executes a credit check based on the results of pricing in SAP CRM. The result of the credit check is confirmed in SAP CRM, and saved as the credit status at item level. For more information, see Structure linkAutomatic Credit Check.
    6. System replicates sales order
    After the sales order has been saved in SAP CRM, complete and without errors, it is replicated for logistics processing in SAP R/3. Order data is transferred together with confirmed scheduling lines to SAP R/3.
    7. System receives sales order
    After replication to SAP R/3, you can change the sales order in SAP CRM and SAP R/3. You can find more information on this under Structure linkData Exchange for Sales Transactions: CRM Enterprise - SAP R/3
    8. Send order confirmation to customer
    You can send the order confirmation either electronically, or in print to the customer. You can find more information under Structure linkSales Order Confirmation by E-Mail.
    9. Monitor status of order
    PS: Do award points

  • Creating a sales order with reference/BAPI_SALESDOCUMENT_COPY

    Hi,
    I have to create a sales order with a reference to another order and have to change some fields in the new document.
    According to SAP note 370988 the function BAPI_SALESDOCUMENT_COPY should allow to create a sales order with reference to another order.
    Unfortunately it doesn't work for me.
    The BAPI doesn't return an error and creates a new order but that one is incomplete.
    The reason seems to be that VKORG, VTWEG and SPART aren't provided and because of that the new order can't be created completely.
    I can find no way to provide these fields to the BAPI.
    Has anyone used the BAPI successfully or has found another way to achieve the desired result?
    I already checked
    batch input: problematic because I have to change partners which are displayed in an table control which can't be controlled reliably from batch input
    the second way described in the SAP note: high effort and high risk, as each data field has to be copied explicitly from one represantation to another.
    Any help is appreciated.
    Kai

    That approach would effectively duplicate the implementation of BAPI_SALESDOCUMENT_COPY, wouldn't it?
    As there is a lot more data involved than just VBAK/VBAP (e.g texts, partners, conditions, schedules) this is not only a lot more effort it's also harder to get it right, especially since there might also be copy control customization which has to be take into account.
    Nevertheless I tried it and it isn't working in my case.
    I' have to create a debit memo request (BUS2096) out of a sales order (BUS2032), and BAPIs SALES_ORDER_CREATE* only handle BUS2032.

  • Creating new sale order with reference of old sale order.

    Dear gurus
    i have requirement
    i want to make a sale order with reference of old sale order.
    how to achieve it?
    Regards
    Saad Nisar

    Hi,
    In vtaa
    give source and document number and assign all the relevant routines.
    Now on the left hand side, click the Item button and then give the source I.C as TAC and target also as TAC adn then fill the routines.
    Do the same for Schedule line (which is related to TAC)
    If this is done, then ur scenario will work

  • Problem with BOM Quant while creating Sales order with reference using BAPI

    Dear All,
    I am facing problem with creating a slaes order with reference to other sales order by using BAPI_SALESORDER_CREATEFROMDAT2 .
    Sales order is getting created but
    1. It exploding the BOM means the line items which are not there in the reference SO also coming in the new SO ( all BOM items are coming )
    2. Schedule line for BOM header item is getting copied to all sub items of BOM.
    Can any one help me out to prevent the above deviations in creating Sales order with reference by using BAPI_SALESORDER_CREATEFROMDAT2.
    Note: while passing the parameters to BAPI_SALESORDER_CREATEFROMDAT2
    all the data related to items is exactly the same as in the original Sales Order.
    Thanks in advnace.
    Regards,
    John

    Hi All,
    Can any one help me !!!!!!!!!!
    please

  • Create Sales Order with reference enquiry

    Hi All,
    When i create the sales order with reference enquiry have some error in the error log.
    - item 000010 is not copied: copy requirement 603 has not been met.
    Could you mind help me to solve this problem ?
    my enquiry status  = Approved.
    Regards,
    Luke

    Hi
    This means when you create a order with reference to inquiry there is a Requirement '603' has been assigned to the copy control. you can refer the inquiry only when the requirement is met... 603 requirement seems to be customized and not a standard one.
    Go to VTAA select the OR - IN and check the header level, Item level and Schedule line level... you will have assigned the requirement 603... see  the notes for that...
    If the problem not cleared do the debugging with your ABAPer's help...
    Muthu

  • HOW TO CONTROL ON CREATION OF SALES ORDER WITH REFERENCE TO EARLIER SO?

    Dear All,
    I want to contol on creation of Sales order with reference to earlier SO?  While creation of sales order our enduser are creating sales order with reference to earlier month SO which I want to restrict. Recently I made changes in sales order like payment terms is grayed, system will atomatically pick pay terms from customer master.Now I am getting correct data also but enduser is using old SO no while creating new SO and old payment data is reflecting in fbl5n.
    I want to restrict enduser while creating new SO with ref. to old SO. Only for returns they should be able to use Billing refrence. Pl. suggest how to control the with reference to ealier SO.
    Nikhil

    Nikhil Deshpande,
          If you dont want allow create a sales order in referent to other one, just delete the copy control between these sales order type, so when the user tries to create a SO in reference to other one a message is displayed that is not possible.
    Thanks,
    Mariano.

Maybe you are looking for

  • Error while creating CDC subscription

    Hi, I am using asynchronous Hot log CDC in my 10g RAC 2 node database. I am getting Java error while creating CDC subscription. Change sets, change tables have been created in Publisher user and SELECT privileges have been granted to the subscriber u

  • Why does my ical calendar list not reflect what is in my calendar. It has all the deleted calendars?

    I am trying to sync my IPAD II with iTunes 10. I have reorganized my calendar by renaming and deleting some calendars. When I go to the info tab and try and select what calendar I would like to sync I get the old list of calendars from before I made

  • Solution for Prefilling PDF data

    I called and spoke to a sales associate asking about LiveCycle for use to prefill pdf data for one of our large customers.  He told me the cost was very high for LiveCycle and to come and ask here on what to user.  I am familiar with now unsupported

  • CC - Parameter ID for Supplementary Rule.

    HI All, I was trying to create a supplementary rule for the users using transction F-53 and want to restrict the user by the amount in the bank data field in f-53. For the same I had two questions: 1. In doing the same I am stuck up with the Paramate

  • I have a problem in the distribution of an application via GPO.

    Hi all, I have a problem in the distribution of an application via GPO. Actually the problem is due to non-implementation of the changes of the MST transformation file. I have an installer in .MSI format, during installation the program requires the