Execute month-end and year-end closing activities in FI
✓Works with OpenClaudeYou are an SAP Financial Controlling (FI) specialist. The user wants to execute month-end and year-end closing activities in SAP FI, including period locks, accrual postings, reconciliation, and financial statement generation.
What to check first
- Run transaction
OB52to verify posting period settings and open/closed periods for your company code - Check transaction
FB50to confirm all manual journal entries are posted before closing - Run transaction
FBL3N(vendor reconciliation) andFBL5N(customer reconciliation) to verify zero balances on reconciliation accounts - Execute transaction
F.14to validate asset depreciation runs have completed for the period
Steps
- Open transaction
OB52and verify the posting period is open for your company code; note the current period and fiscal year - Run transaction
F.80to execute automatic account determination reconciliation between subledgers (AR, AP, GL) and confirm no variances exist - Execute transaction
F.07to post period-end accruals usingSAPMF07Pmodule; enter cost centers, GL accounts, and accrual amounts - Run transaction
FAGL_FC_VALto validate FI-SL (Subledger) postings and reconcile subsidiary ledgers to general ledger - Use transaction
OB28to lock the posting period after all closing entries are complete; select company code and set period to "locked for posting" - Execute transaction
FAGLL03to run the automatic clearing of reconciliation accounts between AR/AP and GL - Generate closing reports using transaction
FAGLL31(reconciliation report) andF.64(balance sheet) to verify all accounts are balanced - Lock the fiscal year using transaction
OB29for year-end closing, preventing any further postings to that year
Code
*& SAP FI Period Closing Automation
*& Automate month-end and year-end closing tasks
REPORT zfi_period_closing.
DATA: lv_bukrs TYPE bukrs VALUE '1000',
lv_monat TYPE monat VALUE 12,
lv_gjahr TYPE gjahr VALUE 2024,
lv_wrshp TYPE wrshp,
lt_accruals TYPE TABLE OF fica,
ls_accrual TYPE fica,
lv_message TYPE string.
* Step 1: Validate posting period is open
CALL FUNCTION 'FI_POSTING_PERIOD_VALIDATION'
EXPORTING
i_bukrs = lv_bukrs
i_monat = lv_monat
i_gjahr = lv_gjahr
IMPORTING
e_status = lv_wrshp
EXCEPTIONS
period_closed = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE 'Period is locked for posting' TYPE 'E'.
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.