2008 Nov 12 8:38 AM
I am using a field KAWRT data type CURR length 15 decimal 2 to be displayed in Sapscript
If I pass 100.00, the value is displayed as 10.00. Does anyone know the reason for the loss of one decimal pt? How can this be fixed. Currently I am multiplying the actual value by 10 prior to passing it through write_form
I am using a field KAWRT data type CURR length 15 decimal 2 to be displayed in Sapscript
If I pass 100.00, the value is displayed as 10.00. Does anyone know the reason for the loss of one decimal pt? How can this be fixed. Currently I am multiplying the actual value by 10 prior to passing it through write_form
2008 Nov 12 8:45 AM
Hi Megan,
Just debug the form and check what value are you getting where this field is getting priinted.
Regards,
Nitin.
2008 Nov 12 8:47 AM
check the value in itab that u passing(that is value is 10 are it is 100).....
2008 Nov 12 8:50 AM
I have debuged this. The value right before the WRITE_FORM for the element is 100.00 But it gets displayed 10.00 in the document
If I were to pass it 1000.00, it would be displayed as 100.00
2008 Nov 12 9:02 AM
Check weather the windows are overlapping...some times a silly overlap of one window over the other..which inturn overlaps the last decimal or alfabet or value etc. this might sound as a very silly reply but it happend to me so i am telling u . cause value comming perfectly till u call the write_window and there wont be any scope that it goes wrong in the call function.
2008 Nov 12 8:52 AM
Now check with the driver program.
What is the value of that field there?
2008 Nov 12 8:57 AM
The value in the driver program is 100.00
The value thats displayed on document is 10.00
2008 Nov 12 9:04 AM
Hi,
I have confronted with such a problem just yesterday.
do you use something like :
&price(10.2)&
Something like that?
Try to increase the lenght of the 10 as 11 or 12 etc.
Hope helps.
deniz.
2008 Nov 12 1:04 PM
Deniz
Yes the KAWRT variable in the driver program is a CURR length 15 and dec 2
and in the sapscript I am using it as &KOMVD-KAWRT&(I12.1)&
Do you think this is whats causing the problem. What can be done to resolve it? Also its important that the value be displayed in the document with one decimal place and not more.
Edited by: Megan Flores on Nov 12, 2008 2:04 PM
Edited by: Megan Flores on Nov 12, 2008 2:05 PM
2008 Nov 12 9:05 AM
hi friend,
try this 2 function modules for ur solution.
1.CALL FUNCTION 'HR_IN_ROUND_AMT'
2.CALL FUNCTION 'ZSPELL_AMOUNT'
I hope this help for u.
Regards,
K.S.Kannan
2008 Nov 12 1:09 PM
Hi,
Display the field as &KOMVD-KAWRT&(15.1)&
I hope it works
Regards
Manasa
2008 Nov 12 1:28 PM
I am now displaying the field as &KOMVD-KAWRT(15.1)& and it does not fix it.
I am passing KOMVD-KAWRT as 100.00 and debugging the sapscript and the moment its gets into the sapscript, it becomes 10.00
This is so bizarre!!!
2008 Nov 12 1:43 PM
I am passing value 100.00 in driver program
DATA : KOMVD-KAWRT LIKE KOMVD-KAWRT.
KOMVD-KAWRT = '100.00'.
and displaying in form as &KOMVD-KAWRT(I15.1)&
I am getting the value displayed as 100.0
2008 Nov 12 1:58 PM
What about &KOMVD-KAWRT(I12.1)& Do you get 100.00 then too?
I have tried I12.1 & I15.1 and so on and I always get 10.0
2008 Nov 12 1:33 PM
It might be the currency fields acting up. I suggest you use your abap control program to WRITE your variable TO a plain text one, check that it was passed correctly (with the debugger) and print that text in the sapscript.
2008 Nov 12 1:41 PM
I cant for legacy reasons. I need to continue using the CURR field. The total output length given is 21
I even tried (I21.1) but even that doesnt work.
2008 Nov 12 1:43 PM
2008 Nov 12 1:48 PM
Hi,
Try give it &KOMVD-KAWRT&(.2)& in FORM
Regards
Bala Krishna
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |