Hi
I have a formatted search as below for a UDF in outgoing payment screen
Select"CardFName" From OCRD Where "CardCode" = $[OVPM."CardCode"]
The problem is that if user do not select any card code in outgoing payment which means $[OVPM."CardCode"] is null, I would like to just select all foreign name from business partner master data and allow them to select manually from the list. I tried to do the query like below but encountered error "Incorrect syntax near IF". Please kindly advise
IF IFNULL($[OVPM."CardCode"],'') = ''
BEGIN
SELECT "CardFName" FROM OCRD
ELSE
SELECT "CardFName" FROM OCRD WHERE "CardCode" = $[OVPM."CardCode"]
END
Note: SAP B1 HANA
Regards
Yvaine