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

Field format conversion in ALV

Former Member
0 Likes
994

Hi,

I am displaying a field in ALV, for wich the

value is 1.4000000000000001E-01.

I want it to be displayed as :0.140.

How do i change the format ?

Rgds,

Ravindra

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
959

Hi,

Change the data type of the field to Packed.

eg.

var1 type p decimals 3.

Regads,

Shashank

6 REPLIES 6
Read only

Former Member
0 Likes
959

change data type of field..

data: f type f value '1.4000000000000001E-01'.

data: p type p decimals 3.

p = f.

write:/ p.

Read only

Former Member
0 Likes
960

Hi,

Change the data type of the field to Packed.

eg.

var1 type p decimals 3.

Regads,

Shashank

Read only

0 Likes
959

it is a standard field in a standard report,

so we cannot change the field or its type..

rgds,

Ravindra

Read only

0 Likes
959

than u have to find out the userexit or take the access key to do the changes.....

Read only

Former Member
0 Likes
959

Hi Ravindra,

1) Take an additional variable of TYPE P WITH DECIMALS 3.

DATA V_VALUE TYPE P DECIMALS 3.

2) Assign standard program value to this variable

3) Build field catalog with this new variable V_VALUE rather than with standard program value.

I hope this may solve your problem.

Thanks,

Vinay

Read only

0 Likes
959

thanks all..the problem is

solved by changing the data type

of the variable, by using another variable of desired length.

i have given points to all