2006 Nov 14 8:15 AM
Hi,
The Current report had 3 fields which have decimals, The report is using ALV. Requirement is to eliminate the decimals for a certain country. i.e if the o/p shows 104.34, then the changed value should be 10434. I have resolved this by moving the data to a character field. But the problem now is that those 3 fields are also summed using ALV. This cannot be obtained since i am using Type 'C'.
Can anyone throw some light on it.
Thanks & Regards,
Sathu
Hi,
The Current report had 3 fields which have decimals, The report is using ALV. Requirement is to eliminate the decimals for a certain country. i.e if the o/p shows 104.34, then the changed value should be 10434. I have resolved this by moving the data to a character field. But the problem now is that those 3 fields are also summed using ALV. This cannot be obtained since i am using Type 'C'.
Can anyone throw some light on it.
Thanks & Regards,
Sathu
2006 Nov 14 8:18 AM
Hi
Declare ur numeric fields like this.......not sure ..but try it
check pc261
V_NUM LIKE PC261-SEQNR..
2006 Nov 14 8:22 AM
Hi R.K,
My field Length is 13 with 2 decimal places. The field SEQNR has only 5 characters.
2006 Nov 14 8:24 AM
hi,
just keep data type like the orginal one.
domnt make it char.
multiply ur old nalue by 100.
thus u can remove decimels.
try it.
rgds
Anver
if hlped pls mark points
2006 Nov 14 8:36 AM
Multiplying with 100 will probably not solve the problem cos i have checked it again and ,whats happening is that the field is declared as
field(13) type p decimal 5
2006 Nov 14 8:37 AM
2006 Nov 14 8:20 AM
Instead of type C field declare type I column and display it on the screen. Before displaying just mulitply by 100,
itab-new = itab-old * 100.
2006 Nov 14 8:25 AM
Hi Tomasz,
I tried with type I, But it is rounding-off the value. i.e instead of displaying 10435 it is displaying 104.
2006 Nov 14 8:26 AM
2006 Nov 14 8:30 AM
hi,
i think the length of that field is 3.
make it 5 and try the multiplication
rgds
anver
2006 Nov 14 8:23 AM
Hi,
I suppose in all record a field has always the same number of decimals.
Before fill the alv, can you multiply the value for 100 (in your example you have 2 decimals).
An idea.. but is possible it's a currency problem??
bye
enzo
2006 Nov 14 8:24 AM
Hi,
I am not clear on your requirement. Say you dont want to display decimals to country like Japan (Japanese currency dont have currencies with decimal notation). then better you create a reference by populating reference currency field in the field catalogue(field is CFIELDNAME).
Let me know if my understanding is wrong...
2006 Nov 14 8:26 AM
Hi,
Simple logic what i can think is for specfic country in your internal table mulitply the value by 100 and then you will not have any issue...
This is because you don't want remove decimals.
Atul
2006 Nov 14 8:35 AM
declare d field as numner/integer....
do not declare it as CHAR
in field catalog u can u can make decimals
wa-fieldcatalog-DECIMALS_OUT = '0'
or
multipy field with 100 ...
Regards.
Ramesh.