Application Development and Automation 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: 
Read only

Problem with the data type in layout

Former Member
0 Likes
549

Hi friends,

I am getting one Rate as 20.000 but it should print on the screen as 20

Can any one help me on this issue,

Regards,

Venu.

5 REPLIES 5
Read only

Former Member
0 Likes
514

Hi,

data lv_data type i,

lv_data1 = '20.000'.

lv_data = lv_data1.

write lv_data.

you will get 20

Regards

amole

Read only

dani_mn
Active Contributor
0 Likes
514

HI,

check the code below.

report z_test2.

data: a(10).

<b>data: b type p decimals 0.</b>

a = '99999.00'.

b = a.

write:/ b.

REgards,

Read only

Former Member
0 Likes
514

Hi Venu,

Refer this and make changes in the form layout.

Number of Decimal Places

A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.

Syntax

&symbol(.N)&

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE& -> 1,234.560

&EKPO-MENGE(.1) -> 1,234.6

&EKPO-MENGE&(.4) -> 1,234.5600

&EKPO-MENGE&(.0) -> 1,235

Read only

0 Likes
514

Hi There,

I tried the same as you said but I am getting the same output ?

Regards,

Venu

Read only

0 Likes
514

Hi venu,

check in teh program attributes if the Fixed Point Arithmetic attribute is checked.