2021 Jul 30 10:40 PM
Dear All,
I am having below existing query. In this query now I want modification in such a way that
it_eine_latest will retain all values and EKBE will be joined in such a way that in case no entries from EKBE, the column from EKBE will be blank in it_eine_latest and if EKBE has values for EBELN/EBELP then those values should be available.
(D~BUDAT is nothing but EKBE~BUDAT)
SELECT a~infnr
a~ebeln
a~ebelp
a~datlb
a~netpr
a~peinh
b~netpr
c~lifnr
c~waers
D~BUDAT
FROM eine AS a JOIN
ekpo AS b
ON a~ebeln = b~ebeln AND
a~ebelp = b~ebelp
JOIN ekko AS c "ADORNAL CTASK0043115
ON b~ebeln = c~ebeln "ADORNAL CTASK0043115
INTO TABLE it_eine_latest
FOR ALL ENTRIES IN it_eina
WHERE a~infnr = it_eina-infnr AND
( a~esokz = '0' OR a~esokz = '3' ) AND " Std Order⋐con
a~bstyp = 'F' AND " PO
b~loekz = space AND
( b~pstyp = '0' OR b~pstyp = '3' )
AND c~bsart = 'NB'.
I will be thankful for kindly helping with above query.
Regards.
2021 Jul 31 7:30 AM
Thanks Sandra Rossi for replying.
LEFT OUTER JOIN on EKBE is the solution.
2021 Jul 31 4:16 AM
In your query, there are other tables joined, so I guess it's easy to do the same for EKBE. Did you try? If yes, what is your issue?
NB: I see other alike questions in the forum with some nice answers:
join EKKO EKPO "EKBE" site:sap.com
2021 Jul 31 7:30 AM
Thanks Sandra Rossi for replying.
LEFT OUTER JOIN on EKBE is the solution.