2022 Aug 18 11:19 AM
hi all
I'm trying to transform these 2 selects query into a signle query with inner join or join ! (don't know what i should use).
thanks.
SELECT SINGLE reference
FROM e070a
INTO lv_reference
WHERE trkorr EQ ls_result-trkorr
AND attribute EQ 'lc_scp'.
IF sy-subrc EQ 0.
SELECT SINGLE externalid
FROM ctsproject
INTO ls_result-externalid
WHERE trkorr EQ lv_reference.
IF sy-subrc EQ 0. ENDIF.
ENDIF.
2022 Aug 18 11:30 AM
Hi
SELECT SINGLE externalid
FROM ctsproject as a INNER JOIN e070a as b on a~trkorr EQ b~reference
INTO ls_result-externalid
WHERE B~attribute EQ 'lc_scp' AND
B~TRKORR EQ LS_RESULT-TRKORR.
Regards,
Venkat
2022 Aug 18 11:30 AM
Hi
SELECT SINGLE externalid
FROM ctsproject as a INNER JOIN e070a as b on a~trkorr EQ b~reference
INTO ls_result-externalid
WHERE B~attribute EQ 'lc_scp' AND
B~TRKORR EQ LS_RESULT-TRKORR.
Regards,
Venkat
2022 Aug 18 12:52 PM
2022 Aug 18 12:35 PM
If your question is "what is the difference between inner join and join", the answer is none. JOIN is the short form of INNER JOIN, but I think it's best to use INNER JOIN to not confuse with other forms of joins (left (outer) join, right join, cross join).
2022 Aug 18 12:55 PM
sandra.rossi it wasn't my question but thanks for the explanation.