Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

What's wrong with the ABAP OPEN SQL?

0128903
Discoverer
0 Kudos
330

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.

1 ACCEPTED SOLUTION

0128903
Discoverer
0 Kudos
276

Sorry, I got it.

It did not need "SINGLE" , Thanks.

2 REPLIES 2

0128903
Discoverer
0 Kudos
276

Sorry, I got it.

It did not need "SINGLE" , Thanks.

0128903
Discoverer
0 Kudos
277

Sorry, I got it.

It did not need "SINGLE" , Thanks.