‎2005 Sep 22 10:06 AM
i have a field in a table c_var as char15. the data of this is purely numeric. everytime i will save to the table i will need to increment this. how should i convert my variable in the program in order to fit to my requirements.
thanks.
‎2005 Sep 22 10:20 AM
Hi
I hope this will work for u.
data : w_val(10) type c value '0'.
do 10 times.
w_val = w_val + 1.
assign w_val to ur table field.
write 😕 w_val.
enddo.
thanks
Pavan
‎2005 Sep 22 10:08 AM
‎2005 Sep 22 10:11 AM
Hi Donna,
Try changing variable as Numeric Character NUMC.
Thanks
Lakshman
‎2005 Sep 22 10:11 AM
Hi
use a variable type N (numeric char) instead of C.
So you don't need any convertion and u can increment it.
DATA: COUNTER(15) TYPE N.
....
COUNTER = COUNTER + 1.
......
Max
Message was edited by: max bianchi
‎2005 Sep 22 10:12 AM
data : l_val(10) type N.
n= 1
n= n + 1
assign this value to table field
cheers
sasi
‎2005 Sep 22 10:14 AM
hi,
try this also
data : l_type type i,
l_char(15) type c.
l_type = 10.
l_char = l_type.
‎2005 Sep 22 10:20 AM
Hi
I hope this will work for u.
data : w_val(10) type c value '0'.
do 10 times.
w_val = w_val + 1.
assign w_val to ur table field.
write 😕 w_val.
enddo.
thanks
Pavan
‎2005 Sep 22 2:56 PM
Try:
REPORT ztest.
data counter type n.
select c_var from whatever
into counter...
counter = counter + 1.
write counter to c_var.
.
.more processing
.
insert whatever...Rob