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

Re: Count of records when using modify statement

$
0
0

I haven't time to test this code below, so you have to rework it a bit but I would try something like this:

 

  SELECT * FROM dbtab INTO temptab
  FOR ALL ENTRIES IN itab
  WHERE field1 = field1
  AND field2 = field2
  AND field3 = field3
  AND field4 = field4.
  old_record_count = sy-dbcnt.
* here use only test key fields
  SELECT * FROM dbtab INTO temptab
  FOR ALL ENTRIES IN itab
  WHERE field1 = field1
  AND field2 = field2
  AND field3 = field3

  AND field4 ne field4.
  changed_record_count = sy-dbcnt.

 

In the second select statement only use the key fields to test equality and make sure the others are NE to get the number of entries that will be changed.

 

Hope this helps.


Viewing all articles
Browse latest Browse all 9080

Trending Articles