Mass Asset Retirement Upload from Excel (Scrapping and Sale)
Short answer: A custom program that retires fixed assets in bulk from an Excel list, either by scrapping or with sales revenue. It supports full and partial retirement, checks everything in test mode first, then lists the document number and message for every row.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 3
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
ABAVN (scrapping) and F-92 (sale to customer) work on one asset at a time. After a physical inventory or a plant closure, hundreds of assets are entered screen by screen. The standard mass scrapping function offers limited selection and does not take sales revenue or a partial percentage from a file.
Who uses it? Fixed asset accountants and finance teams that retire hundreds of assets after a physical inventory or at year-end close.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| ANLAAsset Master Record | Asset existence, capitalization and deactivation check | Read | ECC + S/4 |
| ANLCAsset Value Fields | Current cost for the partial retirement check | Read | ECC + S/4 |
| ANEPAsset Line Items | Retirement transactions (written through the BAPI) | Write | ECC + S/4 |
S/4HANA notes
- ANLC → ACDOCA: In S/4HANA new asset accounting the actual values are kept in ACDOCA; ANLC is only read through the compatibility view FAAV_ANLC.
- ANEP → ACDOCA: In S/4HANA new asset accounting asset transactions are written to ACDOCA; ANEP is read through the compatibility view FAAV_ANEP.
BAPIs and functions used
- BAPI_ASSET_RETIREMENT_POSTPost Asset Retirement. Posts the asset retirement by scrapping or sale for each row
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful rows permanently
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back the change in test mode and for failed rows
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Upload file (XLSX or CSV) | Single value | — | Yes | C:\temp\varlik_cikis.xlsx |
| P_BUDAT | Posting date | Single value | BKPF-BUDAT | Yes | 30.11.2026 |
| P_TEST | Test mode (check without posting) | Checkbox | — | No | X |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Company code | ANLA-BUKRS | Yes |
| 2 | Asset | ANLA-ANLN1 | Yes |
| 3 | Sub-number | ANLA-ANLN2 | No |
| 4 | Asset value date | ANEP-BZDAT | Yes |
| 5 | Transaction type | ANEP-BWASL | Yes |
| 6 | Partial retirement amount | ANEP-ANBTR | No |
| 7 | Partial retirement percentage | By rule When the amount is blank, this percentage of the current cost is retired; full retirement when both are blank | No |
| 8 | Sales revenue | By rule Passed to the BAPI as a retirement with revenue when filled, as scrapping when blank | No |
| 9 | Text | BSEG-SGTXT | No |
Sample upload file
| 1 | Company code * | Asset * | Sub-number | Asset value date * | Transaction type * | Partial retirement amount | Partial retirement percentage | Sales revenue | Text |
|---|---|---|---|---|---|---|---|---|---|
| 2 | 1000 | 400008 | 0 | 11/30/2026 | 210 | Not found in inventory | |||
| 3 | 1000 | 300047 | 0 | 11/30/2026 | 210 | 215,000 | 180,000 | Sale of lathe component | |
| 4 | 1000 | 500021 | 1 | 11/30/2026 | 210 | 50 | Half scrapped |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Company code | ANLA-BUKRS |
| 3 | Asset | ANLA-ANLN1 |
| 4 | Sub-number | ANLA-ANLN2 |
| 5 | Asset description | ANLA-TXT50 |
| 6 | Retired cost | Calculated Current cost from ANLC for a full retirement; by amount or percentage for a partial one |
| 7 | Status | Calculated From the BAPI return messages: posted, test OK or error |
| 8 | Document | Calculated Accounting document number returned by the BAPI |
| 9 | Message | Calculated First error or success message from the BAPI return table |
Sample result list
| Row | Company code | Asset | Sub-number | Asset description | Retired cost | Status | Document | Message |
|---|---|---|---|---|---|---|---|---|
| 2 | 1000 | 400008 | 0 | Forklift 3 t | 540,000 | Posted | 0100002871 | Asset retirement posted |
| 3 | 1000 | 300047 | 0 | CNC lathe | 215,000 | Posted | 0100002872 | Asset retirement posted |
| 4 | 1000 | 500021 | 1 | Server upgrade | 155,000 | Error | Value date is before the last closed period |
How does the program work?
- The file is read; company code, asset, sub-number, value date and transaction type are mandatory on every row.
- The asset is checked in ANLA: it must exist, be capitalized (AKTIV filled) and not already be fully retired (DEAKT blank).
- For a partial retirement the amount or percentage is compared with the current cost in ANLC; a row above the cost is rejected.
- The row is mapped to the BAPI_ASSET_RETIREMENT_POST structure: retirement with revenue when revenue is given, scrapping otherwise. In test mode the BAPI is called and rolled back with BAPI_TRANSACTION_ROLLBACK.
- In a real run BAPI_TRANSACTION_COMMIT is called after each successful row; the asset transactions are written to ANEP, and the document number and messages are listed per row.
Performance notes
Run files above a few hundred rows as a background job. Commits are made per row, so a lock or error on one asset does not stop the others. Because the same assets may be locked during the depreciation run, schedule the program after the period-end depreciation job.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Failed rows are downloaded to a separate file to be fixed and uploaded again.
- Runs as a background job
Authorization objects
- A_B_ANLKLAsset posting authorization by company code and asset class
- A_B_BWARTPosting authorization by transaction type group
- F_BKPF_BUKAccounting document authorization by company code
Frequently asked questions
How is depreciation handled on retirement?
The program posts the retirement with the standard BAPI; the pro-rata depreciation for the year of retirement and the gain or loss are generated automatically by SAP asset accounting rules.
Can sales invoiced to a customer be uploaded as well?
The program covers retirement with revenue posted to a clearing account. If the customer invoice is issued separately, or the sale must go through a customer account as in F-92, that flow is designed as additional scope.
Can a retirement uploaded by mistake be reversed?
Yes, the resulting document is reversed with AB08. Because the program lists the document number, the reversal is easy to find.
Related reports
Fixed Asset Register with Book and Tax Depreciation Report
A custom ALV report that shows every fixed asset on one row with acquisition cost, accumulated depreciation, depreciation of the year and net book …
Mass G/L Journal Entry Upload from Excel
A custom program that posts multi-line G/L documents (accruals, reclassifications, allocation entries) in bulk from Excel or CSV rows. It checks every …
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.