05-05-2009 1:41 PM
hi experts,
i have one problem i.e one field in internal table has contain data just like, 0.8,ttt,0.8-1.8.
it contains three different type of data.
in my requriment is if that field contains 0.8 ,1.9................and 1.8 when that field multipaly another field.
please give suggition.
thanks.
05-05-2009 1:45 PM
Hi,
if itab-field ca sy-abcde. - this represents it is having characters.
else.
in this portion it is not having any characters.
make sure that if it is not having any characters, then it will definitely have numbers.
here u can also check with
if itab-field ge 0.
write your logic when value greater than 0
elseif itab-field le 0.
write your logic when value less than 0
endif.
endif.
regards,
Venkatesh
05-05-2009 1:49 PM
Hi Ramayya,
First check the field if that table is character or Interger..
by using the below code..
Loop at Itab.
if itab-field1 ca sy-abcde. "that means the field is charatcter..
else.
try. "use this because you are trying to multiply the character field with numeric
itab-field1 = itab-field1 * 5.
endtry. "Use this..By using this you can avoid Dump...
Endif.
endloop.
Regards,
Prabhudas