The clause WHERE spyypp BETWEEN 201305 AND 201305
has the consequence of coercing your join into an INNER JOIN, as it is performed after the join is completed.
In order to achieve the effect you desire you must move this clause into the ON condition like this so that the clause is applied before the join is:
WITH lastYear AS (
SELECT
spsku "sku",
spstor "store",
sum(spales) "sales_ly"
FROM SALES
WHERE spyypp BETWEEN 201205 AND 201205
GROUP BY spstor, spsku
)
SELECT
Sales_report.spstor "store",
sum(spales) "bom_retail",
sum(LY."sales_ly") "sales_ly"
FROM SALES Sales_report
FULL OUTER JOIN lastYear LY
ON LY."sku" = spsku
AND LY."store" = spstor
AND spyypp BETWEEN 201305 AND 201305
GROUP BY spstor
Alternatively, which provides clearer code in some circumstance, make both LAST_YEAR and THIS_YEAR common table expressions like this:
WITH
lastYear AS (
SELECT
spsku "sku",
spstor "store",
sum(spales) "sales_ly"
FROM SALES
WHERE spyypp BETWEEN 201205 AND 201205
GROUP BY spstor, spsku
),
this year as (
SELECT
spsku "sku",
spstor "store",
sum(spales) "sales_ly"
FROM SALES
WHERE spyypp BETWEEN 201305 AND 201305
GROUP BY spstor, spsku
)
SELECT
TY.spstor "store",
sum(TY.spales) "bom_retail",
sum(LY."sales_ly") "sales_ly"
FROM this year TY
FULL OUTER JOIN lastYear LY
ON LY."sku" = TY.sku
AND LY."store" = TY.stor