I have. Once with CPVC (can't recommend this type of plumbing, but it's what the house had) and two with sweated copper.
Nothing difficult at all about it, but if you're doing a gas heater, it helps to understand how gas unions work and helps to have a variety of sizes of pipe nipples handy to prevent multiple trips to the hardware store. For gas exhaust stacks, make sure you get things lined up correctly and use refractory cement (not regular cement) if you're joining to a masonry chimney.
For sweated copper joints, don't solder the final connections with the fittings threaded onto the (likely plastic) nipples on the tank, you need to get all the water out of the lines you're soldering, and you need a place for the steam to escape if you're soldering partly wet lines. (If you don't, the steam will escape through the molten solder that you're trying to close up the joint with, and you'll never get it soldered.)