  Let $(R,\fm)$ be a commutative Noetherian local ring and let $M$ be an
$R$-module which is a relative Cohen-Macaulay with respect to a proper ideal
$\fa$ of $R$ and set $n:=\h_{M}\fa$. We prove that $\ind M<\infty$ if and only
if $\ind\H^{n}_\fa(M)<\infty$ and that $\ind\H^{n}_\fa(M)=\ind M-n$. We also
prove that if $R$ has a dualizing complex and $\Gid_{R} M<\infty$, then
$\Gid_{R}\H^{n}_\fa(M)<\infty$ and $\Gid_{R}\H^{n}_\fa(M)=\Gid_{R} M-n$.
Moreover if $R$ and $M$ are Cohen-Macaulay, then it is proved that $\Gid_{R}
M<\infty$ whenever $\Gid_{R}\H^{n}_\fa(M)<\infty$. Next, for a finitely
generated $R$-module $M$ of dimension $d$, it is proved that if $K_{\hat M}$ is
Cohen-Macaulay and $\Gid_{R}\H_{\fm}^{d}(M)<\infty$,
then$\Gid_{R}\H_{\fm}^{d}(M)=\depth R- d.$ The above results have consequences
which improve some known results and provide characterizations of Gorenstein
rings.
