Hi, anybody know how can i check 525tds pump and ecu codes

I bought e34 but the injector pump is bad and previous owner changed the pump but car still doesnt run
The pump it has on is 995, but maybe it needs 994 pump.
So maybe i can read it out from the ecu code what pump it needs?
Thanks