Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Module Pool Table Control

Former Member
0 Kudos
101

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...

1 ACCEPTED SOLUTION

Former Member
0 Kudos
74

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.

3 REPLIES 3

Former Member
0 Kudos
75

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.

Former Member
0 Kudos
74

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>

Former Member
0 Kudos
74

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.