Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

one field in internal table has char and int type data.

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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