Problem in reteriving data from select query
I had developed a code in which i had to retrieve data from QALS,QMEL and QMFE. There are 2 tables in which i am having data from QALS,QMEL in the table STIT and to take data from the QMFE in table STIT1 .
Data in the STIT is coming right as i had used left Outer join but when try to reterive the data for the STIT1 the data is not coming right..
here's the code which i am using for the SELECT query :-
SELECT AMATNR AWERK APRUEFLOS APAENDTERM ALOSMENGE BMAWERK BCHARG BLGORTCHARG BMGEIN BMGEIG BQMNUM CNTGEW CMEINS CGEWEI
FROM QALS AS A
LEFT OUTER JOIN QMEL AS B ON BMATNR = AMATNR AND BPRUEFLOS = APRUEFLOS
INNER JOIN MARA AS C ON CMATNR = AMATNR
INTO TABLE STIT WHERE AWERK = P_WERKS AND AMATNR IN P_MATNR AND APAENDTERM IN I_DATE AND ALAGORTCHRG IN P_LGORT AND A~CHARG IN P_CHARG.
SORT STIT BY MATNR.
SELECT QMNUM FEQKLAS FECOD FEGRP FMGEIG FROM QMFE INTO TABLE STIT1
FOR ALL ENTRIES IN STIT WHERE QMNUM = STIT-QMNUM.
SORT STIT1 BY QMNUM.
The data coming for STIT is correct but not the STIT1.
Edited by: ricx .s on Sep 11, 2008 6:40 AM