Hi guys, I need a help.
I need to have a SELECT with primary key WERKS but one of my tables don't have WERKS, but it's possible with LIPS make a "Join" and have a link between all tables that i have. I made two select's but something is wrong, because the result isn't what i exepect.
This is part of the code:
SELECT * FROM zsd_qmel_lips
INTO CORRESPONDING FIELDS OF TABLE lt_itens
FOR ALL ENTRIES IN lt_qmnum
WHERE qmnum EQ lt_qmnum-qmnum AND
matnr IN s_matnr AND
motiv IN s_motiv.
RP/HP (04.0608): Restricção por Centro
SELECT ivbeln iposnr kkunnr imatnr inetpr kwerks
FROM likp AS k INNER JOIN lips AS i
ON kvbeln = ivbeln
INTO TABLE lt_lips
FOR ALL ENTRIES IN lt_itens
WHERE k~vbeln EQ lt_itens-vbeln AND
i~posnr EQ lt_itens-posnr AND
k~werks EQ l_werks.
Could you help me ?