{"audience":"Buyers, project buying teams and teams that regularly place bulk orders from price lists.","authorization_objects":[{"note":"Purchase order create authorization by document type","object":"M_BEST_BSA"},{"note":"Purchase order create authorization by purchasing organization","object":"M_BEST_EKO"},{"note":"Purchase order create authorization by purchasing group","object":"M_BEST_EKG"},{"note":"Purchase order create authorization by plant","object":"M_BEST_WRK"}],"components":[],"countries":[],"effort_days_max":7,"effort_days_min":5,"effort_size":"M","faq":[{"a":"Yes. BAPI_PO_CREATE1 creates the order with the standard rules; if the order type and value match a release strategy, the order waits for release.","q":"Do the created orders go through the release strategy?"},{"a":"They can be loaded through the POCOND structure by adding condition type and amount columns to the template. Each extra field group increases the effort range.","q":"Can conditions (discounts, freight) be loaded too?"},{"a":"Yes. BAPI_PO_CREATE1 is supported on S/4HANA. For a clean core approach, the same file logic can also be built on the purchase order API.","q":"Can this program be used on S/4HANA?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"error_file","label":"Download failed lines as a separate file","note":"The corrected file can be uploaded again with the same template."},{"code":"excel","label":"Export to Excel","note":"An empty upload template can be downloaded as Excel."},{"code":"background","label":"Runs as a background job","note":""}],"functions":[{"name":"BAPI_PO_CREATE1","role":"Creates each order group as one purchase order; only checks in test mode"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves a successful order permanently"},{"name":"BAPI_TRANSACTION_ROLLBACK","role":"Rolls back the changes of a failed order"},{"name":"TEXT_CONVERT_XLS_TO_SAP","role":"Reads the Excel file into an internal table"}],"gap":"ME21N creates each order one at a time on screen. ME59N only converts existing purchase requisitions; it does not cover bulk orders placed without a requisition. LSMW recordings are fragile on the ME21N Enjoy screens. Project purchases with hundreds of items or periodic price-list orders need a templated upload with a test mode.","id":"mm-purchase-order-mass-upload","industries":[],"input_columns":[{"derived":true,"label":"Group no (same number = same order)","required":true,"rule":"Grouping key in the file; together with vendor and organization it defines the order header","target_field":null,"target_table":null},{"derived":false,"label":"Vendor","required":true,"rule":"","target_field":"LIFNR","target_table":"EKKO"},{"derived":false,"label":"Purchasing organization","required":true,"rule":"","target_field":"EKORG","target_table":"EKKO"},{"derived":false,"label":"Purchasing group","required":true,"rule":"","target_field":"EKGRP","target_table":"EKKO"},{"derived":false,"label":"Company code","required":true,"rule":"","target_field":"BUKRS","target_table":"EKKO"},{"derived":false,"label":"Material (blank for text items)","required":false,"rule":"","target_field":"MATNR","target_table":"EKPO"},{"derived":false,"label":"Short text","required":false,"rule":"","target_field":"TXZ01","target_table":"EKPO"},{"derived":false,"label":"Plant","required":true,"rule":"","target_field":"WERKS","target_table":"EKPO"},{"derived":false,"label":"Quantity","required":true,"rule":"","target_field":"MENGE","target_table":"EKPO"},{"derived":false,"label":"Unit","required":false,"rule":"","target_field":"MEINS","target_table":"EKPO"},{"derived":false,"label":"Net price (blank = info record)","required":false,"rule":"","target_field":"NETPR","target_table":"EKPO"},{"derived":false,"label":"Delivery date","required":true,"rule":"","target_field":"EINDT","target_table":"EKET"},{"derived":false,"label":"Account assignment category","required":false,"rule":"","target_field":"KNTTP","target_table":"EKPO"},{"derived":false,"label":"Cost center","required":false,"rule":"","target_field":"KOSTL","target_table":"EKKN"},{"derived":false,"label":"WBS element","required":false,"rule":"","target_field":"PS_PSP_PNR","target_table":"EKKN"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read from the user's PC (TEXT_CONVERT_XLS_TO_SAP) or, in a background job, from the application server; rows are split into order headers by group number, vendor, purchasing organization, purchasing group and company code.\n2. Every row is checked: the vendor's purchasing organization data (LFM1) and blocks, the material existing in the plant (MARC), the unit of measure, the delivery date and the account assignment. If the price is blank, it is taken from the valid purchasing info record (EINE).\n3. Rows are mapped to the BAPI_PO_CREATE1 structures: POHEADER, POITEM, POSCHEDULE and, for account-assigned items, POACCOUNT (cost center or WBS element).\n4. In test mode the BAPI is called with TESTRUN = X, so all errors and warnings are visible without a number being assigned.\n5. In a real run BAPI_TRANSACTION_COMMIT is called after each successful order and BAPI_TRANSACTION_ROLLBACK after a failed one; the result list shows the order number and row messages, and failed rows can be downloaded as a separate file.","module":"MM","object_type":"upload","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":true,"formula":"Group number from the file","label":"Group no","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Vendor","source_field":"LIFNR","source_table":"EKKO"},{"calculated":false,"formula":"","label":"Purchase order","source_field":"EBELN","source_table":"EKKO"},{"calculated":false,"formula":"","label":"Item","source_field":"EBELP","source_table":"EKPO"},{"calculated":false,"formula":"","label":"Net value","source_field":"NETWR","source_table":"EKPO"},{"calculated":true,"formula":"From the BAPI return messages: checked, created or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"C:\\temp\\siparisler.xlsx","kind":"parameter","label":"Upload file (XLSX or CSV)","name":"P_FILE","ref_field":"","required":true},{"example":"NB","kind":"parameter","label":"Order document type","name":"P_BSART","ref_field":"EKKO-BSART","required":true},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Take price from info record if blank","name":"P_INFO","ref_field":"","required":false}],"part_of":["ca-mass-upload-toolkit-pack"],"performance":"Committing per order isolates failed orders. Run files above a few thousand rows as a background job. For order types with a release strategy, the created orders enter the normal release flow.","process":"P2P","quote_url":"https://nekuhub.com/en/request-a-quote/?report=mm-purchase-order-mass-upload","related":["mm-contract-utilization","mm-open-po-by-vendor","mm-open-purchase-requisitions-aging"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Creates orders one at a time on screen; does not read a file.","tcode":"ME21N"},{"note":"Converts existing requisitions into orders automatically; does not create bulk orders without requisitions.","tcode":"ME59N"}],"summary":"A custom program that creates purchase orders in bulk from Excel or CSV rows, grouping them by vendor, purchasing organization and group number. It checks all rows in test mode first, then lists the number created for each order and the messages per row.","tables":[{"access":"write","join_on":"","role":"Order header: vendor, organization, document type","table":"EKKO","variant":"both"},{"access":"write","join_on":"","role":"Order item: material, plant, quantity, price","table":"EKPO","variant":"both"},{"access":"write","join_on":"","role":"Schedule line and delivery date","table":"EKET","variant":"both"},{"access":"write","join_on":"","role":"Account assignment: cost center or WBS element","table":"EKKN","variant":"both"},{"access":"read","join_on":"LFM1-LIFNR = EKKO-LIFNR AND LFM1-EKORG = EKKO-EKORG","role":"Vendor purchasing organization data and block (check)","table":"LFM1","variant":"both"},{"access":"read","join_on":"MARC-MATNR = EKPO-MATNR AND MARC-WERKS = EKPO-WERKS","role":"Material exists in the plant (check)","table":"MARC","variant":"both"},{"access":"read","join_on":"EINE-EKORG = EKKO-EKORG AND EINE-WERKS = EKPO-WERKS","role":"Info record net price when the price is blank","table":"EINE","variant":"both"}],"title":"Mass Purchase Order Creation from Excel Program","url":"https://nekuhub.com/en/programs/mass-purchase-order-creation-from-excel-program/","vendor_id":"nekudos"}