Du machst ein With temp_result as (...) greifst aber nicht auf temp_result zu.
Das könnte dann so aussehen:

with temp_result as (
SELECT
BMKONZ as NI,
BMIDEN as Artikel,
TZBEZ1 as Bezeichnung,
BMLIEF as Lieferant,
Count(BMLM) AS Paletten,
Sum(int(BMBMEN)) AS Menge,
(
select
case when sum(int(TPBMEN)) is NULL then 0 else sum(int(TPBMEN)) end
from
pbesttp
where
tpiden = bmiden
and tpttyp in ('E', 'U')
) as Transport
FROM PBESTLOL1
)
select * from temp_result

lg Andreas