07-11-2007 6:07 AM
Hi,
Can anyone tell me how to move a numc to int. I actually encountered a dump when i tried to move a numc of length 20 to integer.
07-11-2007 6:09 AM
Check out this sample code
l_sn type n length 10,
l_anz_int type i,
l_sn_int type i.
l_sn = '1231240000'.
l_anz_int = 1.
MOVE l_sn to l_sn_int.
l_sn_int = l_sn_int + l_anz_int.
MOVE l_sn_int TO l_sn.
07-11-2007 6:09 AM
See to that it doesnt have any alphabets in the numc.
Regards,
Kiran.
07-11-2007 6:14 AM
The numeric field is interpreted as a number, and transferred to the target field, where it is right-justified, and adopts a plus sign. If the target field is too short, the program may be terminated.
So this might be the reason for your dump...
In your case Integer occupies 4 bytes of data and you are assigning 20 bytes of data... Reduce the length of NUMC field.
<b>sample code:
data:
w_int type i,
w_numc(4) type n.
w_numc = '0100'.
move w_numc to w_int.</b>
Regards,
Pavan.