I want to create a filter of an ELSE inside my condition.
The ELSE 'Área Não Aderente'. Below script. I want to bring only the data from this ELSE, which would be the opposite of my condition below.
CASE WHEN
("EKKO"."BSART" LIKE 'Y%' OR "EKKO"."BSART" LIKE 'PE' OR ("EKKO"."BSART" LIKE 'Z%' AND "EKKO"."BSART" NOT IN ('ZCG','ZPM', 'ZCAT')))
AND
("EKKO"."EKGRP" LIKE 'I%' OR "EKKO"."EKGRP" IN_LIKE ('%1I','%2I','%3I','%4I','%5I','%6I','%7I','%8I','%9I') OR "EKKO"."EKGRP" LIKE 'A%' OR "EKKO"."EKGRP" LIKE '01A')
THEN -- Pedido por Área
CASE WHEN
PU_COUNT("EKKO", "EKPO"."MATNR", "EKPO"."MATNR" IN_LIKE ('%3001009%', '%3000926%', '%3000927%'))>0 -- Cadastro de Material
OR
(PU_COUNT("EKKO", "EKPO"."MATKL", "EKPO"."MATKL" IN ('GI001710A'))>0 -- Grupo de Mercadoria
AND
"EKKO"."EKGRP" IN ('I09')) -- Grupo de Comprador
OR
"EKKO"."EKGRP" IN ('I38', 'I13','I12') -- Grupo de Comprador
OR
"EKKO"."Z_BSGRU" IN ('INT')
AND
"PO_LFB1"."FDGRV" IN ('FPREL') -- Contratos Intercompany
THEN 'Área Aderente'
ELSE 'Área Não Aderente'
END
ELSE 'Supply'
Thanks.