Quick answer

How an SAP vendor master upload with XK01 works

XK01 in SAP ECC creates a vendor centrally: general data, company code data and purchasing organization data in one transaction. For an SAP vendor master upload from Excel, PostNow.ai records XK01 once and replays the recording for every row of the supplier sheet, because SAP's BAPI_VENDOR_CREATE takes no vendor data. Validate checks the sheet offline, Debug and Simulate let you watch rows go through SAP's screens first, and Run creates each vendor under your own SAP login and writes SAP's message, with the new vendor number, to the row.

  • Decide the account group first. It sets the vendor's number range and which fields XK01 shows, so it decides what the recording sees.
  • Screen for duplicates before the run. Compare tax number and bank details against SAP and against the file itself.
  • On S/4HANA the supplier is a Business Partner. XK01 redirects to transaction BP, so the load goes through the Business Partner route instead.

This page covers SAP vendor master automation in SAP ECC: creating vendors in bulk with XK01 and extending them to new company codes or purchasing organizations. Customers are in XD01 customer master upload, S/4HANA suppliers in SAP Business Partner mass upload, and the other master data objects with their load order in SAP master data mass upload.

How PostNow.ai runs an XK01 mass upload from Excel

PostNow.ai runs an XK01 mass upload as a recorded template: a designer records and maps XK01 once against your SAP system and publishes the template, and procurement or the master data team runs its supplier lists through it, each user under their own SAP login on their own computer.

  1. Record XK01 once. From the PostNow.ai ribbon, the designer records the creation of one vendor and fills every field the file will carry: the initial screen (company code, purchasing organization, account group), address, control data with the tax numbers, payment transactions with one bank line, accounting information, payment transactions in the company code, and the purchasing data. Recording mode uses PostNow.ai's ZPOSTNOW_* objects, installed once in SAP. PostNow.ai logs in to SAP GUI only on the user's own computer, with the user's own stored login, when the user starts the action (Record, Run, Debug or Call Transaction); never on a server, never unattended, never with someone else's login.
  2. Map every recorded field. In the Mapping Designer each recorded field becomes an Excel column or a fixed value. Company code, purchasing organization and account group are often fixed per template; name, street, city, postal code, country, tax numbers, bank data, reconciliation account, payment terms and order currency are columns. Check recording flags any screen the replay would leave without an OK-code and offers to add /00.
  3. One template per screen pattern. A recording replays the screens it saw. A different account group can show different fields, and extending an existing vendor skips the general data screens, so a create template and an extension template are two recordings.
  4. Keep keys as text. With external numbering the vendor number is a column, and a column formatted as a number drops leading zeros. Format it as text and switch on Leading Zeros for the field, with a target length where needed, so PostNow.ai pads the value before it is sent.
  5. Validate the sheet. Validate checks every cell offline: required fields, length, date format and allowed values, such as an allow-list of account groups or payment terms. While the sheet is filled, SAP Lookup (F4 help) on the ribbon lets the user pick valid values for the active cell from the connected SAP system. Whether a reconciliation account is valid in the company code is SAP's answer, and it comes when SAP processes the row.
  6. Debug a few vendors, then Simulate. Debug replays rows in the foreground in SAP GUI, every screen or only the screens with errors, so you watch three vendors go through before the file. Simulate plays every row's screens with the save removed and reports screen errors per row; the checks SAP makes at save come with Run.
  7. Run and read the Run Log. Run creates each vendor under the user's own SAP login and writes SAP's message, with user, time and system, to that row's Run Log. On success that is message F2 175, "Vendor … has been created for company code … purchasing organization …", which carries the new vendor number. Retry Failed re-posts only rows whose Run Log starts with ERROR. If someone clicks Run again on the same sheet, PostNow.ai first lists the rows already posted and offers Skip posted rows, Post again or Cancel.

