I'm assuming you mean that CBAB and CBDB engines? They are both EA189 engines and as such have identical engine blocks, cylinder head and camshafts. They're both 2.0 Common Rail Diesel engines with 140bhp and they both appeared in 2008 Passats, Tiguans and Golfs.
I'm not sure what the difference between the engines is but suspect it may be to do with emissions control or fuel economy systems. It may be something as simple as the alternator is different. I know that this group of engines has three different shaped fuel filter housings for example. It is most likely that the difference is an minor as this.
The facts are that the engine will fit on your existing engine mounts, will connect to your gearbox bell housing, will bolt onto your existing exhaust and inlet manifolds. You may find that a couple of ancillary items such as the plug on the back of the alternator or some of the temperature sensors differ slightly but because you have your old, damaged engine, you can swap any different ancillary items over to the new engine.