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

Re: Count of records when using modify statement

$
0
0

Cont. to my previous comment,

 

To get the count of records already existing in DB table matching to records in internal table, you can use following statement:

 

SELECT COUNT( * ) INTO L_COUNT FROM DB_TAB

                               FOR ALL ENTRIES IN INT_TAB

                               WHERE KFIELD_1 = INT_TAB-FLD1 AND KFIELD_2 = INT_TAB-FLD2.

IF SY-SUBRC = 0.

     " you will get no.of records existing already in L_COUNT.

ENDIF.

 

Then find the Total No.of records in your internal table (Describe Table) into L_LINES.

 

Modified_records = L_LINES - L_COUNT.

 

Regards,

Vijay


Viewing all articles
Browse latest Browse all 8807

Trending Articles



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