How do I test the value of an SAP field?

You cannot test value of a SAP field directly. Store the value in a GuiXT variable first and then test the variable.