How to access year date information in a salary structure

I am sorry if this is a repeat but it seems a quite important general point that is outstanding from am earlier topic.

In my salary structure calculations I require access to year to date information eg cumulative gross pay, cumulative tax paid, cumulative vacation taken etc.

Can anyone suggest how to get this?