2007 Sep 19 12:48 PM
Hi All,
I am displaying an internal table with module pool table control. Here i am facing a problem.
I have declared some fields of type VBAP-KWMENG. It is displaying the values like 20.00, but actually they want to display it with only 20(not 20.00). Can anybody tell me how to display the correct format with out having zeros after period.
Thanks,
Vasu...
2007 Sep 19 12:50 PM
Hi Vasu,
Create another parameter with Data type I.
Ex:
data : temp type I.
temp = VBAP-KWMENG(your field).
Write : temp.
Thanks,
Reward If Helpful.
2007 Sep 19 12:50 PM
Hi Vasu,
Create another parameter with Data type I.
Ex:
data : temp type I.
temp = VBAP-KWMENG(your field).
Write : temp.
Thanks,
Reward If Helpful.
2007 Sep 19 12:54 PM
This is very simple.
So the screen and change the field type from float or decimals from integer field. This will give the correct result.
<b>Please reward if useful...</b>
2007 Sep 19 1:04 PM
You are getting it as 20.00 because VBAP-KWMENG is a QUAN field. This always has 3 decimal places. declare a variable of data type int and assign the value to this new variable. Fint below a small piece of code to demonstrate this. Hope this helps.
DATA :var1 TYPE SMENG,
var2 TYPE i.
var1 = 15.
WRITE / var1.
var2 = var1.
WRITE / var2.