Hi Riccardo.
Could you write example of CE_PROJECTION function with OR-using in WHERE?
VAR_OUT = CE_PROJECTION(:JOIN_TAB, ["DOC_NUMBER","S_ORD_ITEM","KONDM","UEPOS","UEPOS_KONDM","SUBTOTAL_2"],
'UEPOS_KONDM !=''15'' OR UEPOS_KONDM IS NULL');
and
VAR_OUT = CE_PROJECTION(:JOIN_TAB, ["DOC_NUMBER","S_ORD_ITEM","KONDM","UEPOS","UEPOS_KONDM","SUBTOTAL_2"],
'UEPOS_KONDM !=''15'' OR UEPOS_KONDM = ''?''');
returns errors.
You're right in "a NULL value will be present in any column coming from the "right" table.".
And, as I understand, HANA presents NULL value as "?" - see rows 10, 110, 130 in my example, where uepos_kondm = ?.
Also I wrote that projection
VAR_OUT = CE_PROJECTION(:JOIN_TAB, ["DOC_NUMBER","S_ORD_ITEM","KONDM","UEPOS","UEPOS_KONDM","SUBTOTAL_2"],
'"UEPOS_KONDM" != ''?''');
works correct and returns 4 rows from 7 source rows.
But projection
VAR_OUT = CE_PROJECTION(:JOIN_TAB, ["DOC_NUMBER","S_ORD_ITEM","KONDM","UEPOS","UEPOS_KONDM","SUBTOTAL_2"],
'"UEPOS_KONDM" != ''15''');
returns only 2 rows from 7 instead of 5.
I wonder why it works in another way.
Such self-join on abap took me 10 seconds but it has already took 4 days on SQLscript!