Vendor master is where payment instructions live, so many teams want a second person to see new suppliers before they exist. An approval policy on the template holds the run until an approver has reviewed the rows in the PostNow.ai portal. The approval is tied to that exact data, so a sheet changed after approval needs approval again.

SAP vendor master automation from Excel: what it covers

PostNow.ai gives each vendor job its own template or report, from the first check to the record in SAP:

JobSAP transactionRoute in PostNow.ai
Find existing duplicates first–Report Library: Duplicate Master Data (Vendors) groups vendors by name, country and VAT number with a count
Create vendors centrallyXK01Recorded XK01 template, one row per vendor
Create accounting or purchasing data onlyFK01 / MK01A recording of that transaction, when one department owns the load
Extend to a new company code or purchasing organizationXK01 with the existing numberA second recording, without the general data screens
Check the resultXK03The Run Log per row; Vendor Master Purchasing 360 in the Report Library puts general, company code and purchasing organization data into Excel side by side (see the SAP vendor master report in Excel)
S/4HANA suppliersBPAPI mode with API_BUSINESS_PARTNER, or BAPI mode (see S/4HANA)

What stays with procurement and finance is the content: which supplier gets which account group, which reconciliation account and payment terms, and whether a suspected duplicate is a new vendor or an extension of an existing one. Settle that in the sheet; the run then puts it into SAP exactly as written.

XK01, FK01 and MK01: the three segments of a vendor

In a PostNow.ai XK01 template, one row carries all three segments of a vendor, because XK01 creates them in one save. SAP stores them apart, and each one serves a different department:

SegmentSAP tableExistsWhat it carriesMaintained alone in
General dataLFA1, bank lines in LFBKOnce per vendor in the clientName, address, search term, tax numbers, VAT registration number, bank detailsPart of FK01 and MK01
Company code dataLFB1Once per company codeReconciliation account, payment terms, payment methods, check for double invoices, dunningFK01 (accounting)
Purchasing dataLFM1Once per purchasing organizationOrder currency, purchasing payment terms, incoterms, GR-based invoice verificationMK01 (purchasing)

Make the vendor complete for its use. A vendor with general data only can be found in a search, but it cannot be paid or ordered from. Finance needs the company code segment to post an invoice and pay; purchasing needs the purchasing organization segment to order. A supplier that is only ever paid needs general and company code data; one you order from needs purchasing data too.

Count the segments before you build the sheet. Forty new suppliers for two company codes and one purchasing organization is 40 XK01 creations plus 40 company code extensions. The first company code comes with the creation; the second is a separate run with a separate recording (see extending existing vendors).

The fields an XK01 upload maps

PostNow.ai maps each field XK01 showed during the recording to a column or a fixed value. These carry the most weight in a vendor file:

FieldSAP fieldWhat to watch
Account groupLFA1-KTOKKSets number range and field status; usually fixed per template
Vendor numberLFA1-LIFNRBlank for internal numbering, a text column for external numbering
Name, search term, addressNAME1, SORTL, street, city, postal codeThe country key drives the address format and which region values are valid
Country, languageLAND1, SPRASUse SAP's keys, not country names. The language decides the language of the documents the supplier receives
Tax numbersSTCD1, STCD2, VAT STCEGSAP checks the format against the country; normalise spaces and prefixes before the run
Bank detailsLFBK: BANKS, BANKL, BANKN, BKONT, KOINHSee bank details
Reconciliation accountLFB1-AKONTA G/L account flagged as reconciliation account for vendors in that company code
Payment terms, payment methodsLFB1-ZTERM, LFB1-ZWELSThe terms key must exist; the payment methods must be defined for the company code's country
Check double invoicesLFB1-REPRFSet it in the template so every new vendor gets SAP's duplicate invoice check
Order currency, incotermsLFM1-WAERS, INCO1Order currency is required in the purchasing data and becomes the default currency of purchase orders
GR-based invoice verificationLFM1-WEBREDecides how MIRO matches this supplier's invoices

