on 03-01-2006 4:48 PM
Hi,
I have declared the "rate" field like this in a program.
the field "konp-kbetr" is of "CURRENCY" field type and the length is: 11,2.
data: begin of itab occurs 0,
rate like konp-kbetr,
end of itab.
.......................
.......................
select kbetr from konp into itab-rate.
....................
....................
but while dubugging the contents for the "rate" field in itab shows like this:
no component name type length contents
1. rate P 6 0.00
What could be the probelm for that?
please let me know.
thnx.
Hi Dev,
In the attributes of the program,please check the check box "fixed point arithmetic".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
u r not getting my point.
i'm checking the whole itab itself.
and the problem i'm getting is: if there is a value for that "rate" for eg: 8972452.34 it is showing that as : "*52.34".
this is where i'm getting the problem.
hope it is clear now.
and when i'm checking the program for syntax error, is it showing a message that "The "itab-rate" field should be of type c,n,d,t".
plz tell me how can i declare a currency field as type C,N,D,T?
thnx
VIJAY,
there are 3 itabs in my prog like this.
1st itab:
data: begin of itab occurs 0,
rate like konp-kbetr,
end of itab.
2nd itab:
data: begin of itab2 occurs 0,
knumh like a505-knumh,
end of itab2.
3rd itab:
data: begin of itab3,
awp like konp-kbetr,
end of itab3.
the code is like this:
select kbetr from konp into itab-rate
where knumh = itab2-knumh.
append itab.
endselect.
loop at itab.
write itab-rate to itab3-awp.
endloop.
when i debug the code, the "rate" field is showing the correct value for the 2nd itab.
but the problem is with the 3rd itab only. it is basically a structure. and in that i want the value eventually.
thnx,
Hi Dev,
Write to is only used for moving to character.
WRITE f TO g.
In contrast to MOVE, the format of the target field g is the same as when outputting to a list with WRITE. The field type C is always used, regardless of the actual data type.
So use Move statement..
loop at itab.
<b>move</b> itab-rate to itab3-awp.
endloop.
Hi,
You must use 'itab-rate' not 'rate'..
Regards,
Suresh Datti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.