Convert Purchase Order to Requisition when contract void

Hi
We are using SRM 5.0, R/3 Backend is 4.6C.
For purchase orders for items with contracts that are expired or for incoming requests exceeding target quantity in the contract, we intend to have the purchase order converted to a purchase requisistion automatically.
To do this we have activated the BBP_TARGET_OBJTYPE and implemented the DETERMINE_TARGET_OBJECT_TYPES to convert the PO to PReq by doing the following:
wa_item-pack_objtype = 'BUS2105'. "set to PReq
CLEAR: wa_item-ctr_hdr_number,
       wa_item-ctr_item_number.
MODIFY ct_item FROM wa_item.
when expired contract or target quantity of contract exceeded is detected.
However, on approving, this results in backend error:
Shopping cart 7100133540 (PReq. 8100022935): 06 722 Source not included in list despite source list requirement    
One observation made when debugging the BAdI is that when the BAdI is being run, ct_item is already set to BUS2105 (PR).

Hi Yann
This is because the users would like to automatically create a requisistion when their prior shopping cart ends up in error due to contract expiry or having exceeded target quantity.
The purchase order would then be converted to a purchase requisition (PR) by removing the source of supply.
The error seems to arise from attempting to create a PR in the backend. Is there a way of bypassing this source list check and simply create a PR from SRM?
Removing the source of supply from the shopping cart before approval successfully turns it to a PR. This is what we would want to do, but after approval for situations when contract expires in the midst of approval, or target quantity has been exceeded with this order.
Thank you
Message was edited by: Ban Horng Tan

