‎2005 Sep 19 9:50 PM
Hi,
How to do inner join between MARD and MBEW not using matnr. Please provide me with the code also.
Thanks,
Sriram.
Message was edited by: sriram Ponna
‎2005 Sep 19 10:05 PM
‎2005 Sep 20 3:28 AM
What fields do you have? What fields do you need? From SAP program SAPMM07S:
SELECT * FROM V_SLGH_1 INTO TABLE YV_SLGH_1
WHERE WERKS EQ XSBSE-WERKS
AND LGORT EQ XSBSE-LGORT
AND MTART IN RMTART
AND BWKEY EQ WERKE-BWKEY.Rob
Message was edited by: Rob Burbank
‎2005 Sep 20 4:01 AM
Hi Sriram,
Both MARD and MBEW are related to materials. I don't se why you would want to eliminate the material number out of the join. It will give you wrong results. Here is an example.
<u>MARD</u>
MATNR WERKS LGORT
123 6000 STO1
456 6001 STO2
<u>MBEW</u>
MATNR BWKEY ...
123 6001
456 6000
Now, when you join the two tables without using MATNR, using just MARD-WERKS = MBEW-BWKEY, then you will end up selecting the second record for from MBEW for the first record from MARD. This will get complicated if you include storage location.
Why do you want to do it?
Please let us know.
Srinivas
‎2005 Sep 20 7:23 PM
And... what was your solution? I think, posting your conclusion will help the forum.