I would assume that you mean the statement of changes in equity. The retained earnings is simply the opening retained earnings positions plus any profit for the year less any dividend paid on ordinary shares less any dividend for irredeemable preference shares (paid or not) during the year.