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

Regarding max select statement.

Former Member
0 Likes
340

hi ,

i m using max in select statement but its nt showing the o/p,cud u plz help me..thnx in advce.here i m giving the code....

tables:s032.

select-options:s_matnr for s032-matnr.

data:begin of itab occurs 0,

matnr like s032-matnr,

letztzug like s032-letztzug,

end of itab.

select matnr

MAX( letztzug )

into corresponding

fields of

table itab from s032 where matnr in s_matnr

group by matnr

order by

matnr

.

loop at itab.

write:/ itab-matnr,itab-letztzug.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
295

select matnr

MAX( letztzug )

into

table itab from s032 where matnr in s_matnr

group by matnr

order by

matnr

.

dont use corresponding fields of clause it is not matching the field name with max function.

regards

shiba dutta

1 REPLY 1
Read only

Former Member
0 Likes
296

select matnr

MAX( letztzug )

into

table itab from s032 where matnr in s_matnr

group by matnr

order by

matnr

.

dont use corresponding fields of clause it is not matching the field name with max function.

regards

shiba dutta