For the following code, how can I remove section entries indentation and print ToC like the desired output?

\RequirePackage{luatex85}
\documentclass{scrbook}
\renewcommand*{\chapterformat}{CHAPTER~\thechapter:\enskip}
\renewcommand*\raggedchapter{\centering}
\renewcommand\chapterlinesformat[3]{%
#2\MakeUppercase{#3}% #2 is <CHAPTER1:> and #3 is the title
}
\usepackage[tocflat]{tocstyle}
}
\usetocstyle{KOMAlike}

\begin{document}
\tableofcontents
\chapter{TITLE}
\section{Topic 1}
\subsection{Sub-topic 1}
\end{document}


## Desired Output

You can use on board commands.

\RequirePackage{luatex85}
\documentclass{scrbook}
\renewcommand*{\chapterformat}{CHAPTER~\thechapter:\enskip}
\renewcommand*\raggedchapter{\centering}
\renewcommand\chapterlinesformat[3]{%
#2\MakeUppercase{#3}% #2 is <CHAPTER1:> and #3 is the title
}
}

\RedeclareSectionCommand[tocindent=0pt]{section}
\RedeclareSectionCommand[tocnumwidth=70pt]{chapter}

\begin{document}
\tableofcontents
\chapter{TITLE}
\section{Topic 1}
\subsection{Sub-topic 1}
\end{document}

• I highly appreciate your unconditional consideration. – Diaa Nov 29 '16 at 18:53
• I am so sorry for my several questions, but this line \addtocentrydefault{chapter} also prefixes LoF and LoT with CHAPTER. How can I make it only affect normal chapters? – Diaa Nov 29 '16 at 19:24
• @DiaaAbidou The lines that renew addchaptertocentry, move them after the lists. – Johannes_B Nov 29 '16 at 19:42
• Many thanks, they made me lose my temper. Have a nice day. – Diaa Nov 29 '16 at 19:45

Update: Suggestion that does not need xpatch

\documentclass
[listof=totoc]
{scrbook}[2017/01/03]
\renewcommand*{\chapterformat}{\chaptername~\thechapter:\enskip}
\renewcommand*\raggedchapter{\centering}
\renewcommand\chapterlinesformat[3]{\MakeUppercase{#2#3}}

\newcommand\chapnumintoc[1]{\MakeUppercase{\chaptername}~#1}
\RedeclareSectionCommand[
tocentrynumberformat=\chapnumintoc,
tocdynnumwidth
]{chapter}
\RedeclareSectionCommand[tocindent=0pt]{section}
\RedeclareSectionCommand[tocindent=2.3em]{subsection}

\begin{document}
\tableofcontents
\listoftables
\chapter{Title}
\section{Topic 1}
\subsection{Sub-topic 1}
\end{document}


Run three times to get:

The original definition of \addchaptertocentry is

\newcommand*{\addchaptertocentry}[2]{%
\if@chaptertolists
\doforeachtocfile{%
\iftocfeature{\@currext}{chapteratlist}{%
}{}%
}%
\fi
}


If you still want to use option chapteratlists or listof=chaptergapsmall etc. you could patch command \addchaptertocentry:

\RequirePackage{luatex85}
\documentclass
[listof=totoc]
{scrbook}
\renewcommand*{\chapterformat}{\chaptername~\thechapter:\enskip}
\renewcommand*\raggedchapter{\centering}
\renewcommand\chapterlinesformat[3]{\MakeUppercase{#2#3}}

\usepackage{xpatch}
{\ifstr{#1}{}
}
{}{\PatchFailed}

\RedeclareSectionCommand[tocindent=0pt]{section}

\begin{document}
\tableofcontents
\listoftables
\chapter{Title}
\section{Topic 1}
\subsection{Sub-topic 1}