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: 

top-of-page

Former Member
0 Kudos

hi all,

i am doing sorting of an internal table on start-of-selection event. The minimum value when i am trying to write top-of-page event then it always gives 0.

why it is so???

my code is like below...................

loop at it_bom.

x = a/t.

itab-f1 = x.

append itab.

endloop.

sort itab by f1 ascending.

read table itab index 1.

min = itab-f1.

top-of-page.

write:/ 'minimum value', min.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

you must have declared x as integer so if it is in decimals i.e 0.9 then it will show you 0. check wat is the value first of operation a/t. like if it is 5/2 then value to be displayed should be 2.5

for that declare x as:

data: x type p decimals 2.

and itab-f also as f type p decimals 2

and min also the same.

2 REPLIES 2

Former Member
0 Kudos

hi,

you must have declared x as integer so if it is in decimals i.e 0.9 then it will show you 0. check wat is the value first of operation a/t. like if it is 5/2 then value to be displayed should be 2.5

for that declare x as:

data: x type p decimals 2.

and itab-f also as f type p decimals 2

and min also the same.

Former Member
0 Kudos

Hi,

When u start the programe top-of page will be triggered first.

that is the reason u r getting values as zero.

U putbreak-point and see the flow how it isgoing on, so that u can see the value

there.

Assign points if useful.