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: 

To calculate the value using MAX

Former Member
0 Kudos

Hi All,

In my output table i have value Time of TYPE P.

I want to get the maximum value from the time coloum.

I have tried using the MAX function like Max(ws_output-time)

but gettting error.

Can someone please guide the step need to be taken to get the output max value from the workarea(ws_output) field (time)

Thanks in advance..

Regards,

Chirag

2 REPLIES 2

Former Member
0 Kudos

say time field is T1 type sy-uzeit in your internal table .

SORT ITAB by T1 descending .

read table itab index 1 . " this places the time value of the max in the 1st row.

itab-t1 holds max value .

Former Member
0 Kudos

Thank You.