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

type quan

Former Member
0 Likes
2,781

I want to store quantity invoiced as length 10 floating decimal point right justified

so i have quantity(10) type quan

but error says type quan is unknown. How do i define my variable quantity ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,549

HI..

In ABAP we dont have the datatype Quan ..

for achieving this we need to declare this as type <b>p with decimals 2</b> or the number of decimals what you need

if it helps reward with points

Regards Rk

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,549

You can't have a length speciification on a float field.

data: qty type f.

Regards,

RIch Heilman

Message was edited by:

Rich Heilman

Read only

0 Likes
1,549

Example.

data: qty type f.


qty = '1.123'.

write:/ qty.


qty = '1.123456'.

write:/ qty.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,550

HI..

In ABAP we dont have the datatype Quan ..

for achieving this we need to declare this as type <b>p with decimals 2</b> or the number of decimals what you need

if it helps reward with points

Regards Rk

Read only

Former Member
0 Likes
1,549

so I can do quantity(5) type p decimals 2 which will hold 9 digits (plus a sign) with 2 decimal places

what about another variable

unitprice(17)