‎2008 Jun 21 10:14 AM
can i use MAX, MIN function on internal table , i can use while selecting data from database table but can i use the same from internal table, if no then is there any thing from which i can calculate the max , min and avg value
there are approx 40 fields in a table .
Thanks.
‎2008 Jun 21 10:45 AM
‎2008 Jun 21 10:30 AM
There is one way you can get the Max, MIn & avg values from internal table.
SORT (the internal table) BY (Key).
READ TABLE it_table INTO wa_table INDEX 1.
IF sy-subrc EQ 0.
"This forms the Min value
ENDIF.
DESCRIBE TABLE it_table LINES v_line.
READ TABLE it_table INTO wa_table INDEX v_line.
IF sy-subrc EQ 0.
"This forms the Max value
ENDIF.
ENDIF.Calculate the average from this.
Regards
Kannaiah
‎2008 Jun 21 10:45 AM
‎2008 Jun 21 11:43 AM