AML Coding

I need to find all of the part numbers that have been on a CN that had the part disposition of either "Scrap" or "Repair".

I can find the CN numbers but it doesn't list the affected part part numbers.  How do I get the affected part numbers added to this AML script?