Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8526

Re: Dump using Dynamic WHERE condition (EXISTS + subquery)

$
0
0

Hi Shelwin !

 

Testing your code i dont have dump, using this:

 

sql.png

 

report z_test message-id z_test_msgs.
data: lt_where_tab1 type standard table of edpline with header line,      lt_where_tab2 type standard table of edpline with header line,      gt_detail     type standard table of caufv with header line.
move 'EXISTS ( SELECT J_1~STAT' to lt_where_tab1.
move 'FROM JEST AS J_1 INNER JOIN TJ02T AS T_1' to lt_where_tab1.
move 'ON J_1~STAT EQ T_1~ISTAT' to lt_where_tab1.
move 'WHERE J_1~OBJNR EQ CAUFV~OBJNR' to lt_where_tab1.
move 'AND J_1~INACT EQ '' ''' to lt_where_tab1.
move 'AND T_1~SPRAS EQ ''E''' to lt_where_tab1.
move 'AND T_1~TXT04 EQ ''CRTD''' to lt_where_tab1.
move 'NOT EXISTS ( SELECT J_2~STAT' to lt_where_tab2.
move 'FROM JEST AS J_2 INNER JOIN TJ02T AS T_2' to lt_where_tab2.
move 'ON J_2~STAT EQ T_2~ISTAT' to lt_where_tab2.
move 'WHERE J_2~OBJNR EQ CAUFV~OBJNR' to lt_where_tab2.
move 'AND J_2~INACT EQ '' ''' to lt_where_tab2.
move 'AND T_2~SPRAS EQ ''E''' to lt_where_tab2.
move 'NOT EXISTS ( SELECT J_2~STAT' to lt_where_tab2.
move 'AND T_1~TXT04 IN (''TECO'' , ''DLFL'', ''DLV'', ''CLSD'')' to lt_where_tab2.
select aufnr ftrms gltrs  from caufv  into corresponding fields of table gt_detail
where (lt_where_tab1)   and (lt_where_tab2).

 

Regards,


Viewing all articles
Browse latest Browse all 8526

Trending Articles



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