Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

ABAP 'EXISTS' with variables

$
0
0


Hi ABAP, I need help on the following simple scenario:

 

  • I want to count all the records in my TARGETTABLE that TARGETCOLUMN entries exist in SOURCECOLUMN in my SOURCE TABLE
  • all of them have been defined as variables

 

SELECT COUNT( * )

  FROM (TARGETTABLE) INTO F1

  WHERE (TARGETCOLUMNCONDITION)

*Its working up to this point, but the following where clause does not work

    AND EXISTS ( SELECT *

                  FROM (TARGETTABLE)

                  WHERE (TARGETCOLUMN) = (SOURCETABLE)~(SOURCECOLUMN) ).

 

 

Error message: "Incorrect expression "=" in logical condition

 

Got the subquery from: https://help.sap.com/saphelp_nw04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm

 

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>