Concatenate text and tochar(): Why is there a space between the two?
Because to_char() pads the result with spaces (I never understood why). 

You need to use the "fill mode":

'ABC' || to_char('1','FM000000')