Retained Earnings Account is used to carry forward the balance from one fiscal year to the next fiscal year. You can assign a Retained Earning Account to each P&L account in the chart of accounts (COA). To automatically carry forward the balance to the next fiscal year, you can define P&L statements as per COA and assign them to the retained earning accounts.
There are two ways to define a Retained Earnings Account. You can either use the T-code OB53 or by T-code SPRO. Go to SAP Reference IMG → Financial Accounting → General Ledger Accounting → G/L Accounts → Preparations → Define Retained Earnings Account → Execute.
Enter the Chart of Accounts to define the Retained Earning Account for COA and press Enter.
Provide the P&L Account statement account type and account → Press Enter and save the configuration.