Skip to Content
0
Former Member
May 28, 2008 at 11:02 AM

select query

13 Views

hi friends,

i have problem with this query . can any one help me. here i need to get the max value of stlal comparing matnr.

SELECT a~stlnr

a~stlkn

a~stlal

b~matnr

c~annam

c~idnrk

c~posnr

c~menge

c~meins

c~ausch

INTO TABLE it_final

FROM stas AS a

INNER JOIN mast AS b ON ( bstlnr EQ astlnr

AND bstlal EQ astlal )

LEFT OUTER JOIN stpo AS c ON ( cstlnr EQ astlnr

AND cstlkn EQ astlkn )

WHERE b~matnr IN so_matnr

AND (( bmatnr astlal ) in (SELECT MATNR MAX( stlal ) FROM mast group by matnr)) .

thank you,

looking for your quick reply.