FI Program Custom development Mass upload

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

  • ABAVN Asset Retirement by Scrapping. Scraps one asset at a time on screen.
  • F-92 Asset Retirement from Sale with Customer. Posts a retirement with sale to a customer for one asset at a time.

Tables used

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

TableRoleAccessSystem
ANLAAsset Master RecordAsset existence, capitalization and deactivation checkReadECC + S/4
ANLCAsset Value FieldsCurrent cost for the partial retirement checkReadECC + S/4
ANEPAsset Line ItemsRetirement transactions (written through the BAPI)WriteECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEUpload file (XLSX or CSV)Single value—YesC:\temp\varlik_cikis.xlsx
P_BUDATPosting dateSingle valueBKPF-BUDATYes30.11.2026
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
1Company codeANLA-BUKRSYes
2AssetANLA-ANLN1Yes
3Sub-numberANLA-ANLN2No
4Asset value dateANEP-BZDATYes
5Transaction typeANEP-BWASLYes
6Partial retirement amountANEP-ANBTRNo
7Partial retirement percentageBy rule When the amount is blank, this percentage of the current cost is retired; full retirement when both are blankNo
8Sales revenueBy rule Passed to the BAPI as a retirement with revenue when filled, as scrapping when blankNo
9TextBSEG-SGTXTNo

Sample upload file

1Company code *Asset *Sub-numberAsset value date *Transaction type *Partial retirement amountPartial retirement percentageSales revenueText
21000400008011/30/2026210Not found in inventory
31000300047011/30/2026210215,000180,000Sale of lathe component
41000500021111/30/202621050Half scrapped
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Company codeANLA-BUKRS
3AssetANLA-ANLN1
4Sub-numberANLA-ANLN2
5Asset descriptionANLA-TXT50
6Retired costCalculated Current cost from ANLC for a full retirement; by amount or percentage for a partial one
7StatusCalculated From the BAPI return messages: posted, test OK or error
8DocumentCalculated Accounting document number returned by the BAPI
9MessageCalculated First error or success message from the BAPI return table

Sample result list

RowCompany codeAssetSub-numberAsset descriptionRetired costStatusDocumentMessage
210004000080Forklift 3 t540,000Posted0100002871Asset retirement posted
310003000470CNC lathe215,000Posted0100002872Asset retirement posted
410005000211Server upgrade155,000ErrorValue date is before the last closed period
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file is read; company code, asset, sub-number, value date and transaction type are mandatory on every row.
  2. The asset is checked in ANLA: it must exist, be capitalized (AKTIV filled) and not already be fully retired (DEAKT blank).
  3. For a partial retirement the amount or percentage is compared with the current cost in ANLC; a row above the cost is rejected.
  4. 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.
  5. 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

FI Program Custom Mass upload

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 …

BKPF · BSEG · SKB1 · CSKS

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: Mass Asset Retirement Upload from Excel (Scrapping and Sale)