Janos,

Yes, what I'm trying to do, for example, is if someone submits an RITM for a specific software title and also an RITM for an iphone on the same REQ, I only want the CorrID field to count the software title (in my example that title has a sys_id of 566ff7371ba2601064c8a686624bcb98). So in this example the REQ would have a CorrID of 1 and not 2.

The first code you provided generated a CorrID of 111 which is the total of all RITMs for that sys_ID. The revised code did not generate anything in the CorrID field.

Thank you.