I would use
\usepackage{xpatch}% needed to path \addchaptertocentry
% Style Table of Content.
\setkomafont{chapterentrypagenumber}{\nullfont}
\newcommand\chapterentrynumberformat[1]{\MakeUppercase\chapapp\ #1\kern 0.25em---\kern 0.25em}
\xpatchcmd{\addchaptertocentry}
{\addtocentrydefault{chapter}{#1}{#2}}
{\IfArgIsEmpty{#1}
{\addtocontents{toc}
{\protect\begingroup
\protect\setkomafont{chapterentrypagenumber}{}%
\protect\KOMAoptions{chapterentrydots}%
}%
\addtocentrydefault{chapter}{}{\MakeUppercase{#2}}%
\addtocontents{toc}{\protect\endgroup}%
}
{\addtocentrydefault{chapter}{}{\protect\chapterentrynumberformat{#1}\MakeUppercase{#2}}}%
}{}{\PatchFailed}
With the suggestion of @Schweinebacke (see his comments to the question) and \usepackage[T1]{fontenc}
:
\documentclass[
12pt,a4paper,
chapterprefix=true,% chapterprefixline does the same
headings=optiontoheadandtoc,% <- added
oneside
]{scrbook}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{lipsum}
\usepackage[T1]{fontenc}% <- added
\usepackage{mathptmx}
\usepackage{xpatch}% needed to path \addchaptertocentry
% Style Table of Content.
\setkomafont{chapterentrypagenumber}{\nullfont}
\newcommand\chapterentrynumberformat[1]{\MakeUppercase\chapapp\ #1\kern 0.25em---\kern 0.25em}
\xpatchcmd{\addchaptertocentry}
{\addtocentrydefault{chapter}{#1}{#2}}
{\IfArgIsEmpty{#1}
{\addtocontents{toc}
{\protect\begingroup
\protect\setkomafont{chapterentrypagenumber}{}%
\protect\KOMAoptions{chapterentrydots}%
}%
\addtocentrydefault{chapter}{}{\MakeUppercase{#2}}%
\addtocontents{toc}{\protect\endgroup}%
}
{\addtocentrydefault{chapter}{}{\protect\chapterentrynumberformat{#1}\MakeUppercase{#2}}}%
}{}{\PatchFailed}
%% Document Parts %%
\begin{document}
\frontmatter
\pagestyle{plain}
\tableofcontents
\addchap{ABSTRAK} % Abstract in language other than English
\lipsum[1]
\addchap[tocentry=\textit{ABSTRACT}]{ABSTRACT} % Abstract in English, must be shown italicised in ToC
\lipsum[2]
\mainmatter
\addchap{SOMESTUFFS}
\lipsum[3]
\chapter{FOO}
\section{Bar}
\lipsum[4]
\setcounter{chapter}{9}
\chapter{Chapter with two digit number}
\end{document}
results in

Update
If you are loading package hyperref
use command \texorpdfstring
to avoid the \MakeUppercase ...ppercaseUnsupportedInPdfStrings
error:
\documentclass[
12pt,a4paper,
chapterprefix=true,% chapterprefixline does the same
headings=optiontoheadandtoc,% <- added
oneside
]{scrbook}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{lipsum}
\usepackage[T1]{fontenc}% <- added
\usepackage{mathptmx}
\usepackage{xpatch}% needed to path \addchaptertocentry
\usepackage{hyperref}
% Style Table of Content.
\setkomafont{chapterentrypagenumber}{\nullfont}
\newcommand\chapterentrynumberformat[1]{\MakeUppercase\chapapp\ #1\kern 0.25em---\kern 0.25em}
\xpatchcmd{\addchaptertocentry}
{\addtocentrydefault{chapter}{#1}{#2}}
{\IfArgIsEmpty{#1}
{\addtocontents{toc}
{\protect\begingroup
\protect\setkomafont{chapterentrypagenumber}{}%
\protect\KOMAoptions{chapterentrydots}%
}%
\addtocentrydefault{chapter}{}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
\addtocontents{toc}{\protect\endgroup}%
}
{\addtocentrydefault{chapter}{}{\texorpdfstring{\protect\chapterentrynumberformat{#1}\MakeUppercase{#2}}{#2}}}%
}{}{\PatchFailed}
%% Document Parts %%
\begin{document}
\frontmatter
\pagestyle{plain}
\tableofcontents
\addchap{ABSTRAK} % Abstract in language other than English
\lipsum[1]
\addchap[tocentry=\textit{ABSTRACT}]{ABSTRACT} % Abstract in English, must be shown italicised in ToC
\lipsum[2]
\mainmatter
\addchap{SOMESTUFFS}
\lipsum[3]
\chapter{FOO}
\section{Bar}
\lipsum[4]
\setcounter{chapter}{9}
\chapter{Chapter with two digit number}
\end{document}
headings=optiontotocandhead
and\addchap[tocentry=\protect\textit{ABSTRACT}]{ABSTRACT}
or you can define a new section command using\DeclareNewSectionCommand
and set optiontocentryformat
to\textit
. The last solution would be more nice.\DeclareNewSectionCommand
? I my original MWE, I already declared one for {chapter}. I am confused to be honest.headings=optiontotocandhead
(changed theheadings=twolinechapter
in my original MWE with class option you suggested) and\addchap[tocentry=\protect\textit{ABSTRACT}]{ABSTRACT}
. That does not work. The entry for ABSTRACT in ToC now shows tocentry=ABSTRACT . . . . . . . . . . (iii). I have no idea on how to define\DeclareNewSectionCommand
and set optiontocentryformat
to\textit
.\addchap
command has to be:\addchap[tocentry=\normalfont\textit{ABSTRACT}]{ABSTRACT}
(without\protect
but with additional\normalfont
because there is no bold italic sans serif fontOT1/cmss/bx/it
). If you need bold italic sans serif, you need to use another font, e.g.,\usepackage[scaled]{helvet}
or\usepackage{lmodern}
(last one before\usepackage{mathptmx}
).