{"audience":"Fixed asset accountants and finance teams that retire hundreds of assets after a physical inventory or at year-end close.","authorization_objects":[{"note":"Asset posting authorization by company code and asset class","object":"A_B_ANLKL"},{"note":"Posting authorization by transaction type group","object":"A_B_BWART"},{"note":"Accounting document authorization by company code","object":"F_BKPF_BUK"}],"components":[],"countries":[],"effort_days_max":6,"effort_days_min":4,"effort_size":"M","faq":[{"a":"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.","q":"How is depreciation handled on retirement?"},{"a":"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.","q":"Can sales invoiced to a customer be uploaded as well?"},{"a":"Yes, the resulting document is reversed with AB08. Because the program lists the document number, the reversal is easy to find.","q":"Can a retirement uploaded by mistake be reversed?"}],"features":[{"code":"test_run","label":"Test mode (check without posting)","note":""},{"code":"log","label":"Line-by-line result and error log","note":""},{"code":"error_file","label":"Download failed lines as a separate file","note":"Failed rows are downloaded to a separate file to be fixed and uploaded again."},{"code":"background","label":"Runs as a background job","note":""}],"functions":[{"name":"BAPI_ASSET_RETIREMENT_POST","role":"Posts the asset retirement by scrapping or sale for each row"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Saves successful rows permanently"},{"name":"BAPI_TRANSACTION_ROLLBACK","role":"Rolls back the change in test mode and for failed rows"}],"gap":"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.","id":"fi-asset-retirement-upload","industries":[],"input_columns":[{"derived":false,"label":"Company code","required":true,"rule":"","target_field":"BUKRS","target_table":"ANLA"},{"derived":false,"label":"Asset","required":true,"rule":"","target_field":"ANLN1","target_table":"ANLA"},{"derived":false,"label":"Sub-number","required":false,"rule":"","target_field":"ANLN2","target_table":"ANLA"},{"derived":false,"label":"Asset value date","required":true,"rule":"","target_field":"BZDAT","target_table":"ANEP"},{"derived":false,"label":"Transaction type","required":true,"rule":"","target_field":"BWASL","target_table":"ANEP"},{"derived":false,"label":"Partial retirement amount","required":false,"rule":"","target_field":"ANBTR","target_table":"ANEP"},{"derived":true,"label":"Partial retirement percentage","required":false,"rule":"When the amount is blank, this percentage of the current cost is retired; full retirement when both are blank","target_field":null,"target_table":null},{"derived":true,"label":"Sales revenue","required":false,"rule":"Passed to the BAPI as a retirement with revenue when filled, as scrapping when blank","target_field":null,"target_table":null},{"derived":false,"label":"Text","required":false,"rule":"","target_field":"SGTXT","target_table":"BSEG"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The file is read; company code, asset, sub-number, value date and transaction type are mandatory on every row.\n2. The asset is checked in ANLA: it must exist, be capitalized (AKTIV filled) and not already be fully retired (DEAKT blank).\n3. For a partial retirement the amount or percentage is compared with the current cost in ANLC; a row above the cost is rejected.\n4. 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.\n5. 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.","module":"FI","object_type":"upload","output_columns":[{"calculated":true,"formula":"Row number in the file","label":"Row","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Company code","source_field":"BUKRS","source_table":"ANLA"},{"calculated":false,"formula":"","label":"Asset","source_field":"ANLN1","source_table":"ANLA"},{"calculated":false,"formula":"","label":"Sub-number","source_field":"ANLN2","source_table":"ANLA"},{"calculated":false,"formula":"","label":"Asset description","source_field":"TXT50","source_table":"ANLA"},{"calculated":true,"formula":"Current cost from ANLC for a full retirement; by amount or percentage for a partial one","label":"Retired cost","source_field":null,"source_table":null},{"calculated":true,"formula":"From the BAPI return messages: posted, test OK or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"Accounting document number returned by the BAPI","label":"Document","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or success message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"C:\\temp\\varlik_cikis.xlsx","kind":"parameter","label":"Upload file (XLSX or CSV)","name":"P_FILE","ref_field":"","required":true},{"example":"30.11.2026","kind":"parameter","label":"Posting date","name":"P_BUDAT","ref_field":"BKPF-BUDAT","required":true},{"example":"X","kind":"checkbox","label":"Test mode (check without posting)","name":"P_TEST","ref_field":"","required":false}],"part_of":[],"performance":"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.","process":"R2R","quote_url":"https://nekuhub.com/en/request-a-quote/?report=fi-asset-retirement-upload","related":["fi-asset-register-depreciation-areas","fi-gl-journal-entry-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Scraps one asset at a time on screen.","tcode":"ABAVN"},{"note":"Posts a retirement with sale to a customer for one asset at a time.","tcode":"F-92"}],"summary":"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.","tables":[{"access":"read","join_on":"ANLA-BUKRS, ANLA-ANLN1, ANLA-ANLN2 = dosyadaki varlık","role":"Asset existence, capitalization and deactivation check","table":"ANLA","variant":"both"},{"access":"read","join_on":"ANLC-BUKRS = ANLA-BUKRS AND ANLC-ANLN1 = ANLA-ANLN1 AND ANLC-ANLN2 = ANLA-ANLN2 AND ANLC-AFABE = '01'","role":"Current cost for the partial retirement check","table":"ANLC","variant":"both"},{"access":"write","join_on":"ANEP-BUKRS = ANLA-BUKRS AND ANEP-ANLN1 = ANLA-ANLN1 AND ANEP-ANLN2 = ANLA-ANLN2","role":"Retirement transactions (written through the BAPI)","table":"ANEP","variant":"both"}],"title":"Mass Asset Retirement Upload from Excel (Scrapping and Sale)","url":"https://nekuhub.com/en/programs/mass-asset-retirement-upload-from-excel/","vendor_id":"nekudos"}