‎2007 Aug 16 8:51 PM
one of my table field is character which is of 30 characters in length. But it generally has value 7 or 8 characters. I have to check whether the last character of the value is * or not....how can i do that..
‎2007 Aug 16 8:56 PM
Try this:
data: lv_length type i.
lv_length = strlen( itab-field ).
if itab-field+(lv_length) eq '*'.
*----
endif.
Thanks,
SKJ
‎2007 Aug 16 8:56 PM
Try this:
data: lv_length type i.
lv_length = strlen( itab-field ).
if itab-field+(lv_length) eq '*'.
*----
endif.
Thanks,
SKJ
‎2007 Aug 16 9:02 PM
Once correction to the suggest code, I believe you would have to substract one form the length in order to get the right positioning, yes? And the lv_length shouldn't be in parenthesis.
data: lv_length type i.
lv_length = strlen( itab-field ).
lv_length = lv_length - 1.
if itab-field+lv_length(1) eq '*'.
endif.
Regards,
RIch Heilman
‎2007 Aug 16 9:06 PM
HI,
data : lv_data(20) type c.
lv_data = 'Hello'.
call function 'STRING_REVERSE'
exporting
STRING = lv_data.
lang = 'E'
importing
RSTRING = lv_data.
if lv_data+0(1) eq '*'.
Endif.
Thanks
Mahesh