Automatic Conversion of Released Purchase Requisitions to Purchase Orders Program
Short answer: 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.
- Estimated effort
- M · 5–7 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
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.
Who uses it? Buyers, purchasing managers and supply planners.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| EBANPurchase Requisition | Released requisition items; ordered quantity and reference are updated when the order is created | Write | ECC + S/4 |
| EORDPurchasing Source List | Source list: fixed and valid vendor | Read | ECC + S/4 |
| EINAPurchasing Info Record: General Data | Info record general data | Read | ECC + S/4 |
| EINEPurchasing Info Record: Purchasing Organization Data | Info record price and delivery time | Read | ECC + S/4 |
| EKKOPurchasing Document Header | Header of the created order | Write | ECC + S/4 |
| EKPOPurchasing Document Item | Order items with requisition reference | Write | ECC + S/4 |
BAPIs and functions used
- BAPI_PO_CREATE1Create Purchase Order. Creates the purchase order with requisition references per group
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful orders permanently
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back changes in test mode or on error
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | EBAN-WERKS | Yes | 1000 |
| S_EKGRP | Purchasing group | Range / multiple | EBAN-EKGRP | No | 001 |
| S_BSART | Requisition type | Range / multiple | EBAN-BSART | No | NB |
| S_MATNR | Material | Range / multiple | EBAN-MATNR | No | RM-* |
| P_BSART | Order type to create | Single value | EKKO-BSART | Yes | NB |
| P_DAYS | Minimum days since release | Single value | — | No | 1 |
| P_MAXIT | Maximum items per order | Single value | — | No | 50 |
| P_TEST | Test mode (simulate without creating orders) | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Requisition | EBAN-BANFN |
| 2 | Req. item | EBAN-BNFPO |
| 3 | Material | EBAN-MATNR |
| 4 | Quantity | EBAN-MENGE |
| 5 | Vendor determined | EORD-LIFNR |
| 6 | Purchase order | EKKO-EBELN |
| 7 | Order item | EKPO-EBELP |
| 8 | Status | Calculated Order created, hold list or error |
| 9 | Message | Calculated Source determination result or BAPI return message |
Sample result list
| Requisition | Req. item | Material | Quantity | Vendor determined | Purchase order | Order item | Status | Message |
|---|---|---|---|---|---|---|---|---|
| 0010004810 | 00010 | RM-1001 | 5,000 | 100245 | 4500013301 | 00010 | Order created | Fixed source and info record price used |
| 0010004811 | 00010 | RM-1002 | 1,200 | 100245 | 4500013301 | 00020 | Order created | Added to the same vendor group |
| 0010004815 | 00010 | RM-2040 | 800 | Hold list | Two valid sources; the buyer must choose | |||
| 0010004822 | 00020 | CH-0315 | 300 | 100512 | Error | No info record for plant 1000 |
How does the program work?
- 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.
- 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.
- Price and delivery time come from the EINA/EINE info record; without an info record the requisition goes to the hold list.
- 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).
- 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.
Performance notes
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.
Features
- Runs as a background job
- Test mode (check without posting)
- Line-by-line result and error log
- Send the result by email Created orders and the hold list are sent separately to each purchasing group.
Authorization objects
- M_BANF_WRKRequisition processing authorization by plant
- M_BEST_BSACreate authorization by order type (job user)
- M_BEST_EKOCreate authorization by purchasing organization
- M_BEST_WRKOrder authorization by plant
Frequently asked questions
Do the created orders go through the release strategy?
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.
What happens to materials without a source list?
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.
Can it be used on S/4HANA?
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.
Packages that include this solution
Purchasing Approval and Cycle Time Pack
A four-component pack that shows where purchasing waits between requisition and payment: released requisitions not yet ordered, purchase orders …
Related reports
Purchasing Info Record and Source List Mass Upload from Excel Program
A custom upload program that creates or updates purchasing info records (price, delivery time, standard quantity) from a single Excel file and also …
Released Purchase Requisitions Not Yet Converted to Purchase Orders Report
A custom ALV report that lists released purchase requisition items not yet converted to a purchase order, with open quantity, open value and days …
Purchase Orders Awaiting Release Approval Aging Report
A custom ALV report that lists purchase orders held by a release (approval) strategy, together with the next release code, the order value and how …
Mass Purchase Order Creation from Excel Program
A custom program that creates purchase orders in bulk from Excel or CSV rows, grouping them by vendor, purchasing organization and group number. It …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.