2023 Sep 21 10:52 AM
Hi all ABAP expert
I have an OPEN SQL statement, but met failed. the error message is: "@" is not allowed here.
Could anyone advise look below statement? Thanks a lot.
SELECT SINGLE A~MATNR, A~MJAHR, A~CPUDT_MKPF, A~CPUTM_MKPF, A~MBLNR, A~ZEILE, A~LIFNR
FROM MSEG AS A
WHERE A~MATNR = @WB_QMNON100-MATNR
AND A~WERKS = @GS_WERKS
AND A~BWART = @GS_BWART
AND EXISTS
( SELECT B~MATNR, B~MBLNR, B~ZEILE, B~LIFNR, MAX( B~MJAHR ), MAX( B~CPUDT_MKPF ) , MAX( B~CPUTM_MKPF )
FROM MSEG AS B
WHERE B~MATNR = A~MATNR
AND B~MBLNR = A~MBLNR AND B~ZEILE = A~ZEILE
AND B~LIFNR = A~LIFNR
AND B~MJAHR = A~MJAHR
AND B~CPUDT_MKPF = A~CPUDT_MKPF
AND B~CPUTM_MKPF = A~CPUTM_MKPF
GROUP BY B~MATNR, B~MBLNR, B~ZEILE, B~LIFNR )
INTO CORRESPONDING FIELDS OF TABLE @IT_MSEG.
2023 Sep 21 10:58 AM
2023 Sep 21 10:58 AM
2023 Sep 21 10:58 AM