Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CR 8.5, How do I test for NULL?

I want if ACJEITM_AmtCr is NULL, I want this to dispay ACJEITM_Des otherwise I want PTPUR_ReceiveRef to display

Is this = "" giving me the same as NULL?

IF {CIT_AC_DEBCRD_MEMO;1.ACJEITM_AmtCr} = "" then

{CIT_AC_DEBCRD_MEMO;1.ACJEITM_Des}

ELSE {CIT_AC_DEBCRD_MEMO;1.PTPUR_ReceiveRef}

END IF

Any help would be appreciated

Kelvin

Former Member
replied

Hi Kelvin,

The error you are getting is because " are for a string and not numbers.

Do this instead:

IF ISNULL({CIT_AC_DEBCRD_MEMO;1.ACJEITM_AmtCr}) or {CIT_AC_DEBCRD_MEMO;1.ACJEITM_AmtCr} = 0 THEN{CIT_AC_DEBCRD_MEMO;1.ACJEITM_Des}ELSE {CIT_AC_DEBCRD_MEMO;1.PTPUR_ReceiveRef};

This will get you around the problem. Since AmtCr is a number, you need to check the value for a NULL or for 0. " " is a space which is a string.

Hope this helps,

Brian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question