SD Program Custom development Interface

Fleet Vehicle Trip, Fuel and Driver Allowance Tracking Program

Short answer: A custom program for companies running their own fleet that imports the fuel card statement into SAP, matches each transaction to a vehicle by plate or card number, takes trips from shipment documents and calculates the driver travel allowance. Kilometres, litres, consumption per 100 km and cost per km appear per vehicle in one list, and fuel and allowance costs are posted to the vehicle's cost object.

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

Why is the standard not enough?

Fleet management in plant maintenance keeps vehicle data and measuring points, and odometer and fuel readings are entered one by one with IK11; there is no import that reads the fuel card statement. Driver allowances are tracked separately in PR05 travel expenses or in accounting and are not linked to the vehicle or the trip. As a result, total cost and consumption per vehicle can only be seen by combining data in Excel.

Who uses it? Fleet and logistics managers, shipment planners, expense accounting and cost control teams.

Closest standard alternatives

  • IK11 Create Measurement Document. Enters odometer and fuel readings one by one as measurement documents; no statement import or cost posting.
  • PR05 Travel Expense Manager. Keeps driver travel expenses; does not link them to the vehicle or the trip.

Tables used

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

TableRoleAccessSystem
FLEETFleet AttributesFleet object: plate, fuel card number, fuel typeReadECC + S/4
EQUIEquipment Master DataVehicle equipment and object numberReadECC + S/4
IMPTTMeasuring PointOdometer and fuel measuring points of the vehicleReadECC + S/4
IMRGMeasurement DocumentCheck of the last counter reading; new odometer and fuel readings are written as measurement documentsRead / writeECC + S/4
VTTKShipment HeaderShipments counted as trips: dates, route, plateReadECC + S/4
VTPAShipping PartnerDriver on the shipment (partner with personnel number)ReadECC + S/4
PA0001HR Master Record: Infotype 0001 (Organizational Assignment)Driver's company code and cost centerReadECC + S/4
AUFKOrder Master DataMaintenance or internal order collecting the vehicle's costsReadECC + S/4
BKPFAccounting Document HeaderAccounting documents created for fuel and allowanceWriteECC + S/4

BAPIs and functions used

  • BAPI_ACC_DOCUMENT_CHECKAccounting: Check Document. Checks the posting in test mode
  • BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts the fuel invoice and the allowance to the vehicle's cost object
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Commits the posting

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEFuel card statement (CSV or XLSX)Single value—YesC:\temp\yakit_2026_10.xlsx
P_BUKRSCompany codeSingle valueBKPF-BUKRSYes1000
P_LIFNRFuel company vendor accountSingle valueLFA1-LIFNRYes100780
S_IDATETrip and fuel periodRange / multipleIMRG-IDATEYes01.10.2026 – 31.10.2026
P_ALLOWAlso calculate and post the driver allowanceCheckbox—NoX
P_TESTTest mode (check without posting)Checkbox—NoX

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Card numberFLEET-CARD_NUMNo
2PlateFLEET-LICENSE_NUMYes
3Transaction dateIMRG-IDATEYes
4Transaction timeIMRG-ITIMENo
5OdometerIMRG-CNTRRNo
6LitresIMRG-RECDVYes
7AmountBSEG-WRBTRYes
8CurrencyBKPF-WAERSYes
9StationBSEG-SGTXTNo

Sample upload file

1Card numberPlate *Transaction date *Transaction timeOdometerLitres *Amount *Currency *Station
27083 **** **** 114234 ABC 12810/03/202607:42184,520412.5018,975TRYGebze Otoyol
37083 **** **** 118734 ABD 45510/03/202618:1092,3101868,556TRYBursa Çevreyolu
47083 **** **** 114234 ABC 12810/06/202606:55185,870398.2018,317.20TRYİzmir Kemalpaşa
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1PlateFLEET-LICENSE_NUM
2VehicleEQUI-EQUNR
3TripsCalculated VTTK records carrying the vehicle's plate in the period
4KilometresCalculated Last IMRG-CNTRR − counter at period start
5Fuel (l)Calculated Σ litres in the file
6Fuel amountCalculated Σ amount in the file
7Consumption per 100 km (l)Calculated Fuel (l) / kilometres × 100
8Cost per kmCalculated (Fuel amount + allowance) / kilometres
9AllowanceCalculated Trip days × daily amount
10StatusCalculated Posted, warning, test OK or error

