Create a purchase order linked to sale order with DI

Hello all,
I tried to create a purchase order based on a sale order with the DI but I get an error message "the business partner selected in base document is different than the target document"
As you understand, this is normal to have a different business partner. So my question is : is it possible to create with the DI a purchase order linked to a sale order or is this a missing functionality ?
Thank you
Sebastien

Hi sébastien,
   oDoc.Lines.ItemCode = "A00001"
    oDoc.Lines.Quantity = 1
    oDoc.Lines.BaseType = 17
    oDoc.Lines.BaseEntry = 213
A Purchase document's BaseType can only be a Purchase document itself.
A Sales document's BaseType can only be a Sales documento itself.
To create a Purchase Order based on a Sales Order you must go through each row of the Sales Order and copy the values (ItemCode, Quantity, Discounts, VatGroup, etc.) to the Purchase Order.  And remember the VATCode used in a Sales document cannot be the same as the one used in a Purchase document.
Best Regards,
Vítor Vieira

Similar Messages

  • Create blocked purchase order with BAPI_PO_CREATE1

    Hi,
    I´m creating stock transport orders with BAPI_PO_CREATE1. At first, I need to
    set them to the release status 'S' for blocked. After some checks, I want be able
    to relase it and create the delivery.
    I have found some fields like rel_status inside of the header structure of
    BAPI_PO_CREATE1. But when I set this to 'S', the purchase order is created
    with status 'released'.
    How can I create a purchase order with BAPI_PO_CREATE1 and set it to 'blocked'
    first?
    Thanks, Arne

    No ideas about that?

  • Allow to create a purchase order with purchase requisiton item deleted

    Dear all,
    I have a question about creation purchase order process.
    Firstly, I have a purchase requisition with 2 items, first of them is deleted.
    If I try to create a purchase order thru transaction ME57N with the previous purchase requisition, I can only create it with one item (the one wich is not deleted)
    However, if I try to create the purchase order thru transaction ME21N, with purchase requisition as reference, I can create the PO with item that was deleted in PR.
    I don't understand why system allows to create a purchase order with an item that previously was deleted in PR.
    Does anyone have a explanation about this issue?
    Many thanks in advance
    Best Regards.

    Hi,
    In the document overview of ME21N you get all the items of the purchase
    requisitions, no matter if they are deleted or not.
    When you convert the deleted item into a Purchase Order you get message
    06 050 stating that this item is deleted in the purchase requisition.
    This message can be defined as an error message in the customizing
    transaction OME0. This way, it will not be possible to order an item
    which is deleted in the referenced purchase requisition.
    BR
    Nadia Orlandi

  • Create service purchase order with negative value

    Hello,
    we created a service purchase order using the specific item category (value D) and with the service number details. We posted the entry service sheet with the transatcion code ML81N and we did the invoice verification.
    Now we need to reverse this document flow: in particular our requirement is to create a new purchase order (like a return order for goods) and then to post an entry service sheet with the opposite sign (both cost center and G/L account).
    Do you know whick document type I can use or how i can meet this requirement? Please consider that I cannot reverse the original document but I need to create new ones.
    Thanks in advance,
    Alessandro

    check below thread;
    service order
    yogesh

  • Error when creating a purchase order with reference

    Hi Experts,
    I am creating PO with reference to Contract
    Material A with price 5 rupees
    Before saving the po if click on print preview button to check if system is calculating the values correctly before saving the document.
    But is seems that right now system is not calculating the values well as by clicking on "Print Preview" values are displayed as zero.
    Also it is displaying the values once we save the po.
    Why it is not showing any value in print preview before saving the PO.
    Please help.
    Thanks in advance
    Prashanth

    HI,
    That means the PO print program is using some table (EKKO, EKPO,KONV and may be other for condition record) to get the value of the PO.
    now those table get updated only after you save the PO.
    That's the reason you are not getting any value in print preview before saving.

  • Create purchase order with reference to Sales order Line item

    Hi All,
    i had a requirement that i need to create the Purchase order with reference to sales order line item...
    In T.code me27 client requied a input field for sales order no and with that order reference he want the data of line item to PO creation line item screen.....
    please sujjust......how to proceed......
    regards,
    Ravi Nemani

    Hi
    Go to SPRO->Logistic general->Tax on goods movement->India->Movement types.
    Here you will find the group of movement types check which movement types is mantained for the out side movement groups or inward movement.
    also check the Material Master in MRP view if the collective requirements (02) is mantained.
    Regards
    Sri

  • Purchase order with reference to Sales Order

    Dear SAP Gurus,
    I want to create a Purchase Order with reference to sales order.
    I want to take the material in my stocks also. If i create a Purchase order with account assignment, i am able to take the inventory of that material as it is consumed at the time of GR (MIGO).
    hope you understand my requirement.
    Ashish

    Hi
    Go to SPRO->Logistic general->Tax on goods movement->India->Movement types.
    Here you will find the group of movement types check which movement types is mantained for the out side movement groups or inward movement.
    also check the Material Master in MRP view if the collective requirements (02) is mantained.
    Regards
    Sri

  • Purchase Order with Sales Order Reference

    Hi Gurus,
    I have created a Purchase Order with reference to Sales Order.Now when I post Goods Receipt Mvt 101 system throws a message Update Control of Movement Type is incorrect.
    I have checked in customizing Transaction (OMJJ) cannot find settings related to this particular scenario.Can anyone suggest where I can update control for posting Goods Receipt for this purchase order.

    Hi, Check in OMJJ ,select Movement type>101
    Here click Update control / WM movement types on the left side , maintain the entries with the 101,
    Movement type indicator -B - Goods movement for purchase order

  • Create Purchase Order with reference to Purchase Requisition using BAPI's

    Hello Experts,
    I need to create a Purchase order with reference to a Purchase Requisition.
    All the above has to be done by using BAPI's.
    For creating PR, I am using BAPI_REQUISITION_CREATE.
    and for PO, I am using BAPI_PO_CREATE.
    I am not able to use the requistion number in the PO. BAPI throws the following exception
    "Requisition 1014396 00010 not selectable"
    "Document contains no items"
    Query's:
    1. Do I need to release the PR for using it in PO?
    2. If so how can I work with the "BAPI_REQUISITION_RELEASE_GEN" to release PR?
    I have tried using the BAPI getting the following error "Release outside filed of responsibility".
    Please help I am in critical Postion...
    Thanks,
    Suma

    Hi Meenakshi,
    When, I try to release error I am getting the following the error " Purchase Requisition can not be released".
    Is this problem because of authorization or data issue?
    Thanks
    Suma

  • Creating an SRM Purchase Order with a Return Line

    Is it possible within standard SRM to create a purchase order with a 'Returns Item' line?
    I know it's possible in R/3 but really need to create it via SRM.
    Regards
    Keith

    Ganesh
    We are using the Extended Classic Scenario of SRM (and the Sourcing Cockpit) which therefore means that we won't be creating requisitions within R/3.
    In the R/3 PO you can create a line item as a 'Returns Line' (MEPO1211-RETPO)
    The standard help text is as follows:
    Logistics - General (LO)
    The returned goods from a customer to an internal or external vendor.
    Returns can be divided into the following types, according to vendor and recipient:
    Customer returns
    Returns to vendor
    Returns for stock transfers
    I know we can use a BADI to mark this flag in R/3 but for completeness really want to show this as a returns line in SRM too.
    Keith

  • Purchase Order with Invoice Plan

    Hi,
    I need to understand working with Invoicing plans for a Purchase Order. Especially the service PO for the rents and other related services.
    How the PO is linked to the Invoice Plan and how the process happens in SAP?
    Thanks in advance!

    Creating an Invoicing Plan  
    The following procedure describes how to create an invoicing plan with the pre-Enjoy ordering transactions (ME21, ME22, ME23).
    The procedure described is also applicable u2013 with certain restrictions u2013 to the Enjoy purchase order (ME21N, ME22N, ME23N).
    If you are using the Enjoy purchase order, you will find:
    ·         The Invoicing Plan button and the indicators for GR-based invoice verification (GR-Based IV), service-based invoice verification (Srv.-Based IV), evaluated receipt settlement (ERS), and invoice receipt (Inv. Receipt) among the item details on the Invoice tab page.
    ·         The account assignment among the item details on the Account Assignment tab page
    ·         The Goods Receipt and GR Non-Valuatedindicators among the item details on the Delivery tab page
    Prerequisites
    Vendor Master Record
    Before you can use the invoicing plan with automatic settlement, the Evaluated Receipt Settlement Delivery indicator must be set on the Purchasing Data screen in the vendor master record.
    (If you wish to enter invoicing dates manually, this is not necessary.)
    Purchase Order
    ●     We recommend using a framework order (that is a purchase order with a validity period and a reason for rejection). The invoicing plan can adopt the validity period specified in the PO header.
    ●     PO items for which you wish to use an invoicing plan must have account assignment irrespective of whether a material with a master record, a material described by a short text, or an external service is involved.
    ●     The GR/IR control facility must be set up in such a way that no goods receipt (or, in the case of services, no service entry) is expected - only an incoming invoice. If you wish to have automatic settlement, you must also set the Evaluated Receipt Settlement indicator.
    If you nevertheless wish to allow service entry sheets for the item (e.g. for information purposes only), you must set the GR Non-Val. indicator.
    Customizing
    Under Purchase Order à Invoicing Plan in Customizing for Purchasing, you can maintain data such as the desired invoicing plan types, date categories, and date descriptions.
    Procedure
           1.      Create a purchase order with account assignment (framework order).
    Click  to access the item overview (or the overview of service lines if you chose item category D for services).
           2.      Enter the desired material or service, the quantity, and the price.
           3.      Select the desired item and click  Account Assignments to access the account assignment screen. Enter the account assignment for this item.
           4.      Click  to access the item detail screen. Check that the GR/IR control indicators are set correctly on the item detail screen.
    ○     The GR and GR-Based Invoice Verification or Service-Based Invoice Verification indicators must not be set.
    ○     IR must be set.
    ○     You must set ERS if you wish to have Evaluated Receipt Settlement.
    ○     If you wish to have service entry sheets purely for information, for example, allow non-valuated goods receipt (i.e. select the GR Non-Val and GR indicators).
           5.      Choose Item ® Invoicing Plan. A window appears, in which the invoicing plan types predefined in Customizing are suggested. Choose the desired invoicing plan type and click  Continue.
    You can use the following invoicing plan types:
    ○     Periodic Invoicing Plan
    ■      You use the periodic invoicing plan if the total value of the PO item is to be invoiced in each period.
    ■      The system creates the invoicing dates automatically on the basis of the settings in Customizing.
    ■      The invoicing date and the amount to be invoiced are shown for each settlement period (e.g. month). In the case of the periodic invoicing plan, the amount represents the total value of the PO item.
    ■      You can change the suggested dates and block individual dates for automatic invoicing if necessary.
    ■      You can enter the start and end dates for the invoicing plan.
    ■      With the Dates from and Dates to fields, you can determine that an invoicing plan does not contain invoicing dates extending over the entire validity period of the purchase order but only for a certain period within that validity period. (E.g. within a validity period from 1.1. to 12.31, only dates within the period 1.1. to 06.30.)
    ■      With the Horizon field, you control how far into the future dates can be created. If you enter a date rule that adds six months to the current date here, invoicing dates will be created for just half a year in advance in each case.
    The system automatically creates new dates if you change the invoicing plan or when you invoke the transaction for Updating Periodic Invoicing Plans. See Generating Further Invoicing Plan Dates
    ■      The In Advance indicator allows you to specify whether the invoice is to be created with regard to a prior or subsequent period. (E.g. at the beginning of February, either in advance for the month of February or in arrears for the month of January).
    ■      In addition, fields with information on the existing invoicing plan are displayed (e.g. the calendar upon which the date determination process is based).
    ○     Partial Invoicing Plan
    ■      You use the partial invoicing plan if the total value of the PO item is to be invoiced in several partial amounts.
    ■      You get an empty date overview in which you can manually enter the desired dates.
    ■      If you work with a reference invoicing plan, the system automatically generates dates in accordance with the reference plan.
    You have the following options:
    ●      You create a reference invoicing plan in Customizing for the invoicing plan type.
    ●      You enter an existing invoicing plan as reference plan directly in the invoicing plan for the PO item.
    ■      You can flag a date in field B (Billing/Invoicing Rule) as follows:
    ●      As a down payment (percentage or value)
    ●      As an invoicing date (percentage or value)
    ●      As a final invoice
           6.      Click  to return to the item overview.
           7.      Click  to save the purchase order item with the invoicing plan.
    You can then start the automatic invoice creation process during invoice verification.
    For more information, refer to the section Settlement of Amounts Due Under Invoicing Plans.
    Once assigned to an item, the invoicing plan type (e.g. partial invoicing plan) cannot be changed. If you wish to assign a different invoicing plan type, you must delete the item and create a new one.
    Generating Further Invoicing Plan Dates  
    If you have assigned a periodic invoicing plan to a PO item but have not initially defined invoicing dates covering the entire validity period of the purchase order, you can generate further dates in due course.
    You have created a PO item with a periodic invoicing plan for a certain planned procurement. The purchase order is valid from 1.1. to 12.31. When creating the invoicing plan, you specified one invoicing date per month for the first half of the year. You have not yet planned any dates for the second half of the year because you do not wish information from the invoicing plan to be passed on to purchase order commitments at this stage, for example.
    By mid-June, it is clear that the PO is to proceed as envisaged, and you therefore wish to schedule invoicing dates for the remainder of its validity period.
    Procedure
    To schedule further invoicing dates, proceed as follows:
    Choose Purchase order ® Follow-on functions ® Period. invoicing plan
    Specify the purchase orders for which invoicing dates are to be generated in the invoicing plan and perform the function.
    A log can be created if desired.
    Result
    The system adds further dates on the basis of information such as the validity period or horizon from Customizing, the purchase order, and the invoicing plan.
    regards,
    indranil

  • Individual purchase order with subcontracting material

    Hi all,
    I've implemented a individual purchase order in a sale order by means of 'TAB' category item. The material has been set as 'subcontracting'.
    When I create the sale order, a purchase requisition is automatically created with M imputation and special stock 'E'.
    Once I create, the purchase order with reference to purchase requisition, I set 'L' category item. Then I save the purchase order.
    In order to simplify the flowchart, the vendor has enough stock to manufacture the required material.
    Then, Tx. MIGO, stock input with reference to purchase order.
    For the FERT material --> movement 101 E + is set.
    For the component --> movement 121 E - is set.
    How can I obtain 121 'O' - movement for components in order to decrease SC vendor stock?
    Thank you very much in advance for your support.
    Best regards,
    Alberto Ramos.

    Dear Charlie,
    Thank you very much for your response. As you comment, I made a mistake with the number of movement. Certainly the movement for raw material consumption is 543.
    I have executed the flowchart you describe. In your case, an independent subcontracting purchase order is done. This flowchart works correctly (with the results you comment. Actually the raw consumption are related to mov. 543 O -).
    The problem is when purchse order is related to a sales order. That is:
    1. Sale order TA with only one position material A. Category item 'TAB'.
    2. Material master for material A --> MRP 2 view --> Special procurement field: 30 - Subcontracting
    3. An automatic purchase requisition is created (thanks to 'TAB' category item, schedule line, ...)
    4. Tx. ME21N --> I create a purchase order with reference purchase requisition:
        4.1. Account assignment category field is set to 'M' from sales order / purchse requisition
        4.2. I manually set Item category field to 'L' for indicating subcontracting (I don't force this to be 'L' from sales order / purchase requisition because I need to use the same flowchart for subcontracting and not subcontracting materials)
    5. Tx. MIGO
        5.1. For Fert material the system executes mov. 101 E +  (as in your description)
        5.2. For raw materials the system exectures mov. 543 E - ( instead of 543 O -). I would like to obtain the reduction of subcontracting stock, because this material is in my center but povided to SC manufacturer.
    Should I do a 'Subsequent adjustment' by means of Tx. MIGO the movement are:
      - FERT material 121 E - (depending on adjustment)
      - Raw materials 543 E - (again 'E' instead of 'O' which is the result I would like to obtain).
    I will very much appreciate your comments.
    Thank you again,

  • Purchase order with multiple items

    Dear Gurus,
    I would like to know the possibility of:
    1- Creating a purchase order with more than one vehicle (same model [material] and same characteristics)
    2- Creating a purchase order with more than one vehicle (same model [material] and different characteristics)
    Regards,
    MaX

    Hi MaX,
    as you mention characteristics, I assume this is about variant configuration and vehicles in VMS, right?
    In case of VMS (Vehicle Management System), the answers are ...
    1.) yes, it's possible
    2.) yes, it's possible
    You can either configure the vehicles prior to ordering them and you can also change the vehicle configuration of each vehicle selected for the purchase order action (e. g. ORD1) one by one.
    Kind regards,
        Steffen

  • Net price on purchase order with reference to purchase requisition

    Hello!
    When I create a purchase order with reference to purchase requisition, the net price goes automatically to the purchase order.
    But It's possible change the net price on PO, and I must close this possibility.
    Do you know how can I do this?
    Thanks, Camila!

    Hello
    Try to search SCN for EVO
    You will find this: PR price in PO

  • Purchase order with reference to internal order

    Dear all
    I am creating a purchase order with reference to a statistical internal order.The total PO value should not exceed the budgeted amount for that statistical internal order.How should i achieve this?
    Thanks in advance.
    Madhavi

    Hello
    First Create Budget Profile.
    Make Specification In Availability Control as Activation Type ''01- Automatic activation during budget allocation''
    Usage 100 and Tick ''Overall'' check box.
    After that Make Setting for your Controlling area in SPRO Path '' Define Tolerance Limit for Availibility control''

  • Purchase order with Freight Value

    Dear All,
    My scenario is....
    I Purchase some material to my x vendor. when he send the material , he charge freight amount on it. now please suggest me how to create a purchase  order with freight value & I want to take freight effect on every material. vendor is not divide freight amount on every material. now what will i do. If i take this effect only one material than My material map get change. How to take this effect on every material.
    Regards
    Vimal

    Hi,
    When vendor send material , vendor send firght value invoicce, means at the time of PO you don't know it,so it can be consider as unplanned delivery cost in SAP and you can post this cost in MIRO ,on details tab in unplanned delivery field.
    In following path you can decide where this value should add in material cost or G/l account in following path
    In SPRO ,Maintain settings as shown  MM---> Logistic Invoice Verification -->Incoming Invoice --> Configure How unplanned delivery costs are posted
    Regards
    Kailas Ugale
    Edited by: kailasugale on Dec 14, 2011 10:21 PM

Maybe you are looking for