What matters is what is on the e-ticket.
If it states EK on the e-ticket then it will not earn on BA.
My point was you can have a ticket issued by one carrier, and flights on that ticket marketed and operated by different carriers. The marketing/operating carrier matters for FF earning.
One e-ticket may create multiple PNR's when more than one carrier is involved and the secondary PNR's may show the carriers flight number rather than the booked codeshare.