Using BAPI_PO_CREATE to create a PO with reference to another PO.

Hi, I am using BAPI_PO_CREATE to create a PO with reference to another PO, in the po_header_add_data, I have done this: po_head_add-our_ref = p_ebeln.
             CALL FUNCTION 'BAPI_PO_CREATE'
                   EXPORTING
                        po_header             = po_head
                        po_header_add_data    = po_head_add
                        skip_items_with_error = ''
                   IMPORTING
                        purchaseorder         = po_nbr
                   TABLES
                        po_item_schedules     = po_item_schedules
                        po_item_text          = po_item_text
                        po_items              = poitem1
                        return                = return.
But when I have created the PO, in the our reference field, it is space? Why? If I want to fill the the our reference  with the another PO, how should I do?

NULL

Similar Messages

  • Creating an order with reference to another doc

    I want to create an Order with reference to another document.....in other words it should be a copy of the other document...
    Any ideas of what function modules we have to use and how we can acheive it...

    Hi Vin
    Creating a Sales Order from a Sales Order Quotation is SAP Standard so really should not be an issue for you.
    You do need to maintain the Copy Control Configuration as per my previous reply.
    Define Copying Control for Transaction Types
    Define Item Category Determination when Copying
    Effectively the details of your Transaction Type for Sales Order Quotation will copy into your Sales Order transaction.
    I'm used to working in an environment where the user manually decides to then continue with a follow-up transaction, therefore I'm not too sure which Function Modules you need to use in order to do this automatically.
    But you are on the right track.
    Regards
    Arden

  • BAPI to create equipment hierachy with reference to another equipment

    HI,
    is there any BAPI to create equipment hierarchy with reference to another equipment.
    i.e. in selection screen i pass two equipments, one has hierachy and another one don't have hierarchy.
    then it copy hierachy first equipment hierarchy and create same hierarchy for second equipment.

    Hi,
    There are no standard BAPI to do that.You will have to create a custom program which would read the current equipment hierarchy and build the hierarchy from the lowest level, by using the equipment create BAPI and  Equipment install BAPI.
    Regards
    Narasimhan

  • Creating a Invoice with reference to another invoice with new pricing proce

    Hi People,
    I want to raise a supplimentary excise invoice for the differential price.
    I want to do it by raising a supplimentary commercial invoice with reference to the old invoice but with a new pricing procedure assigned to it.later on raise the supplimentary excise invoice with Tcode j1iin wrt the new commercial invoice.
    Although i have done all the necessary configurations such as determination of new pricing procedure, Doc pricing Procedure and changing the pricing type at the copy control settings of the item category to "B".
    i am unable to get the new pricing procedure when i am creating the supplimentary commercial invoice.
    Can u people suggest me in this regard

    Dear Nagabhushan
    Normally for price difference, there is an order type RK for "Invoice Correction Request" which should be created in reference to F2 billing document.  Based on this, you can issue credit memo (document type G2). 
    This being the case, you cannot create supplimentary invoice with reference to original invoice.  Moreover, for all excise related adjustments, you should not use j1iin.  You should run j1ih - Other adj.
    thanks
    G. Lakshmipathi

  • Create business partner with reference of another business partner

    Hi all,
    I want to create a business partner with reference of another BP in CRM 2007 from Web UI, please advise whether it is possible or not, if not ...why it is not possible?
    Looking forward for your reply!
    Regards,
    Silpa.

    Hi Silpa,
    In the standard, this isn't possible with the BP. However, you can create a customer as a reference of another existing customer, and then sync this new customer into a new BP. So you can do this indirectly,.
    If you want to create a BP directy as a reference of another BP - sorry, this isn't possible. You would need to copy the BP into another BP using a custom report. You can develop your report along these lines :
    1. The easiest way is to use APIs. Start by calling BUPA_CENTRAL_GET_DETAIL usign the BP number. THis will give you all the central data for the BP - e.g. name, etc. Now, merely feed the output of this module into the module BUPA_CREATE_FROM_DATA. This will create a new BP with the same data of the old BP.
    2. Now that the main BP is ready, you need to start copying the individual datasets - addresses, bank details, roles, Id, industry,etc. This is tricky - the ADD apis - BUPA_ADDRESS_ADD, BUPA_ROLE_ADD, etc can only create one record in a call. So, you need to first get the data of the reference BP using the GET_DETAIL api e.g. : BUPA_ADDRESS_GET_DETAIL, then loop at each returned record, and pass that into the corresponding ADD BAPI.
    3. Be sure to call BAPI_TRANSACTION_COMMIT at the end to commit the data to the DB.
    I hope this helps you.
    Cheers,
    Rishu.

  • BAPI to create sales order with reference to another sales order

    hi all,
    is there a bapi that allows you to create a sales order with reference to another sales order?
    thanks,
    V

    Hi Valencia,
    I think the normal BAPI (BAPI_SALESORDER_CREATEFROMDAT1)will do. You will have to fill the fields REF_DOC, REF_DOC_IT, REF_DOC_CA of the table ORDER_ITEMS_IN (and make sure that Customizing settings allow you to copy from order to order).
    Regards,
    John.

  • FM to create Sales order with reference to another Sales order

    Hi,
    Is there any inbound IDOC FM which can create a Sales Order with reference to another Sales order.
    PLease reply
    Santhana M.

    Hi,
    try FM BAPI_SALESORDER_CREATEFROMDAT2
    with ORDER_HEADER_IN fields
    REFOBJTYPE
    REFOBJKEY
    REFDOCTYPE
    Regards,
    Clemens

  • Creating a PO with reference (using document overview) with ref to a PO?

    Is this feasible to create a PO with reference to a PO ?????

    Hi Maria,
    Creating a PO with reference to another PO is possible even without the doc. overview. If you scroll your item overview long to the right you will find the columns "Purchasing document" and "Item" aside it (4th nd 3rd columns from the right in my version). Type in your referenced PO number there and the item and press Enter.
    However, I don't think this will help you. If you are not allowed to create PO with reference to another PO, you will not be able to "cheat" on the system. Such limitation is normally introduced by "Functional auth. for buyers": IMG for Purchasing > Authorization Management > Define Function Authorizations for Buyers. Check the frame "Possible Reference Objects". The two-digit key of the "func. auth." is assigned to your user using the parameter ID EFB.
    BR
    Raf

  • BAPI For CREATE SALES ORDER WITH REFERENCE TO ORDER

    Hi ,
    I want to develop a new RFC for 'Creating Sales Order' with reference to another sales order -
    Is there any BAPI available for the same ? (Version 4.7) - I know its available for new create and change
    but couldn't find for create with reference to Order ...
    Thanks in advance ...
    Regards
    Rajesh.

    Hi,
    You can use this FM "/SAPNEA/SMAPI_ORDER_CREATE". I haven;t tried this but you can still give it a try. Mention the Reference Order Type and other data in the header work area and pass it to the FM.
    Reward if it's useful.
    Thanks,
    Anil

  • Create a notification with reference

    Hi,
    My requirement is to create a notification with reference to another notification.
    How can i do that ? I tried to use BAPI_ALM_NOTIF_CREATE but I faced 2 problems:
    1. I didnt know where to give the reference notification number
    2. I am getting the error: "Partner maintenance: Manadatory function AG was not maintained for object"
    Could anyone help me out with this ?

    Hello Sasi Upadrasta
    can you please explain how to solve this?
    because i'm getting same error.
    Thanks
    Kaushik Savaliya

  • Create a Sales order with reference to another sales order  using BAPI

    Dear All,
    Can any one tell me what are all the parameters required to create a Sales order with reference to another sales order using BAPI_SALESORDER_CREATEFROMDAT2....
    Thanks in advance

    Hi Madhan
    Thanks a lot for your reply.
    However, I would like to know which parameters need to passed in this BAPI in case of SO creation with reference. I beleive there are only a few parameters that need to passed in ORDER_HEADER_IN, ORDER_ITEMS_IN, etc.
    Need to know exactly which are these parameters.
    Regards
    Mihir Shah.

  • Create Sales Order With Reference to Billing Document Using BAPI_SALESORDER

    Hi,
    How can i create a sales order With Reference to Billing Document Using BAPI_SALESORDER_CREATEFROMDAT2?
    Thanks in advance,
    Alejandro.

    I have to create sales order with reference to existing billing document. I have tried to following bapis.
    1. BAPI_SALESORDER_CREATEed
    I have successfully created document with following details.
    -->ORDER_HEADER_IN:
    DOC_TYPE =                  ZRK
    SALES_ORG =              3000
    DISTR_CHAN   =            00
    DIVISION =                    00
    ORD_REASON =            100
    SD_DOC_CAT   =          L
    CURRENCY       =         EUR
    REF_DOC          =         100000028
    REF_DOC_CA    =         M
    -->ORDER_ITEMS_IN:
    ITM_NUMBER    =           000010
    MATERIAL          =          701791
    TARGET_QTY     =          0000000001000
    CURRENCY        =          EUR
    REF_DOC           =          100000028
    REF_DOC_CA     =          M
    -->ORDER_PARTNERS:
    PARTN_ROLE      =          SP
    PARTN_NUMB      =         W12001
    COUNTRY             =         NL
    by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in  ORDER_ITEMS_IN
    COND_TYPE          =        PNET
    COND_VALUE        =        14,56
    COND_D_UNT        =         PC.
    folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
    is it something related to configuration problem?
    2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
    I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
    Unpermitted combination of business object BUS2032 and sales doc. category L.

  • I faile to create outbound delivery with reference to scheduling agreement by using BAPI_OUTB_DELIVERY_CREATE_SLS.

    Dear Team,
    Can you please help me by providing the BAPI name for creating the outbound delivery for Scheduling Agreement in SAP SD .
    I faile to create outbound delivery with reference to scheduling agreement by using BAPI_OUTB_DELIVERY_CREATE_SLS.
    The system says "missing data in the BAPI interface: VBAK VBTYP E". It seems another FM should be used for scheduling agreement only.
    Thank you for your help in this regard .

    Hi Raghu.
    As much as I don't want to do this but just to resolve this error I created an enhancement implementation in include LV50R_CREACSV form routine dcs_check_so_vs_interface and modified VBTYP to blank to avoid that error message.
    Got the tip from this thread http://scn.sap.com/thread/1972059
    Unless... anybody has a brighter idea (without modifying the standards)?

  • Create an order using BAPI with reference to another one.

    Hi everybody,
    I'm trying to create a new sales order with reference to another one (That's important because of the documents flow).
    I'm using 'BAPI_SALESORDER_CREATEFROMDAT2' but I couldn´t do it yet. I've read some ideas about this kind of creation in this forum; but I still haven´t found the solution yet.
    Some ideas about the BAPI parameters I nedd to complete?
    Thanks in advance!!
    Edited by: Ole ES on Sep 11, 2008 12:32 PM

    Hi,
    Are you sure you can create a sales order with reference to ANOTHER sales order? The reason I ask is that in the front end, sales orders are created with reference to either quotations or contracts. There are settings known as "copying control" that need to be maintained for this to show up as document flow.
    We have been working on a BAPI to create a sales order, but that is without reference to another document, and it works fine.
    Could you please elaborate?
    Cheers.

  • 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

Maybe you are looking for