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

data type for decimal values

Former Member
0 Likes
5,050

Hi experts,

kindly help me in sorted this..

in my coding:

ztest is a structure.

I want to ask u that what datatype shud i give to my field so that it can gv me acorrect value after appending.

also i have to sort my data and decimal shud b 2 place only.

kinldy response

data: itab like ztest occurs 10 with header line.

move '0.23566' to itab-value.

append itab.

move '1.98323' to itab-value.

append itab.

move 900 to itab-value.

append itab.

move '100' to itab-value.

append itab.

sort itab by value descending.

loop at itab.

write: / itab-value.

endloop.

thanks n regards

puneet

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,020

Hi,

declare like this

data: value type p decimals 2.

Regards

7 REPLIES 7
Read only

Former Member
0 Likes
1,021

Hi,

declare like this

data: value type p decimals 2.

Regards

Read only

0 Likes
1,020

thanks all of u to reply

but i have to declare this field in my structure.

kindly tell me a datatype for structure field.

thanks and regards

puneet

Read only

0 Likes
1,020

USe type DEC with length 13 and 2 decimals

OR

You can use BAMNG data elemnt

(Use reference table EBAN ref. field MEINS)

Read only

0 Likes
1,020

hi,

create a data element with 2 demial places and assingn that data element to ur fields(ie value) in ur z structure (ie.ztest) ur problem will be solved

Read only

Former Member
0 Likes
1,020

Hi,

Try declaring it as type p decimals 2.

Reward if helpful.

regards,

ramya

Read only

Former Member
0 Likes
1,020

Declare the field 'value' as

type p decimals 2.

Read only

Former Member
0 Likes
1,020

Hi,

you can declare the value in the following way.

DATA : value type p decimals 2.

Reward points if useful.

Regards

rose