FI Program Custom development Interface

Automatic Posting of Utility, Telecom and Fuel e-Invoices with Account and Cost Center Determination

Short answer: A program that distributes the monthly electricity, gas, water, telecom and fuel e-invoices to the right G/L account and cost center by rules based on the supplier tax number, subscriber or installation number and vehicle plate, and posts them as vendor invoices. The non-deductible expense split for passenger cars, rounding and discount lines are also handled automatically by rule.

Estimated effort
L · 10–15 working days
System
ECC and S/4HANA
Tables
9
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

FB60 and FB10 enter the invoice by hand; e-invoice integration solutions bring the invoice into SAP but do not know which account and cost center the lines belong to. For hundreds of subscriptions and vehicles the same distribution is done by hand every month, the non-deductible share for passenger cars is calculated as a separate line and small rounding differences are a nuisance. FBD1 recurring entries do not suit invoices whose amounts change.

Who uses it? Accounts payable teams, general ledger, facilities and fleet management owners.

Closest standard alternatives

  • FB60 Enter Incoming Invoices. Enters the vendor invoice by hand; no distribution rules by subscriber or plate.
  • FB10 Invoice/Credit Memo Fast Entry. Offers fast invoice entry; the user still chooses the account and cost center.
  • FBD1 Enter Recurring Entry. Sets up recurring entries with fixed amounts; does not suit invoices whose amounts change.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
LFA1Vendor Master (General Section)Vendor account from the supplier tax numberReadECC + S/4
LFB1Vendor Master (Company Code)Vendor company code data and reconciliation accountReadECC + S/4
DFKKBPTAXNUMTax Numbers for Business PartnerBusiness partner tax numbers (S/4HANA)ReadS/4HANA only
SKB1G/L Account Master (Company Code)Expense account open for postingReadECC + S/4
CSKSCost Center Master RecordCost center validityReadECC + S/4
T007ATax CodesTax code checkReadECC + S/4
BKPFAccounting Document HeaderVendor invoice document; duplicate reference checkRead / writeECC + S/4
BSEGAccounting Document SegmentDistributed expense, non-deductible expense and tax linesWriteECC + S/4
ACDOCAUniversal Journal Entry Line ItemsJournal entry lines (S/4HANA)WriteS/4HANA only

BAPIs and functions used

  • FI_DUPLICATE_INVOICE_CHECKDuplicate Invoice Check for Vendor Invoices. Blocks duplicate invoices
  • BAPI_ACC_DOCUMENT_CHECKAccounting: Check Document. Checks the document without posting
  • BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts the vendor invoice
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful documents
  • CALCULATE_TAX_FROM_GROSSAMOUNTCalculate Tax from Gross Amount. Checks the tax amount from gross lines

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_BUKRSCompany codeRange / multipleBKPF-BUKRSYes1000
S_LIFNRSupplierRange / multipleLFA1-LIFNRNo—
S_BLDATInvoice dateRange / multipleBKPF-BLDATNo01.11.2026 – 30.11.2026
P_BUDATPosting dateSingle valueBKPF-BUDATYes30.11.2026
P_PARKPark and send for approval instead of postingCheckbox—No—
P_TESTTest modeCheckbox—NoX

Result list columns

#ColumnSource
1SupplierLFA1-LIFNR
2Supplier nameLFA1-NAME1
3Invoice numberBKPF-XBLNR
4Subscriber / plateCalculated Subscriber, installation number or plate on the invoice
5G/L accountBSEG-HKONT
6Cost centerBSEG-KOSTL
7AmountBSEG-WRBTR
8Non-deductibleCalculated Amount split with the rule rate on passenger car lines
9Change vs previous monthCalculated (This month − last month) / last month
10DocumentBKPF-BELNR
11StatusCalculated Posted, parked, rule pending, duplicate or error

Sample result list

SupplierSupplier nameInvoice numberSubscriber / plateG/L accountCost centerAmountNon-deductibleChange vs previous monthDocumentStatus
700501Örnek Elektrik Perakende A.Ş.OEP20260001187344000873312770100110084,25004 %5100004412Posted
700610Demo Akaryakıt Ltd.DAL202600004512034 ABC 123770300230018,6405,592-2 %5100004413Posted
700722Örnek Telekom A.Ş.OTK202600099021155500011222,3500Rule pending
A view built with fictional sample data; not real system data.

How does the program work?

  1. Invoices from the e-invoice integration are read: supplier tax number, invoice number and date, lines, taxes and the subscriber/installation number or plate on the invoice. The vendor account is found by the supplier tax number (LFA1-STCD1/STCD2 in ECC, business partner tax numbers DFKKBPTAXNUM in S/4HANA).
  2. The rule table is checked: supplier + subscriber/installation number → G/L account and cost center; supplier + plate → vehicle cost center and vehicle type (passenger/commercial). An invoice without a rule goes to the ‘rule pending’ list, and a rule defined once is used in later months.
  3. For passenger cars the non-deductible share is split to a separate expense account with the rate in the rule table; the rate and scope are entered during installation according to current regulation, the program has no fixed value. Rounding and discount lines are written to defined accounts.
  4. Checks that the G/L account is open for posting (SKB1), the cost center is valid (CSKS) and the tax code (T007A) fits; duplicate invoices are blocked with FI_DUPLICATE_INVOICE_CHECK.
  5. The document is checked with BAPI_ACC_DOCUMENT_CHECK and posted as a vendor invoice with BAPI_ACC_DOCUMENT_POST (BKPF, BSEG; ACDOCA in S/4HANA). Optionally it is parked first and sent to the invoice approval workflow.
  6. The result list shows supplier, subscriber/plate, distributed accounts, non-deductible amount and document number; a monthly comparison flags subscriptions whose amount rose clearly compared with the previous month.

Performance notes

Load the rule table once per supplier. For invoices with hundreds of lines such as fuel invoices, summarize the plate lines by cost center and account to reduce the number of document lines.

Features

  • Test mode (check without posting)
  • ALV list (sort, filter, subtotals)
  • Line-by-line result and error log
  • Runs as a background job Incoming e-invoices are processed automatically every day.
  • Send the result by email Invoices waiting for a rule are notified to the owner.

Authorization objects

  • F_BKPF_BUKPosting authorization for the company code
  • F_BKPF_KOAAuthorization to post vendor and G/L items
  • K_CSKSAuthorization to read cost center master data

Frequently asked questions

How is fuel distributed if the plate is not on the invoice?

If a vehicle ID system or card number is on the invoice, the rule is set up with the card number. If there is no distinguishing data, the invoice is posted to a default cost center and a distribution list can be uploaded separately.

What if the non-deductible rate changes?

The rate is kept in the rule table with a valid-from date; the new rate is entered from the relevant date and past invoices are not affected. The program contains no legal rate; the finance team maintains it according to current regulation.

Related reports

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.

Related report: Automatic Posting of Utility, Telecom and Fuel e-Invoices with Account and Cost Center Determination