Use double quotes to have the var expanded in the sed
command:
set var="directory"
sed "s/DIRECTORY_PATH/${var}1234/" > output.txt
^ ^
Note the usage of braces in ${var}1234
: it makes bash understand the variable is $var
and 1234
is text, so you can refer to the variable name concatenated with some string.
Example
$ var="me"
$ new_var="you"
$ echo "hello me" | sed 's/$var/$new_var/g' # <-- single quotes
hello me # <-- no substitution
$ echo "hello me" | sed "s/$var/$new_var/g" # <-- double quotes
hello you # <-- substitution!