Reconciliation accounts are defined per company code, so a file spanning several company codes needs the value per row unless the chart of accounts really is that uniform. Which fields are required, optional or hidden depends on the account group's field status, which is why the next section comes before any recording.

Account groups: number range, field status and one-time vendors

In a PostNow.ai XK01 template the account group is usually a fixed value, one template per group, because the group decides what XK01 shows and the recording replays what it saw. Vendor account groups are configured in OBD3; the group controls:

  • The number range. The group is assigned to a number range (OBAS, intervals in XKN1), which is either internal or external. With internal numbering leave the number blank, or SAP answers F2 047; with external numbering the number is required (F2 037) and must fall in the interval.
  • Field status. Which fields are required, optional, hidden or display-only on each XK01 screen. A group that hides a field procurement needs means nobody can enter it until the configuration changes.
  • One-time vendors. A one-time account group keeps name and address on each document instead of the master record, so it is a different kind of vendor, not just a different number.

Changing a group later is limited. XK07 changes a vendor's account group, but SAP refuses the change when the new group would switch off field groups (KBA 1821643), and it stops a one-time vendor from moving to a normal group with WY 113 (KBA 3742028). The vendor number stays, so a number from the wrong range stays too. Confirm the group in the target client before the run, and create one test vendor per group in the quality client to see the number SAP assigns and the fields it shows.

Bank details in an XK01 upload

PostNow.ai maps the bank line from XK01's payment transactions screen like any other recorded field: bank country, bank key, account number, control key and account holder become columns of the vendor's row. SAP keeps each bank line in LFBK, keyed by vendor, bank country, bank key and account number; the IBAN is kept separately in TIBAN.

  • Create the banks first. Bank country and bank key point to SAP's bank master (table BNKA, transaction FI01). Load missing banks before the vendors, so XK01 does not stop to ask for a bank's own data on a screen the recording never saw.
  • Record one bank line. The bank details are a table on one screen, and a recording fills the lines it saw. One bank line per vendor is the common case and fits one template; suppliers with several accounts get their extra lines afterwards.
  • Agree the control first. Bank details are what a payment run pays to, so many companies keep them out of bulk creation and maintain them in a separate step with independent verification. If your SAP system defines bank fields as sensitive, a later change to them blocks the vendor for the automatic payment run until a second person confirms the change in FK08 or FK09.

An approval policy on the PostNow.ai template gives the same separation for the first load: procurement fills the sheet, an approver sees the bank data in the portal, and only then can the run start.

Duplicate prevention: screen on tax number and bank details

PostNow.ai's Report Library has a ready-made screen for existing duplicates: Duplicate Master Data (Vendors) groups the vendors in LFA1 by name, country and VAT registration number and counts them. Run it before a load, so the file is checked against what is already there.

A duplicate vendor is a valid record. SAP creates it without complaint, and the damage shows later: spend for one supplier split over two numbers, a payment block on one record and not the other, two open item accounts for one relationship. Once the duplicate has postings, deletion is blocked and merging becomes a project, so the screening has to happen before the run.

  • Tax or VAT registration number. The strongest signal. Two vendors with the same VAT number in the same country are almost always the same legal entity.
  • Bank account. Catches suppliers that were renamed or acquired, and a match deserves a person's review in any case.
  • Company registration number where you capture it, and the supplier's number in the source system.
  • Name plus postal code as a secondary signal only. The same company appears as Acme GmbH, ACME Gmbh and Acme G.m.b.H.; two different subsidiaries can share a name.

Screen the file against itself. A list merged from two sources can hold the same supplier twice. Neither row exists in SAP yet, so a check against SAP misses them; sort the sheet by tax number and look for repeats. A suspected duplicate is procurement's decision, and the answer is often to extend the existing vendor to the new company code instead of creating a second one.

Posting route: XK01 recording instead of BAPI_VENDOR_CREATE