Similar Messages

  • Idoc Generation after Purchase Order Creation through trading contract.

    Hi All,
    When a Purchase Order is created via trading contract, I need to generate an Idoc and pass details of the Purchase Order created to the Partner System.
    Can anyone suggest any Function module or user exit which gets called while Purchase Order creation through trading contract, so that I can fill the Idoc with necessary details of the Purchase Order and send that to the Partner System?
    Thanks in advance.

    Hi Tejas,
    I do not know about Trading Contract but what all I can say it that Check if Change pointers are getting written Once the PO has been created, If "Yes" then probably you do not have to do anything for craetion of Purchanse Order. You can use RBDMIDOC Program to create IDOCs from change pointers.
    Refer [this|http://help.sap.com/saphelp_nw04/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm] for more information on change pointers.
    Regards
    Shital

  • Creation of Purchase Order Without Requisition

    Hi Experts iam new to this forum
    Can u please explain with navigation that how to create a Purchase order without requisition ??

    Navigate to purchasing responsibility.
    use menu --> Purchase order --> Purchase order form.
    This is a very detailed note on how to do that:
    How to Create Purchase Orders (Doc ID 168237.1)
    Regards,
    Paarthy

  • Purchase Order in reference to contract

    Hi,
    Does anyone know whether i can create purchase order in reference to purchase contract via BAPI? or any other methods?
    Thanks

    for reference see OSS note Note 80462 - Wrong conv.factor during GR for POrder/sched.agrmnt
    The purchasing document must be created again!
    If the purchase order refers to a contract, you must also create the contract again because the conversion factors from the contract are taken over into the purchase order.
    The conversion factor itself cannot be changed in the purchasing document - even if no WE has yet been booked - since this may lead to inconsistencies in the inventory management or to price variances during the invoice verification.

  • Coding to calculate net purchase order value against the contract?.

    Hi ,
    Please help.
    Can any one send me the coding to calculate net purchase order value against the contract?.
    Thanks

    I got the below coding and information from SDN, would you please help me to fix this coding
    infomation from SDN
    For the above requirment I have coded a program in Endroutine but it is not populating cummulative Order value against Contract.
    DATA:
    WA_ty_t_TG_1 TYPE tys_TG_1.
    data: netsum type char15.
    types:begin of ty_net,
    netsum type /BI0/OINET_PO_VAL,
    V_EBELN TYPE /BI0/OIOI_EBELN,
    end of ty_net.
    data:t_net type standard table of ty_net .
    data:wa_net type ty_net.
    SORT RESULT_PACKAGE BY CONTRACT.
    loop at RESULT_PACKAGE INTO WA_ty_t_TG_1.
    WA_NET-V_EBELN = <RESULT_FIELDS>-CONTRACT.
    AT END OF CONTRACT.
    netsum = WA_ty_t_TG_1-NET_PO_VAL + NETSUM.
    ENDAT.
    WA_NET-netsum = NETSUM.
    APPEND WA_NET TO T_NET.
    CLEAR:T_NET,NETSUM.
    ENDLOOP.
    loop at RESULT_PACKAGE assigning <RESULT_FIELDS> .
    READ TABLE T_NET INTO WA_NET WITH KEY
    V_EBELN = <RESULT_FIELDS>-CONTRACT
    <RESULT_FIELDS>-/BIC/YNET_VAL = NETSUM.
    CLEAR: WA_NET-NETSUM.
    endloop.
    <RESULT_FIELDS>-/BIC/YNET_VAL = netsum.
    CLEAR:NETSUM,<RESULT_FIELDS>-/BIC/YNET_VAL.
    ENDLOOP.
    I have coded above one..let me know what mistake I have done.in the bolded loop I have given INTO instead of Assigning, because I need all records which assigns to WorkArea, but while executing DTP its leading to shortdump.if I replace Assigning statement,its working fine. but zero values in output( I think wrong in logic part)
    Let me know the brief coding part if I am wrongly coded.

  • Convert to purchase order in ref to contract problem

    Hi experts,
    I have problem in creating purchase order in which i want to based on the purchase contract.
    I create in tcode : ME21, click on the 'Ref to contract' button and enter the button. Then enter the necessary fields. Click on the 'Adopt + details'.
    I use SHDB to perform this process. But when i run the SHDB in my program, there is a message 'Net price for item 00010 adopted from the last document'. Why i do not get this message while creating SHDB?
    This makes the purchase order net price incorrect. It captures different net price. How do i solve it?
    Thanks

    Hi Narayanan,
    I think when you convert Preqs to POs thru RRP7, POs are created in ECC thru default transaction ME21 or ME21N. Since you are able to create Purchase Orders, nothing is required on APO side. The necessary information passed from APO to ECC thru IM of purchase orders is start and end date, material, supplying and destination plant. All other information is selected from ECC customizations (SPRO) and material master in ECC.
    Please check SPRO in ECC and material master (tax, Accounting tabs) with MM / accounts consultant or user. Alternatively, you can update POs using z code.
    Regards,
    Bipin

  • Purchase Order error message when on Sourcing Cockpit.

    Hi All,
    I have encountered a series of error messages when I try to convert my Shopping Cart into a Purchase Order in SRM 5 within the Sourcing Cockpit. I am using Extended Classic Scenario and have defined the number range in SRM and ECC5. The error messages are below, the moment i try to concert the cart to a Po;
    - Internal number range is missing for transaction type. Inform syst. admin    
    - Transaction type * does not exist. Check entries    
    - Some backend documents could not be generated, or they contain errors  Further Information 
    - No status object is available for 
    I have checked the transaaction type, number ranges assignments, attributes in PPOMA_BBP but fail to find the cause.
    Any pointers would be welcome!
    Thnx,
    Mike

    Hi Muthu,
    The number ranges are consistent as I have checked the number range for local purchase order and this is set as an internal between the range 3000000000 - 3999999999. On the transaction type for BUS2201 Purchase Order, 30 has been set as the Int Number Range, with all other fields left blank.
    The strange thing is that the documents that failed to convert into a PO had been reprocessed in the Application Monitor for Purchase Orders, but when I go back into Sourcing to create the PO, I now get the message:
    "You have either failed to select an item, or you cannot create a follow-on document due to an error that has occurred"
    Regards
    Mike,

  • 2 Purchase Orders against one trading contract in GTM

    Dear All
    This question is realted to GTM Module.
    In our case for 1 Trading Contract 2 Purcahse Orders are created.Does anybody know the reason as to when 2 Purchase Orders are created against one Trading Contract.
    Regards
    VA

    Hi
    There is no duplication it is actually a quantity split.
    If ther are 5 items in Trading Contract 4 got created in PO and 2nd in the following PO?
    Regards

  • Convert planned order in requisition order

    Hi expoerts,
    I have created a BOM with 4 materials. After that, I have created a planned order in MD11 with order profile PR (project order).
    This planned order was assigned to WBS Element. I ran MD01.
    I have checked in MD04 and I was able to see that it's possible to convert planned order in purchase requisition only to header material from BOM - account assignment category 'Q" (project stock). For other 3 materials, it was created dependent requirement - view plant stock.
    I'd like to know if it's possible to create purchase requisition with account assignment category "Q" for all materials assigned in BOM after run MD01.
    Thanks.

    Hi,
    Set Individual/coll. indicator to 1 in MRP 4 View of material master (for the BOM components).
    Regards,
    Mario

  • Purchase orders and requisitions - R12 user interfaces

    Hi,
    I see that the purchase order can be registered in the system by two different interfaces (I'm running R12.1.1): Using Oracle forms (Navigation path: Purchasing Super user: -> Purchase orders -> Purchase orders) and using Java html pages (Navigation path: Purchasing Super user: ->Buyer workspace ->Orders).
    I have two questions:
    1. The second option (using java pages) is not documented in the usersguide. Is it fully in production or they are still developing it? Why there are two different interfaces for the same purpose?
    2. I see that from Java pages interface I can only see requisitions, but I cannot enter new ones (Navigation path: Purchasing Super user: ->Buyer workspace ->Requisitions). Should I enable somewhere this or the requisition is not developed using Java pages interface?
    Thank you

    993322 wrote:
    Hi,
    I see that the purchase order can be registered in the system by two different interfaces (I'm running R12.1.1): Using Oracle forms (Navigation path: Purchasing Super user: -> Purchase orders -> Purchase orders) and using Java html pages (Navigation path: Purchasing Super user: ->Buyer workspace ->Orders).
    I have two questions:
    1. The second option (using java pages) is not documented in the usersguide. Is it fully in production or they are still developing it? Why there are two different interfaces for the same purpose?
    2. I see that from Java pages interface I can only see requisitions, but I cannot enter new ones (Navigation path: Purchasing Super user: ->Buyer workspace ->Requisitions). Should I enable somewhere this or the requisition is not developed using Java pages interface?
    Thank you
    http://docs.oracle.com/cd/E18727_01/doc.121/e13410/T446883T443956.htm
    http://www.apps2fusion.com/training_demo/puneetk/Professional-Buyer-Work-Center.pdf
    HTH
    Mahendra

  • Outbound Idoc creation after Purchase Order Creation via Trading contract

    Hi All,
    Below is my requirement-
    Purchase Order Will be created automatically through trading contract.
    I need to pass some details about the purchase order created to the external system through IDOCS.
    ie this idoc should get triggered whenever a Purchase Order is created through Trading contract.
    Are there standard function modules which can trigger idoc whenever Purchase Order is created through Trading Contract?
    Please suggest how to go about it.
    Thanks in advance.

    Hi Tejas,
    Ask your functional consultant to create a new output type for this Purchase order. Attache RSNASTED program and EDI_PROCESSING routine to that output type.And also maintain partner profile for the partner to whom you want to send PO.There is a standard process code ME10 to send Purchase order data.Assign this process code and your new output type in the message control tab of the outbound partner profile view.Hope this helps.
    Thanks & Regards,
    Kalyan.

  • How to convert Purchase Order to Sales Order in the Target system of Vendor

    Hi all,
                 My sender system and receiver system both are ECC6.00 . We are not using any Xi/PI or EDI tool ., but using ALE to tranfer purchase order to the Vendor System . The PO IDoc is getting tranfered to Target System, but the Corresponding Sales order is not being generated .
                 My query is how the  inbound process in the trarget system determines what are the master data will be used to create the Sales Order . as the transfered IDOC will not have sales area, distribution channel or  division .
    Best Regards

    Hi,
    Here u need to use PI or any middleware.
    For PI , it will be IDOC to RFC scenario :
    Sender side - IDOC - Orders05 or whichever u want
    Receiver side - RFC -Import the BAPI you want to use , for your case most probably it will be 'BAPI_SALESORDER_CREATEFROMDAT2'.
    Pass the mandatory fields required to bapi .
    kindly check :
    http://www.sap-img.com/fu036.htm
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CREATEFROMDAT2
    http://www.saptechies.com/bapi-to-create-sales-order-with-reference/
    http://www.scribd.com/doc/3335908/BAPI-Step-by-Step
    You can refer IDOC to RFC scenarios in forum from search.
    Best Regards

  • Using IDoc to convert Purchase Order as Sale Order between two Company code

    Dear Experts,
    We are in need of implementing IDoc.
    We have 2 Company codes. One in US and another in India.
    The US Company receives Customer Order and PR is generated automatically for the Third Party Sale Order.
    The PO is also generated based on this PR against the Vendor code (Indian Company actually created as a Vendor code also)
    Now, the PO from Us Company should be converted as Order in Indian Company. The PO sending Plant is the Customer in this case.
    Now,
    1. How we go about this using IDoc.
    2.How do we capture the Sold-to-Party ( US Compnay in thsi case) and the Ship-to-Party ( Direct Customer of US Company)
    Please share your experties on this.
    Regards,
    Ramki

    Hi Ramki,
    Since the goods are selling between 2 company codes.. you should ideally use inter company process i.e. choose plant as Indian plant and etc..pls search the forum for intercompany process set up or refer to the setup required for Intercompany :
    [http://www.sap-img.com/sap-sd/inter-company-sales-process.htm]
    The above setup will help you in dealing with your question 2.
    On question 1: Once you setup the intercompany you won't require IDocs setup.
    I hope this helps.
    Regards,
    Raghu.

  • Purchase Order from Requisition

    My scenario is:
        I need to create a Purcahase Order based on Purchase Requisition as i need to add one new line item as a sample in the line item.If anybody has worked on the similar kind of scenario...kindly help me.
    This is related to transaction ME21 .
    Regards,
    Rahul.

    Hi Rahul,
    Try for userexit,
    Here are the list of available user exits for ME21.
    EXIT_SAPMM06E_001 - Other Number Range or Own Document Number
    EXIT_SAPMM06E_004 - User Exit for Cust.-Specific Control of Import Data Screens in Purchasing
    EXIT_SAPMM06E_005 - Field Selection Control: Vendor Address Screen
    EXIT_SAPMM06E_006 - Export Data to Customer Subscreen for Purchasing Document Header (PBO)
    EXIT_SAPMM06E_007 - Export Data to Customer Subscreen for Purchasing Document Header (PAI)
    EXIT_SAPMM06E_008 - Import Data from Customer Subscreen for Purchasing Document Header
    EXIT_SAPMM06E_009 - Reset Customer Data at Beginning of New Document (Without Dialog)
    EXIT_SAPMM06E_012 - Check Customer-Specific Data Before Saving
    EXIT_SAPMM06E_013 - Update Customer-Specific Data in Purchasing Document
    EXIT_SAPMM06E_014 - Read Customer-Specific Data when Importing Purchasing Document
    EXIT_SAPMM06E_016 - Export Data to Customer Subscreen for Purchasing Document Item (PBO)
    EXIT_SAPMM06E_017 - Export Data to Customer Subscreen for Purchasing Document Item (PAI)
    EXIT_SAPMM06E_018 - Import Data from Customer Subscreen for Purchasing Document Item
    EXIT_SAPMM06E_020 - User Exit: Change Document for Requisitions (Conversion into PO)
    EXIT_SAPMM06E_021 - Fulfillment of Target Value: Release Orders Against a Contract
    Find the available exits with the following program:::
    *& Report ZFINDUSEREXIT
    report zfinduserexit.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    select single * from enlfdir where funcname =
    tfdir-funcname.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct where sprsl eq sy-langu and
    tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    Hope this will help.
    Regards,
    Phani.

  • How to create Purchase order from Requisitions!

    Hi there,
    Please help me in this case:
    I was created a outline agreements for item MN.001 (4600000014), and then created and released success for Requisition  10000180. After that I want to create PO from above Requisition (use T-code  ME25 -Vendor Unknown). These steps as follow:
    1. Navigator to T-Code : ME25
    2. Refer to Req : 10000180
    3. Assign Source to Agreement : 4600000014
    4. click button Generate to create PO from REQ --> system message that "Item blocked for order processing (function not possible)"
    Please help me!
    thanks for your advise!
    Viettq.

    hi,
    When you are using the outline agreement for the PR and then shd use for the PO...from where this RFQ comes in the scene??
    Also PR is already asigned to the source as outline agreement...
    Regards
    Priyanka.P
    Edited by: Priyanka Paltanwale on Nov 7, 2008 6:03 AM

Maybe you are looking for