Sample result list

PlateVehicleTripsKilometresFuel (l)Fuel amountConsumption per 100 km (l)Cost per kmAllowanceStatus
34 ABC 1281000421196,8402,210.40101,68432.3016.9214,000Posted
34 ABD 4551000421263,9201,01446,64425.9014.229,100Posted
34 ABE 7021000421542,150912.6041,979.6042.4022.857,150Warning
34 ABF 01901205,520Error
A view built with fictional sample data; not real system data.

How does the program work?

  1. The fuel card provider’s statement (CSV or XLSX) is read; the provider’s column layout is mapped during installation. Each row is linked to a vehicle (EQUI) by card number (FLEET-CARD_NUM) or plate (FLEET-LICENSE_NUM); unmatched rows go to the error list.
  2. The vehicle’s odometer and fuel measuring points are found in IMPTT. If the odometer value in the file is lower than the last reading (IMRG), or the consumption between two fill-ups is outside the defined limit, the row gets a warning; valid readings are recorded as measurement documents.
  3. Trips are read from the shipment documents (VTTK) that carry the vehicle’s plate in the period; the field holding the plate is set during installation. The driver comes from the partner role with a personnel number on the shipment (VTPA).
  4. The allowance is calculated as trip days × the daily amount defined during installation; domestic and international trips use different amounts. The driver’s cost center comes from PA0001.
  5. Posting: fuel spend is posted with BAPI_ACC_DOCUMENT_POST as a credit to the fuel company’s vendor account and a debit to the vehicle’s maintenance order (AUFK) or cost center. The allowance is written to the driver’s employee vendor account in a separate document. In test mode only BAPI_ACC_DOCUMENT_CHECK runs.
  6. Report per vehicle: number of trips, kilometres, litres, fuel amount, consumption per 100 km, cost per km and allowance. Vehicles whose consumption deviates clearly from the vehicle type average are flagged.

Performance notes

Read FLEET and EQUI once with the plates and card numbers from the file. Take only the most recent IMRG record per measuring point for the last counter readings. Post accounting entries totalled per vehicle and day; do not create a separate document for every fuel receipt.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file Statement rows that cannot be matched to a vehicle can be downloaded for correction.
  • Runs as a background job When the provider drops the statement into a server folder, a weekly job processes it automatically.
  • ALV list (sort, filter, subtotals)

Authorization objects

  • I_SWERKVehicle and measurement document authorization by maintenance plant
  • F_BKPF_BUKAccounting posting authorization by company code
  • F_BKPF_KOAPosting authorization for vendor and expense account types
  • P_ORGINAuthorization to read the driver's organizational assignment

Frequently asked questions

Can statements from different fuel card companies be read?

Yes. Each provider's column layout is defined as a separate mapping during installation; the same program reads statements from several providers and combines the results in the same vehicle list.

Where do the daily allowance amounts come from?

The amounts are kept in a table defined during installation, split into domestic and international, and updated by HR or finance. Regulation-dependent values such as tax-exempt limits are not published here; they are checked against current rules during installation.

We use the travel expense module; can the allowance go there instead?

Yes. Instead of posting directly to accounting, the allowance can be created as a trip for the driver, so approval and payment continue through the existing travel process.

Related reports

PM Report Custom ALV report

Maintenance Cost and Downtime by Equipment Report

A custom ALV report that splits the actual cost of maintenance orders per equipment in a period into labor, material, external services and other, and …

AFIH · AUFK · COEP · QMIH

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: Fleet Vehicle Trip, Fuel and Driver Allowance Tracking Program