Skip to Content

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

condition

In the if / else condition i want to check whether the field is initial or has a value with Z*

this is the code i've written...

      if l_field = ''.
      l_field = 'VALUE'.
      elseif l_field like 'z*'
      l_field = 'VALUE'.
      endif.

and it's returning error...

Tags:
replied

Hi,

Try this way,

      
IF l_field EQ SPACE.
    l_field = 'VALUE'.
"All value starting with Z will be treated.
ELSEIF l_field(1) EQ 'Z'     " 'Z' Must be in Upper Case 
    l_field = 'VALUE'.
ENDIF.

Regards.

Marcelo Ramos

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