PostNow.ai creates ECC vendors by replaying a recording of XK01, so every row goes through SAP's own vendor screens and checks; SAP's vendor create BAPI is built for dialog use, not for data from a file. The options look like this:

RouteWhat it takesFits
PostNow.ai recording of XK01 (or FK01 / MK01)Every field XK01 shows, from the Excel rowECC vendor creation and extension; SAP's screen checks apply to every row
BAPI_VENDOR_CREATENo vendor data. Its short text is "Create Vendor Master Online", and its interface has only export parameters (the new vendor's number, account group and company code, and RETURN); it opens XK01 for a person to key the recordInteractive use, not a file load
An RFC function your SAP team builds on class VMD_EI_APIThe vendor with its company code and purchasing data, as the developer designs the interfaceTeams that already maintain such a function; PostNow.ai finds it by name in BAPI search. Check in SE37 that it is remote-enabled.
LSMW with batch inputA flat file mapped to a recording or to SAP's standard vendor batch input program RFBIKR00One-off loads run by an SAP consultant inside SAP

The general trade-off between function modules and recordings is in BAPI vs BDC in SAP, and how to record a transaction so that it replays reliably is in the BDC recording guide.

Worked example: 30 new suppliers for company code 1010

PostNow.ai handles this with one published XK01 template. Procurement sends 30 new suppliers for company code 1010 and purchasing organization 1010. The account group is fixed in the template and uses internal numbering; reconciliation account, payment terms and order currency are columns.

  1. Screen first. Duplicate Master Data (Vendors) and a sort of the sheet by VAT number show two suppliers that already exist as vendors 100045 and 100212. Procurement confirms both are the same companies; those two rows move to the extension file, 28 remain.
  2. Validate. One row has "Germany" in the country column instead of DE, and one reconciliation account cell is empty. Both are fixed in the sheet; nothing has reached SAP yet.
  3. Debug three rows. The designer watches three vendors go through XK01 in the foreground: address, control data, bank line, accounting, payment and purchasing screens, all as recorded.
  4. Simulate. All 28 rows replay their screens with the save removed. Two rows stop: one on the control data screen, where SAP's check for the country rejects a VAT number that is one digit short, and one on the accounting information screen with F2 068, because its reconciliation account is not a vendor reconciliation account in company code 1010. Procurement corrects the VAT number and finance supplies the right account.
  5. Run. All 28 rows come back with F2 175 and their new vendor numbers. Had a row failed at save, Retry Failed would post that row alone after the fix.
  6. Hand back and prove one. The sheet goes back to procurement with the vendor number on every row. One new vendor opened in XK03 shows its general, company code and purchasing data as the sheet specified.

Extending existing vendors to a new company code or purchasing organization

PostNow.ai extends vendors with a separate recording, because extending a vendor shows different screens than creating one. In XK01 you enter the existing vendor number with the new company code or purchasing organization, and SAP asks only for the segments that are missing; FK01 does the same for a company code alone and MK01 for a purchasing organization alone.

  • Split creates from extensions. A create fails if the vendor exists; an extension fails if it does not. In one file, the two give contradictory errors on half the rows. The duplicate screen tells you which row belongs in which file.
  • The vendor number is a column. In the extension template the existing vendor number is mapped, kept as text with Leading Zeros, so 100045 reaches SAP as SAP stores it.
  • Extend after the first segment exists. A new company code segment needs the reconciliation account and payment terms that apply there, which may differ from the first company code.

Changing many existing vendors, rather than extending them, is a different job: SAP offers XK99 for mass maintenance, and the options are compared in SAP mass change.

Vendor master in S/4HANA: suppliers through Business Partner

PostNow.ai creates S/4HANA suppliers as Business Partners, in API mode with API_BUSINESS_PARTNER or in BAPI mode with BAPI_BUPA_CREATE_FROM_DATA or an RFC function built on SAP's customer/vendor integration, because on S/4HANA the vendor is a Business Partner with supplier roles. Call XK01 there and SAP redirects you to transaction BP with message MD_BP028, and SAP KBA 1951318 says batch input is not supported in BP. An XK01 recording therefore stays an ECC template.

Vendor dataSAP ECCSAP S/4HANA
General dataXK01, table LFA1Business Partner (BUT000); customer/vendor integration (CVI) keeps LFA1 in step
Company code dataXK01 or FK01, LFB1BP role FLVN00, LFB1
Purchasing dataXK01 or MK01, LFM1BP role FLVN01, LFM1

The supplier data in the sheet stays largely the same; it gains roles, a BP grouping and the partner category. Roles, grouping, CVI and the API and BAPI options are covered in SAP Business Partner mass upload, and loading existing vendors during a conversion in SAP master data migration.

XK01 upload errors and the fix

PostNow.ai writes SAP's message to each failed row's Run Log, so the fix starts from the message text. These are the ones a bulk XK01 run meets most:

MessageWhat it meansFix
F2 068 Account … is an invalid reconciliation account in company code …The G/L account is not flagged as reconciliation account for vendors in that company codeUse the vendor reconciliation account finance gives you for that company code; check it in FS00
F2 047 Account group … uses internal numbering assignments; leave number blankThe row has a vendor number, but the group's range is internalClear the number column, or use the template for the externally numbered group
F2 037 Acct group … uses ext. no. assignment. Specify an account numberThe group's range is external and the row has no numberFill the number from the agreed interval, as text
00 344 No batch input data for screen …SAP showed a screen the recording did not have: another account group's field status, an extension instead of a create, or a popupDebug the row to see the screen; move the row to the right template, or record a template for that pattern
MD_BP028 Redirecting to transaction BP, as transaction … is obsoleteThe template runs against an S/4HANA systemUse the Business Partner route (see S/4HANA)

A duplicate is the one problem SAP may not report at all: whether XK01 warns about an existing vendor depends on your system's configuration and country. Treat the screening before the run as the check, not a message during it.

Checklist before an XK01 mass upload

PostNow.ai's Validate, Debug and Simulate catch most problems on the sheet; these are the points a person settles first:

  • The account group per template is confirmed in the target client, with its numbering (internal or external) and interval.
  • The sheet was screened on tax number and bank details, against SAP and against itself, and procurement decided every suspected duplicate.
  • Creates and extensions are in separate files.
  • Every vendor has the segments its use needs: company code data to be paid, purchasing data to be ordered from.
  • Reconciliation account, payment terms and payment methods are valid for each company code on the sheet.
  • Country keys are SAP keys, tax numbers are normalised, and region is filled where the country needs it.
  • Banks exist in the bank master, and the company's control for bank data in bulk loads is agreed.
  • One test vendor per account group was created in the quality client and opened in XK03.
  • The number range has room for the whole file.

What to plan for in an XK01 mass upload

With PostNow.ai the run itself is the short part; plan the time around it:

  • Screening takes longest. Comparing a supplier list with a large vendor base and getting procurement's decisions is usually slower than the load. Do it once on the whole file, then split into creation runs.
  • Expect a second, smaller run. Held-back duplicates that become extensions, and rows that waited for a new bank or a corrected account, form a follow-up file.
  • Replay templates after an upgrade or a configuration change. A recording follows the screens; Debug a few rows after an upgrade or a field status change, and re-record a template whose screens changed.
  • Batch by account group or company code. Each batch then has one set of screens and one set of rules, and its errors look alike.
  • Tell accounts payable. AP meets new vendors first; a list of what was loaded and when turns a surprise into a handover.

What happens after the vendors exist

PostNow.ai's Run Log leaves the new vendor number on the row procurement sent, so the file that came in goes back with SAP's numbers in it. Then the vendors get used: purchase orders through ME21N mass upload, invoices with a purchase order through MIRO and without one through FB60.

When new suppliers arrive every week, the upload becomes one step of a standing process: a request form, checks and approval before the vendor exists. That process is described in supplier onboarding automation; this page's template is the step that creates the record.

Frequently asked questions

How do I mass upload vendors into SAP from Excel?
With PostNow.ai, record XK01 once, map each recorded field to an Excel column or a fixed value, and put one supplier per row: name, address, country, tax numbers, bank line, reconciliation account, payment terms and purchasing data. Validate checks the sheet offline, Debug and Simulate replay rows through XK01 first, and Run creates each vendor under your own SAP login and writes SAP's message with the new vendor number to the row. Screen the file for duplicates on tax number and bank details before the run.
What is XK01 in SAP?
XK01 is the SAP ECC transaction that creates a vendor master record centrally: general data (table LFA1), company code data (LFB1) and purchasing organization data (LFM1) in one transaction. XK02 changes a vendor and XK03 displays it. On S/4HANA, XK01 redirects to transaction BP.
Is there a standard BAPI to create vendors in SAP ECC?
SAP's standard vendor BAPI, BAPI_VENDOR_CREATE (short text Create Vendor Master Online), is built for dialog use: its interface has only export parameters (the new vendor's number, account group and company code, and RETURN), and it opens XK01 for a person to key the record. For a file load, PostNow.ai creates ECC vendors by replaying a recording of XK01, so SAP's own screen checks run on every row. If your developers have built an RFC-enabled function on class VMD_EI_API, PostNow.ai's BAPI search finds it by name and BAPI mode calls it with the vendor, company code and purchasing data from the sheet; check in SE37 that it is remote-enabled.
What is the difference between XK01, FK01 and MK01?
XK01 creates a vendor centrally with general, company code and purchasing data. FK01 is the accounting view: general data and company code data. MK01 is the purchasing view: general data and purchasing organization data. Each also extends an existing vendor to a new company code (FK01) or purchasing organization (MK01).
How are vendors created in S/4HANA?
As Business Partners with supplier roles: FLVN00 for company code data and FLVN01 for purchasing organization data. XK01 redirects to transaction BP (message MD_BP028), and SAP KBA 1951318 says batch input is not supported in BP, so PostNow.ai loads suppliers in API mode with API_BUSINESS_PARTNER, or in BAPI mode with BAPI_BUPA_CREATE_FROM_DATA or an RFC function built on SAP's customer/vendor integration. The SAP Business Partner mass upload guide compares the routes.
How do I extend an existing vendor to a new company code?
Enter the existing vendor number with the new company code in XK01, or use FK01 for the company code data alone; SAP asks only for the missing segment. In PostNow.ai this is a separate template, recorded on an extension, with the vendor number as a text column. Keep extensions and creates in separate files.
What does SAP vendor master automation from Excel cover?
In PostNow.ai it covers the duplicate screen before the load (the Duplicate Master Data (Vendors) report), creating vendors with a recorded XK01 template, accounting-only or purchasing-only loads with FK01 or MK01, extensions to new company codes and purchasing organizations, and the check afterwards with the Run Log and the Vendor Master Purchasing 360 report. On S/4HANA it covers suppliers as Business Partners.
How do I prevent duplicate vendors in a mass upload?
Screen on identity fields, not names: tax or VAT registration number first, then bank account and company registration number. Check the file against SAP and against itself, because a merged list can hold the same supplier twice. PostNow.ai's Duplicate Master Data (Vendors) report groups existing vendors by name, country and VAT number with a count.
Your supplier list. SAP's vendor rules.

Run your next SAP vendor master upload from Excel

Record XK01 once, screen the list for duplicates, watch the first vendors in Debug, then create the rest in one run.

Start free trial
  • 14-day free trial
  • SAP ECC, and S/4HANA through Business Partner
  • Posts under your own SAP login