2007 Mazda2 (Demio) Engine replacement questions...Help!

Hi, hope I get some help here.
My mazda demio (mazda 2) 2007 engine is completely dead and I want to replace it. Its code is ZJ-VE (1.3cc) and I just got a ZY (1.4cc)
Is it going to work? Is my ecu going to support that ZY engine though it was made for ZV?
N.B : I live in a area where mazda 2 spare parts are so rare and that ZY engine is the best I could get and it coming without its complete wiring and ECU, so I have to install it with my ZV ECU and wiring (they look the same).
 
Back