2015 Oct 10 5:00 AM
PROBLEM IN SELECT QUERY.......
SELECT MATNR BANFN BNFPO MATKL ERNAM AFNAM BADAT MENGE
FROM EBAN INTO CORRESPONDING FIELDS OF TABLE IT_EBAN
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR
AND WERKS IN SO_PLANT
AND STATU = 'N' " PO, SA not released, N--edit
AND LOEKZ <> 'X' " Not deleted
AND FRGZU <> ' '. " Not released
not fetching all records from EBAN corresponding to MARA TABLE
2015 Oct 10 5:22 AM
Hi,
Please check is there duplicate entries in EBAN table because 'For all entries' clause delete the duplicate entries.
Regards
Ajay Goel
2015 Oct 10 5:22 AM
Hi,
Please check is there duplicate entries in EBAN table because 'For all entries' clause delete the duplicate entries.
Regards
Ajay Goel
2015 Oct 10 7:51 AM
BUT
SELECT *
FROM EBAN INTO CORRESPONDING FIELDS OF TABLE IT_EBAN
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR
AND WERKS IN SO_PLANT
AND STATU = 'N' " PO, SA not released, N--edit
AND LOEKZ <> 'X' " Not deleted
AND FRGZU <> ' '. " Not released
fetching all records and we needs all records also duplicate. so i am confuse why
this query not working
SELECT MATNR BANFN BNFPO MATKL ERNAM AFNAM BADAT MENGE
FROM EBAN INTO CORRESPONDING FIELDS OF TABLE IT_EBAN
FOR ALL ENTRIES IN IT_MARA
WHERE MATNR = IT_MARA-MATNR
AND WERKS IN SO_PLANT
AND STATU = 'N' " PO, SA not released, N--edit
AND LOEKZ <> 'X' " Not deleted
AND FRGZU <> ' '. " Not released
2015 Oct 10 7:58 AM
Hi,
Because if you are selecting with * then all the fields are fetching and all the values can not be same for all fields but if you are taking only selected fields then values of all theses fields are same then it will drop all duplicate records. So use one columns which should be different in all records.
Regards
Ajay