BAPI_SALESORDER_CREATEFROMDAT2 with ref. SO

Hi experts,
I'm facing a issue while using BAPI_SALESORDER_CREATEFROMDAT2 to create a sales order with reference to another sale order.The sale order is created whereas the document flow is not being mainteined...
I think im not clear about supplying the valuers for the following parameters.
l_order_header_in-REFOBJTYPE   = ?????
l_order_header_in-REFOBJKEY   = vbak-vbeln
l_order_header_in-REFDOCTYPE   =  vbak-auart
Kindly let me know what should be value for l_order_header_in-REFOBJTYPE incase of a Sale Order(ref obj). Incase of any more parameters tobe maintained for achieving the same kindly provide the details.
Regds
Priya

Hi Priya
OOPS Sorry with my earlier reply.
Please check this:
For creating with reference to another document, we have to pass the following parameters apart from the other mandatory parameters:
REF_DOC
REFDOC_CAT
Hope this helps.
Kind Regards
Eswar
Message was edited by:
        Eswar Rao Boddeti

Similar Messages

  • Sales Order with Ref to  Sales Contract using BAPI

    Hi ,
    I am using BAPI_SALESORDER_CREATEFROMDAT2 for creating the Sales order with ref to Sales Contract.
    but problem is that , Its not validating the quantity.
    I am passing following values to Header  & item
    ORDER_HEADER_IN-REF_DOC   =  <Sales contract>
    ORDER_HEADER_IN-REFDOC_CAT = 'G'.
    & item
    ORDER_ITEMS_IN-REF_DOC   = <Sales contract>
    ORDER_ITEMS_IN-REF_DOC_IT   = <item>
    ORDER_ITEMS_IN-REF_DOC_CA  = 'G'
    Thanks
    Jitendra

    Keshav.T wrote:
    What do you mean by but problem is that , Its not validating the quantity. generally to populate qty we follow like below
    Hi Keshav,
    Suppose Contract -> 1000 L
    First Order -> 500 L wrt to that contract.
    and again create a order wrt contract with quantity  700 L
    It should throw a waring Or Error message  but It creates the Order with 700 L quantity which is not correct.
    Thanks
    Jitendra

  • Partner function not working when creating PO with ref to PReq

    Partner function is not working when creating a Purchase Order with ref to a Purchase Requistion, Partner functions maintained in the vendor master are VN, OA & PI.
    But OA & PI are not appearing in the PO header partner tab when created with ref to PR.
    however it works when i create the PO directly ( without the PR ref )
    I am using the same material & Plant for both manual PO & PR to PO.
    Any idea what could be wrong .
    I have maintained the settings for schema groups for vendor master & purchasing doc in the partner determination.
    Thanks
    Dkmurthy

    Hi,
    I have also an issue that seems similar to one you are discussing.
    When we use ME59N and create a PO with ref. from a PR (created from a sales order), the message determination works well, it reads the condition set in MN04 (condition records for messages), and creates a message (with output type for EDI , medium: 6, and partner function LS: Logical system). Message is created and idoc is sent.
    When we try with ME21N, ME21 and we create the PO with ref. to the same PR, either by entering manually the PR in the document overview of ME21N or by selecting the PR (without entering the PR number), i.e with date, the message is not created in the PO.
    Company code is assigned to purchase organization, and so is purchase organization to plant.
    Any idea why there is no automatic message determination in the case of the transaction: ME21N
    Note: If I try ME21N, and enter the output type and partner, manually, I receive a warning message
    VN006 (Partner XXXX does not exist for partner function LS). If I accept this warning message, then message is saved- idoc is sent. However I can not overcome the warning message, if it plays any role, because I can not assign partner function LS to the vendor.Then I receive message CZ 327 (Can not use this partner role).
    Any input is wellcome.

  • How to create Invoice with ref to PO

    Dear sd gurus..
    i know we can create invoice with ref to sales order not with po
    But i want to create Invoice with ref to po only
    please guide me
    Thanks a lot

    Venu, thanks for your reply.
    So in this case your idea wont work but the main imp thing is we cant create invoice with ref to po
    Please read my post once again, i never said we can create customer invoice with ref  to Purchase order. I said very clearly, " you can follow the normal 3rd party sales process", which means we create customer invoice with ref to sales order only.
    Coming into another query,
    but some time PO Is generated 110 qth to vendor but vendor  may be  he will send  105 due to shortage ... and he will tell i will send the the remaining stock after next 10 days now Generally miro will happen only for 105 not 110 ( even we can do MIRO110 also ) but i am talking generally because he received the stock 105 only
    But company wants billing for 110 not for 105 because here customer accepted to pay full money
    and vendor gave promise to delivery 5 qty in next 10 days
    Why will the customer  agree to be billed the full qty, when he receive the partial qty?
    Let us assume as you said customer agree to pay for full qty, then there are two options.
    1. Do the MIRO for full qty since you would be invoicing the customer for full qty
    Or
    2. Do the MIRO for partial qty and customer should agree for partial invoice
    Please note in the normal case also if there is if condition then you don't have other option.
    Example:
    Order = 100 qty
    PO = 100 qty
    MIGO = 50 qty and remaining 50 qty Vendor delivery in next 10 days
    MIRO =50 qty
    But here also customer agreed to pay for full qty, then what will you do ? you don't have other option but to bill the partial qty in standard.
    And let me know if you need any more clarity?
    thanks,
    Srinu.

  • Credit memo -- with ref to invoice

    Hello All,
    This is my scenario:
    1 Invoice with value 100.
    2 Credit memo whith value 100 with ref. to invoice.
    3 The system let me create more credit memos for the same invoice exceeding de invoice original value. (it just informes me that there are other credit memos) How can I prevent this ?
    I checked copy control and Pos./neg. quantity--i put as "+" and in Item Category TAN- Completion Rule  mark as "A".
    Regards,
    Ashu

    Hi Ashutosh singh
    Credit Memo and the invoice are different and the two r used in different scenarioes
    Credit Memo is the Billing document raised for compensating the customer and the the document is raised with reference to the the Credit Memo request
    The scenarios is that the customer places an order with the company and the company delivers the fgoods to the customer in which some of thm are dmaged and the customer then claims for the compensation , so the company asks the customer to return the goods to the company and simultaneously they will pay the compensation
    process flow is as
    Created the standard order OR
    then do the deliver LF
    then billing document F2
    and then raise the credit memo request for the goods G2
    thenBilling which is the credit memo
    G2
    This is the special process where the goods are received and the customer does not want the replacement of the dmaged goods and instead he wants the amout to be credited
    so we have to raise the credit meemo request with reference to the standard illing document and then the credit memo request and then billing document G@
    but in the standsrd invoice we havae to creatae the created the standsrd and then the delivery and then the invoice
    Invoice
    order (VA01)>Delivery(VL01N)>Change Delivery(VL02N)&PGI>INVOICE
    EX:
    Order type:OR
    credit memo:
    for the return material or discount is missing for the material,we create credit memo request.credit memo has sent to customer
    order (VA01)>CREDIT MEMO(VF01).
    NO DELIVERY PROCESS.WITH REF. to BILLING DOCUMENT,we create credit memo request.
    EX:
    Order type:G2.
    The below link will help u
    http://able.harvard.edu/ar/wi/create-credit-memo.pdf
    http://web.mit.edu/sapr3/windocs/fopcs06f.htm
    Reward if useful to u

  • Sales order creation with ref. to contract. Quantity related issue

    Hii All,
    I am creating sales order with ref. to contract. But i can enter more quantity than that mentioned in the contract. Here i need the system should give a warning while saving the order. I refered the thread Sales Order Against Contract
    In this thread the procedure to convert the warning to error is given. but i need how to give this warning message.
    In VTAA, I have maintained copy requirement as 303 at item level. & DataT as 151, 102 & 002.
    Please suggest.

    Dear Vijay,
    in incompletion procedure we can arrange to check whether any field is empty, here data comparison is not possible.
    As far as I know you can not achieve this through standard config.
    To achieve your requirement, you will need to take help of an ABAPer, it can be achieved using Userexit.
    ABAPer can use include MV45AFZZ
    and Userexit ""USEREXIT_SAVE_DOCUMENT".
    the code written in this userexit will check and compare the quantities before saving the dcument.
    Logic if quantity enter is greater than the quantity mentioned in Contract show warning Message.
    I hope this solves your Problem.
    Regards,
    Paresh

  • Sales order with ref to make to order and with ref to make to production...

    My requirement is as follows:
    Material code : Plant specific and MRP activated
    In one sales organization  the sales order should be created without limitation and with make to order type with ref to above material
    Another sales organization the sale order should be created if stocks are available and with ref to make to production with above material.
    The availability check rule  as no check for first scenario and  Individual requirement for second scenario.
    can it possible ...........

    Hi,
       functionality of availabity check is it checks the material as per order if it is avialable then it confirms quantity & if not then u have to procure or manufacture.
      Mts scenario works for sales from stock while mto to generate requirement via purchase requisition ir plan order.
      however you can configure availabity check for both the scenario by selecting suitable checking group, requirement class, requirement type & schedule lines.
    Reward if it helps u
    Regards
    Dev kumar

  • BAPI for creation of Production Order with Ref to sales order

    Hi all,
    we are using BAPI_PRODORD_CREATE  for creating Production Order with ref to sales order.
    As per the Business Scenario, we are not creating any masters like BOM and Routing, instead
    we are creating Routing directly into the Production Order under operation overview screen.
    during creation of routing system is generating a default operation.
    the following is the error results after running the Bapi.
    "No routing selected"
    Best Regards.
    GTNRNR.

    Hi GTNRNR,
    with out creation of BOM you created routing and in routing for the operations which components did you allocated so that can be used to manufacture the final product. Can you be please specific?
    Regards,
    Madhu.G

  • Order with ref to quotation

    Hi All,
    When i create order with ref to a quotation i give create with ref and give the quotation number and click on items for choosing the quantity(OPEN QUANTITY) , here i want to know the quantity which i choose , where does this get updated ? VBAPD in field name ORFMNG . but while debugging we are not able to find in BAPI SALES ORDER CREATE on where is this getting updated. Please reply.
    thanks

    Hi,
    When he is creating sales order  with reference to same sales order type he can do that in VA01 by clicking "create with reference",here system will not prompt you to create with reference window automatically.But if you set Reference Mandatory set as "C" in VOV8 transaction then system will prompt automatic window.
    But make sure all the dates are copied from existing sales order only.
    Regards,
    Chandra

  • Control GR Qty while posting with ref. to Inbound delivery

    Hi,
    We have an inbound delivery process where Inbound delivery is made against the PO and subsequently GR is made against the inbound delivery.
    While posting GR via MB0A with ref. to inbound delivery, the qty can be modified at GR Stage. We want to ensure that GR Qty is always equal to Inbound Deliery Quantity.
    Is there any customisation available?? Or it can only be controlled using User Exit only.
    Kindly suggest.
    Regards
    C.A. Shankar

    Hi Shankar,
    For this you have to go for seperate Doc. type for Inbound based GR.
    In the document type you can control the field as display maode in Qty field. this will not possible to change.
    SAM

  • BAPI_PO_CHANGE does not change LIMIT value for service PO with ref to IDOC

    Hi,
    I am trying to change the limit values for both ACCTASSCAT (K) and item cat (D ie service PO) with ref to message type PORDCH IDOC type PORDCH02, the IDoc is getting posted but the PO is not getting updated ie LIMIT value is not getting change and returning msg "No data changed".
    Could you please provide the way to change LIMIT value.
    Regards,
    Mojammil Khan

    Are you really sure that your IT_SCH has the same fields like POITEM?
    the delivery date and statistical delivery date are located in the schedule tab in ME23N and stored in the schedule table EKET, not in EKPO where the PO item data is stored.
    I think you should assign your IT_SCH to POSCHEDULE

  • PO item level validation if create with ref to contract

    Hi
    Pl help me to fulfill the following client requirement:
    When user create the PO with ref to contract , system fetch the all data from the contract to PO at line item level, but in the PO, user is able to change the contract line item rate.
    Now contract line item rate is already fixed with vendor & PO creator should not allowed change this rate.
    Could you provide the any standard configuaration or development to restric the user to chage the PO line item rate if created with ref to contract
    Pl give me replay as soon as possible as it is very urgent
    Rgds
    Nishit

    Hi,
    First you have to create a separate document type which is to be used for creation of PO referring a contract . Than define functional authorisation to buyers going by the menupath -Materials management > Purchasing > Authorisation management > Define function authorisations for buyers-Function Authorizations: Purchase Order. Here enter the field selection key of the new PO document type you created . Than check the box "Display Prices" . Uncheck all other boxes .You can check reference to Contract against possible reference Objects. Than save . Than in the User id enter the User parameter EFB and allocate the aparameter to the user . Also remove other document types of POs except the newly created document type in user authorisations. This will prevent change of price field in the specific document type.
    Dhruba

  • BAPI_SALESORDER_CREATEFROMDAT2 with configurable material

    Hello everybody.
    I have been looking for information and I can't find how to do it. I can create the sales order, but without any configuration value.
    Please, Can anyone tell me who I have to call BAPI_SALESORDER_CREATEFROMDAT2 with configurable material?
         lv_configid = ld_itm_number1."item position
          lv_inst_id = lv_inst_id  + 1.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = lv_inst_id
            IMPORTING
              output = lv_inst_id.
          lv_root_id = lv_root_id + 1.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = lv_root_id
            IMPORTING
              output = lv_root_id.
          li_order_cfgs_ref-posex = ld_itm_number1.
          li_order_cfgs_ref-config_id = lv_configid.
          li_order_cfgs_ref-root_id = lv_root_id.
          APPEND li_order_cfgs_ref.
          li_order_cfgs_part_of-config_id  = lv_configid.
          li_order_cfgs_part_of-parent_id  = lv_inst_id.
          li_order_cfgs_part_of-inst_id    = lv_inst_id.
          li_order_cfgs_part_of-obj_type   = 'MARA'.
          li_order_cfgs_part_of-class_type = '300'.
          li_order_cfgs_part_of-obj_key    = it_pedidos_pos-matnr.
          APPEND li_order_cfgs_part_of.
          li_order_cfgs_refinst-posex     = ld_itm_number1.
          li_order_cfgs_refinst-config_id = lv_configid.
          li_order_cfgs_refinst-inst_id   = lv_inst_id.
          APPEND li_order_cfgs_refinst.
          li_order_cfgs_inst-config_id = lv_configid.
          li_order_cfgs_inst-inst_id   =  lv_inst_id.
          li_order_cfgs_inst-obj_type      = 'MARA'.
          li_order_cfgs_inst-class_type    = '300'.
          li_order_cfgs_inst-obj_key = it_pedidos_pos-matnr.
          li_order_cfgs_inst-quantity = 1.
          CONDENSE  li_order_cfgs_inst-quantity.
          li_order_cfgs_inst-complete      = 'T'.
          li_order_cfgs_inst-consistent    = 'T'.
         li_order_cfgs_inst-persist_id_type = 'G'.
         li_order_cfgs_inst-quantity_unit = 'ST'.
          APPEND li_order_cfgs_inst.
          li_order_cfgs_value-config_id = lv_configid.
          li_order_cfgs_value-inst_id = lv_inst_id.
          li_order_cfgs_value-charc = 'Z_MC_NOMBRE'.
          li_order_cfgs_value-value = it_pedidos_pos-nombre_serigr.
          APPEND li_order_cfgs_value.
          li_order_cfgs_value-inst_id = lv_inst_id.
          li_order_cfgs_value-charc = 'Z_MC_LETRA'.
          li_order_cfgs_value-value = it_pedidos_pos-tipo_letra.
          APPEND li_order_cfgs_value.
    Thank you in advance.
    Regards.

    Hi REIS did you get any answer to your pb I have exactly the same request .
    these internal id for instance and configuration are confusing .
    Thanks for your return if your pb has been solved since .
    Rgards
    Yvon

  • BAPI_SALESORDER_CREATEFROMDAT2 with each item having diff Ship to party

    Hi Abapers,
    Can anyone guide me in this scenario:
    Creation of sales order using BAPI_SALESORDER_CREATEFROMDAT2 with each item having different ship to party.
    Ex :
             Item Material Qty Delivery date Ship to party
             10   p-100     2     24.12.2011    1020
             20   p-100     4     26.12.2011    1050.
    Can we use this bapi for the present scenario. If yes how to send the multiple ship to party. when i create sales order through VA01 its getting created but not with this bapi.
    Thanks for supporting.

    Pass Table ORDER_PARTNERS with
    PARTN_ROLE
    PARTN_NUMB
    ITM_NUMBER   = '000010'  
    PARTN_ROLE
    PARTN_NUMB
    ITM_NUMBER   = '000020' 
    and so on

  • Several Return orders with Ref. to one MTO Billing Document.

    Hi,
    I am doing RE with ref. to MTO Billing Document but i am able to issue "N" number of credit memo's with ref. to same MTO.
    Please tell me the Controll, that stops raising the second RE order with ref. to same MTO.
    I checked copy controls completion rule in Item catagory but still the problem not solved.
    Waiting for reply
    Veera.

    Dear Veera,
        The issue is related to the copy control settings only , so you go to VTAF transaction then go in to the item details of your return order type and MTO Billing document type.
    Here you can find the field positive/negative quantity you maintain that as '-' negative.
    Now you try
    I hope it will help you
    Regards,
    Murali.

Maybe you are looking for