‎2010 Nov 16 6:38 AM
Hi all,
I have been writing a query as
SELECT A~MATNR A~MEINS B~WERKS B~XCHPF C~LGORT C~LABST
INTO corresponding fields of TABLE IT_PSET1
FROM ( ( MARA AS A INNER JOIN MARC AS B
ON A~MATNR = B~MATNR )
INNER JOIN MARD AS C
ON B~MATNR = C~MATNR )
WHERE A~MATNR IN S_MATNR " AND B~WERKS IN S_WERKS
AND B~XCHPF <> 'X' AND C~LABST > 0.the db cnt from dis query is 2841
but if I go to se16 and select materials from MARC with XCHPF <> X and
give the output material list as input run of se16 for MARD also giving selection as LABST > 0, then I get db cnt as 3017.
Please help me to resolve this diffrence.
Thanks and regards,
Edited by: Thomas Zloch on Nov 16, 2010 1:07 PM - formatting fixed
‎2010 Nov 16 10:07 AM
Hi Swetha,
You have to folow the same flow what u written in your query . first u will take matnr from mara then u have to pass those materials to marc with your condition. after that u pass these values to mard . you will get the same entries
Edited by: karthikeyanks on Nov 16, 2010 11:11 AM
Edited by: karthikeyanks on Nov 16, 2010 11:15 AM
‎2010 Nov 16 10:16 AM
Hi Swetha,
You have to folow the same flow what u written in your query . first u will take matnr from mara then u have to pass those materials to marc with your condition. after that u pass these values to mard . you will get the same entries
‎2010 Nov 16 11:17 AM
Hi,
In both the above scenario if I pass material number only then I get 3657 values
and if in se16n I pass plant(werks) its giving dump,
but still 3017 is not coming.
‎2010 Nov 16 12:14 PM
Hi
The query seems to be wrong, because the link between MARD and MARC is missing:
SELECT A~MATNR A~MEINS B~WERKS B~XCHPF C~LGORT C~LABST
INTO corresponding fields of TABLE IT_PSET1
FROM MARA AS A INNER JOIN MARC AS B ON A~MATNR = B~MATNR
INNER JOIN MARD AS C ON B~MATNR = C~MATNR AND
B~WERKS = C~WERKS
WHERE A~MATNR IN S_MATNR " AND B~WERKS IN S_WERKS
AND B~XCHPF 'X' AND C~LABST > 0.
Max