Reputation: 21
I would like to get customer address (street) from one table (kna1) when customer partner role is "WE" in other table (vbpa).
I've done it like this however it returns completely different address from wrong customer. What am I doing wrong?
SELECT SINGLE stras
FROM kna1
INNER JOIN vbpa ON (vbpa-kunnr)
WHERE parvw EQ 'WE'
INTO @zadrwe.
Thank you.
Upvotes: 1
Views: 1411
Reputation: 1290
Your inner Join is not correct.You can use below code to see correct value.
DATA zadrwe TYPE stras_gp.
SELECT SINGLE stras
FROM kna1
INNER JOIN vbpa ON kna1~kunnr = vbpa~kunnr
WHERE parvw EQ 'WE'
INTO @zadrwe.
Upvotes: 6