2018 Feb 01 10:53 AM
Dear Experts,
we have a small Code which works perfectly fine, however only in the upgraded System with the new SQL/Left Join Features a.s.o. We need to "translate" it into the obsolete Open SQL and joins quiery. Here is the Code:
SELECT mara~matnr,
makt~maktx,
mara~mtart,
mara~matkl,
marc~werks,
mard~lgort,
mard~lgpbe
INTO table @lt_nl_itab
FROM mara left JOIN marc ON ( marc~matnr = mara~matnr )
left JOIN makt ON ( mara~matnr = makt~matnr )
left JOIN mard ON ( mard~matnr = mara~matnr )
WHERE mara~matnr IN @so_matnr and marc~werks IN @so_werksand and mara~mtart IN @so_mtartand and mara~matkl IN @so_matkland and mard~lgort IN @so_lgortand and mard~lgpbe IN @so_lgpbe.
Thank you so much.
2018 Feb 01 10:54 AM
2018 Feb 01 11:48 AM
Just delete the @s in front of the variables and the "," (comma) in the selection list. Should work in older systems.
2018 Feb 01 7:22 PM
Also add WHERE makt~spras... otherwise be prepared for a BIG surprise when another language gets installed in the system. mard~werks condition wouldn't hurt either.
2018 Feb 01 8:03 PM
@Uwe: it will only solve the Syntax issue. Left outer join still won't allow using Parameters from the right table in Where condition.
2018 Feb 01 3:15 PM
7.45 and 7.21 !? kernel versions? But you only have ABAP 7.5x, 7.40, 7.02, 7.31 (possibly 7.03, 7.1 or 7.2, etc.), cf ABAP News for Release 7.40