# Fleet Vehicle Trip, Fuel and Driver Allowance Tracking Program

> 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.

- Type: Program, Custom development, Interface
- Module: SD
- Estimated effort: M (8–10 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/fleet-vehicle-trip-fuel-and-driver-allowance-tracking/


## 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.

### Closest standard alternatives

- IK11: Enters odometer and fuel readings one by one as measurement documents; no statement import or cost posting.
- PR05: Keeps driver travel expenses; does not link them to the vehicle or the trip.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| FLEET | Fleet object: plate, fuel card number, fuel type | Read | - | ECC + S/4 |
| EQUI | Vehicle equipment and object number | Read | EQUI-OBJNR = FLEET-OBJNR | ECC + S/4 |
| IMPTT | Odometer and fuel measuring points of the vehicle | Read | IMPTT-MPOBJ = EQUI-OBJNR | ECC + S/4 |
| IMRG | Check of the last counter reading; new odometer and fuel readings are written as measurement documents | Read / write | IMRG-POINT = IMPTT-POINT | ECC + S/4 |
| VTTK | Shipments counted as trips: dates, route, plate | Read | - | ECC + S/4 |
| VTPA | Driver on the shipment (partner with personnel number) | Read | VTPA-VBELN = VTTK-TKNUM | ECC + S/4 |
| PA0001 | Driver's company code and cost center | Read | PA0001-PERNR = VTPA-PERNR | ECC + S/4 |
| AUFK | Maintenance or internal order collecting the vehicle's costs | Read | - | ECC + S/4 |
| BKPF | Accounting documents created for fuel and allowance | Write | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_ACC_DOCUMENT_CHECK: Checks the posting in test mode
- BAPI_ACC_DOCUMENT_POST: Posts the fuel invoice and the allowance to the vehicle's cost object
- BAPI_TRANSACTION_COMMIT: Commits the posting

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_FILE | Fuel card statement (CSV or XLSX) | Single value | - | Yes |
| P_BUKRS | Company code | Single value | BKPF-BUKRS | Yes |
| P_LIFNR | Fuel company vendor account | Single value | LFA1-LIFNR | Yes |
| S_IDATE | Trip and fuel period | Range / multiple | IMRG-IDATE | Yes |
| P_ALLOW | Also calculate and post the driver allowance | Checkbox | - | No |
| P_TEST | Test mode (check without posting) | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Card number | FLEET-CARD_NUM | No |
| Plate | FLEET-LICENSE_NUM | Yes |
| Transaction date | IMRG-IDATE | Yes |
| Transaction time | IMRG-ITIME | No |
| Odometer | IMRG-CNTRR | No |
| Litres | IMRG-RECDV | Yes |
| Amount | BSEG-WRBTR | Yes |
| Currency | BKPF-WAERS | Yes |
| Station | BSEG-SGTXT | No |

## Result list columns

| Column | Source |
|---|---|
| Plate | FLEET-LICENSE_NUM |
| Vehicle | EQUI-EQUNR |
| Trips | Calculated: VTTK records carrying the vehicle's plate in the period |
| Kilometres | Calculated: Last IMRG-CNTRR − counter at period start |
| Fuel (l) | Calculated: Σ litres in the file |
| Fuel amount | Calculated: Σ amount in the file |
| Consumption per 100 km (l) | Calculated: Fuel (l) / kilometres × 100 |
| Cost per km | Calculated: (Fuel amount + allowance) / kilometres |
| Allowance | Calculated: Trip days × daily amount |
| Status | Calculated: Posted, warning, test OK or error |

## 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.

## Authorization objects

- I_SWERK: Vehicle and measurement document authorization by maintenance plant
- F_BKPF_BUK: Accounting posting authorization by company code
- F_BKPF_KOA: Posting authorization for vendor and expense account types
- P_ORGIN: Authorization 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.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=fleet-fuel-trip-tracking
