2007 Aug 17 8:36 PM
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...
2007 Aug 17 9:01 PM
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
2007 Aug 17 8:40 PM
Try this:
IF L_FIELD IS INITIAL OR L_FIELD+1(1) EQ 'Z'.
L_FIELD = ' VALUE'.
ENDIF.
Thanks,
SKJ
2007 Aug 17 8:41 PM
if l_field = ''.
l_field = 'VALUE'.
elseif l_field CP 'z*'
l_field = 'VALUE'.
endif.
use this.
2007 Aug 17 8:42 PM
Hi,
Instead of using that logic, use this logic which would serve your purpose
if l_field = ''.
l_field = 'VALUE'.
elseif l_field+0(1) eq 'z'.
l_field = 'VALUE1'.
endif.
Regards,
Vinod.
2007 Aug 17 8:43 PM
Hi,
Try this way,
IF l_field = SPACE.
l_field = 'VALUE'.
ELSEIF l_field(1) = 'Z' " 'Z' Must be in Upper Case
l_field = 'VALUE'.
ENDIF.
Regards.
Marcelo Ramos
2007 Aug 17 8:45 PM
Z
here means any thing value Z like ZVALUE, ZINSERT and ZMODIFY.....
2007 Aug 17 8:47 PM
yeah karthik..
The logic given by me would help u in finding out all the objects starting with 'Z" like ZTBALE, ZELEMENT, etc etc
2007 Aug 17 8:50 PM
I guess you can use below logic :
if l_field = ''.
l_field = 'VALUE'.
elseif l_field+0(1) ca 'Z'.
l_field = 'VALUE'.
endif.
since like will not work in if condition
Thanks
Seshu
2007 Aug 17 9:01 PM
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