The latest version of babel allows the option KeepShorthandsActive, so you could say
\LoadClass[a4paper,10pt]{scrartcl}
\RequirePackage[KeepShorthandsActive,ngerman]{babel}
\newcommand{\abc}{"`abc"'}
but this opens the way to several problems, because packages loaded in the preamble will be affected by the active ".
You could use
\shorthandon{"}
\newcommand{\abc}{"`abc"'}
\shorthandoff{"}
as suggested in babel shorthand "| doesn't work in macros but you can exploit the fact of being in a class file and so of being able to use @-commands. The list of shorthands is found in ngermanb.ldf
\declare@shorthand{ngerman}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
\declare@shorthand{ngerman}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
\declare@shorthand{ngerman}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
\declare@shorthand{ngerman}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
\declare@shorthand{ngerman}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
\declare@shorthand{ngerman}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
\declare@shorthand{ngerman}{"e}{\textormath{\"{e}}{\ddot e}}
\declare@shorthand{ngerman}{"E}{\textormath{\"{E}}{\ddot E}}
\declare@shorthand{ngerman}{"i}{\textormath{\"{\i}}%
{\ddot\imath}}
\declare@shorthand{ngerman}{"I}{\textormath{\"{I}}{\ddot I}}
\declare@shorthand{ngerman}{"s}{\textormath{\ss}{\@SS{}}}
\declare@shorthand{ngerman}{"S}{\SS}
\declare@shorthand{ngerman}{"z}{\textormath{\ss}{\@SS{}}}
\declare@shorthand{ngerman}{"Z}{SZ}
\declare@shorthand{ngerman}{"`}{\glqq}
\declare@shorthand{ngerman}{"'}{\grqq}
\declare@shorthand{ngerman}{"<}{\flqq}
\declare@shorthand{ngerman}{">}{\frqq}
\declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{ngerman}{"|}{%
\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
\allowhyphens}{}}
\declare@shorthand{ngerman}{""}{\hskip\z@skip}
\declare@shorthand{ngerman}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{ngerman}{"=}{\penalty\@M-\hskip\z@skip}
so, for instance, instead of "a in a class macro, you can say \"{a}\allowhyphens and, instead of "- you can use
\nobreak\-\bbl@allowhyphens
Note that the \textormath alternative is useless in a class macro wanting to use "a.
Probably babel should use an indirect method (there are much less memory problems nowadays). In my opinion it should say
\def\bbl@ngerman@quotehyphen{\nobreak\-\bbl@allowhyphens}
and then
\declare@shorthand{ngerman}{"-}{\bbl@ngerman@quotehyphen}
For "a it should have
\def\bbl@ngerman@quotea@text{\"{a}\allowhyphens}
\def\bbl@ngerman@quotea@math{\ddot a}
and
\declare@shorthand{ngerman}{"a}{%
\textormath{\bbl@ngerman@quotea@text}{\bbl@ngerman@quotea@math}%
}
This would allow class writers to access more easily and clearly the nonshorthand version.
babel. – egreg Aug 01 '14 at 09:07