i assume you mean the SSN header and footer.
the point of the shared variable in this would be to add each row and last and then display the result in your footer reseting on the next header
you are not adding anything in it
e.g. details - shared numbervar eehours:= eehours+{hours};
this action is creating your summary already so you do not need to resummarize it.
that said it is no differennt that
sum(hours,ssn)
or a Running Total with SUM of the hours resetting on SSN group