‎2007 Dec 14 12:21 PM
I have to fetch the maximum of lifnr and pass it to ITAB using TABLE alias names
Is this statement correct
Select * from Z123 A into table itab where lifnr = ( select max( lifnr ) from Z123 'B' where A.kunnr = B.kunnr) .
‎2007 Dec 14 12:29 PM
Select * from Z123 <b>as</b> A into table itab where lifnr = ( select max( lifnr ) from Z123 <b>as</b> B where A.kunnr = B.kunnr) .
‎2007 Dec 14 12:29 PM
Select * from Z123 <b>as</b> A into table itab where lifnr = ( select max( lifnr ) from Z123 <b>as</b> B where A.kunnr = B.kunnr) .
‎2007 Dec 14 12:41 PM
Hi,
Use below code .
data:itab like Z123A occurs 0 with header line.
SELECT * FROM Z123A
INTO TABLE itab
WHERE matnr = ( SELECT MAX( lifnr )
FROM Z123B ) .
LOOP AT itab.
WRITE itab-lifnr.
ENDLOOP.
Here no need of using alias .
we then in case of joins for select stmt.
Please reward points if helpful...........
Thanks
Sivaparvathi.
‎2007 Dec 14 12:49 PM