{"audience":"Buyers, purchasing managers and supply planners.","authorization_objects":[{"note":"Requisition processing authorization by plant","object":"M_BANF_WRK"},{"note":"Create authorization by order type (job user)","object":"M_BEST_BSA"},{"note":"Create authorization by purchasing organization","object":"M_BEST_EKO"},{"note":"Order authorization by plant","object":"M_BEST_WRK"}],"components":[],"countries":[],"effort_days_max":7,"effort_days_min":5,"effort_size":"M","faq":[{"a":"Yes. Because the program creates the order with the standard BAPI, the release strategy is determined as usual. Orders above the value threshold wait for approval; they can be followed in a separate report.","q":"Do the created orders go through the release strategy?"},{"a":"Requisitions without a determined vendor are written to the hold list and are not converted. The list is emailed to the purchasing group; once the buyer defines the source, the next run processes the requisition automatically.","q":"What happens to materials without a source list?"},{"a":"Yes. BAPI_PO_CREATE1 is supported in S/4HANA and the EBAN, EORD and EINA/EINE structures are the same. For a clean core approach, reading can use I_PurchaseRequisitionItemAPI01 and creation the released purchase order API.","q":"Can it be used on S/4HANA?"}],"features":[{"code":"background","label":"Runs as a background job","note":""},{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"email","label":"Send the result by email","note":"Created orders and the hold list are sent separately to each purchasing group."}],"functions":[{"name":"BAPI_PO_CREATE1","role":"Creates the purchase order with requisition references per group"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful orders permanently"},{"name":"BAPI_TRANSACTION_ROLLBACK","role":"Rolls back changes in test mode or on error"}],"gap":"ME59N converts requisitions into orders automatically, but it needs the automatic PO flag in the material and vendor master and a single fixed source; it has no item-count limit, value threshold, minimum waiting days or hold list that tells the buyer which requisitions found no source. ME57 is interactive. The custom program applies the conversion rules of the customer's policy and emails the result to the buyer.","id":"mm-pr-to-po-auto-conversion-job","industries":[],"input_columns":[],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. EBAN is read by plant, purchasing group, requisition type and material; only items that are released (FRGKZ at its post-release value, FRGDT filled), not deleted, with an ordered quantity (BSMNG) below the requisition quantity and released at least N days ago remain.\n2. The vendor is determined: if EORD has a fixed source (FLIFN = X) valid on the requisition date and not blocked (NOTKZ blank), it is used; otherwise a single valid source list entry is accepted. With several sources or none, the requisition goes to the hold list.\n3. Price and delivery time come from the EINA/EINE info record; without an info record the requisition goes to the hold list.\n4. Requisitions are grouped by vendor, purchasing organization, purchasing group, plant and currency; BAPI_PO_CREATE1 is called with at most P_MAXIT items per group, passing the requisition reference (PREQ_NO/PREQ_ITEM).\n5. Successful orders are saved with BAPI_TRANSACTION_COMMIT; on error or in test mode BAPI_TRANSACTION_ROLLBACK runs. The result log and the hold list are emailed to the purchasing group.","module":"MM","object_type":"batch_job","output_columns":[{"calculated":false,"formula":"","label":"Requisition","source_field":"BANFN","source_table":"EBAN"},{"calculated":false,"formula":"","label":"Req. item","source_field":"BNFPO","source_table":"EBAN"},{"calculated":false,"formula":"","label":"Material","source_field":"MATNR","source_table":"EBAN"},{"calculated":false,"formula":"","label":"Quantity","source_field":"MENGE","source_table":"EBAN"},{"calculated":false,"formula":"","label":"Vendor determined","source_field":"LIFNR","source_table":"EORD"},{"calculated":false,"formula":"","label":"Purchase order","source_field":"EBELN","source_table":"EKKO"},{"calculated":false,"formula":"","label":"Order item","source_field":"EBELP","source_table":"EKPO"},{"calculated":true,"formula":"Order created, hold list or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"Source determination result or BAPI return message","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Plant","name":"S_WERKS","ref_field":"EBAN-WERKS","required":true},{"example":"001","kind":"select_option","label":"Purchasing group","name":"S_EKGRP","ref_field":"EBAN-EKGRP","required":false},{"example":"NB","kind":"select_option","label":"Requisition type","name":"S_BSART","ref_field":"EBAN-BSART","required":false},{"example":"RM-*","kind":"select_option","label":"Material","name":"S_MATNR","ref_field":"EBAN-MATNR","required":false},{"example":"NB","kind":"parameter","label":"Order type to create","name":"P_BSART","ref_field":"EKKO-BSART","required":true},{"example":"1","kind":"parameter","label":"Minimum days since release","name":"P_DAYS","ref_field":"","required":false},{"example":"50","kind":"parameter","label":"Maximum items per order","name":"P_MAXIT","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Test mode (simulate without creating orders)","name":"P_TEST","ref_field":"","required":false}],"part_of":["p2p-purchasing-cycle-time-pack"],"performance":"Restrict the EBAN selection by plant and release date; read EORD and EINE once for the selected materials. Schedule the program once or twice a day outside working hours; use an ENQUEUE lock so that the same requisition is not processed by two jobs.","process":"P2P","quote_url":"https://nekuhub.com/en/request-a-quote/?report=mm-pr-to-po-auto-conversion-job","related":["mm-info-record-source-list-upload","mm-open-purchase-requisitions-aging","mm-po-release-pending-aging","mm-purchase-order-mass-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Converts requisitions with the automatic PO flag and a single source; no item limit, waiting days or hold list.","tcode":"ME59N"},{"note":"Assigns requisitions to sources and converts them manually; does not run in the background.","tcode":"ME57"}],"summary":"A custom background program that assigns released requisitions not yet converted to an order to a vendor via the source list and info record, groups them by vendor, purchasing group and plant and converts them into purchase orders. Buyers no longer create orders by hand for recurring materials; requisitions without a clear source stay on a separate hold list.","tables":[{"access":"write","join_on":"","role":"Released requisition items; ordered quantity and reference are updated when the order is created","table":"EBAN","variant":"both"},{"access":"read","join_on":"EORD-MATNR = EBAN-MATNR AND EORD-WERKS = EBAN-WERKS","role":"Source list: fixed and valid vendor","table":"EORD","variant":"both"},{"access":"read","join_on":"EINA-MATNR = EBAN-MATNR AND EINA-LIFNR = EORD-LIFNR","role":"Info record general data","table":"EINA","variant":"both"},{"access":"read","join_on":"EINE-INFNR = EINA-INFNR AND EINE-EKORG = EBAN-EKORG AND EINE-WERKS = EBAN-WERKS","role":"Info record price and delivery time","table":"EINE","variant":"both"},{"access":"write","join_on":"","role":"Header of the created order","table":"EKKO","variant":"both"},{"access":"write","join_on":"EKPO-BANFN = EBAN-BANFN AND EKPO-BNFPO = EBAN-BNFPO","role":"Order items with requisition reference","table":"EKPO","variant":"both"}],"title":"Automatic Conversion of Released Purchase Requisitions to Purchase Orders Program","url":"https://nekuhub.com/en/programs/automatic-purchase-requisition-to-purchase-order-conversion-job/","vendor_id":"nekudos"}