Shell variables only resolve between Double Quotes (").
sed "s/$WORKDIR/$ARCHIVE/ig" test.dat > abc
(Double quotes)
Would work if not for the forward slashes. Sed can use any character to delimit those input fields and forward slash is perhaps not the best choice due to it's use for directory paths. For example you can use this instead:
sed "s#$WORKDIR#$ARCHIVE#ig" test.dat > abc