How about the map $f:\mathbb{Z}\to\mathbb{Z}\oplus(\mathbb{Z}/2\mathbb{Z})$ given by $f(n)=(2n,n)$?

Or for a finite example, the same idea works with a map $\mathbb{Z}/4\mathbb{Z}\to(\mathbb{Z}/8\mathbb{Z})\oplus(\mathbb{Z}/2\mathbb{Z})$.

Or if you want neither term to be indecomposable, the map $(m,n)\mapsto(2m,m+2n,n)$ from $(\mathbb{Z}/16\mathbb{Z})\oplus(\mathbb{Z}/4\mathbb{Z})$ to $(\mathbb{Z}/32\mathbb{Z})\oplus({\mathbb{Z}/8\mathbb{Z}})\oplus(\mathbb{Z}/2\mathbb{Z})$.

For example, in the third case, the cokernel of the map is cyclic of order 8, and in particular indecomposable. So if the complex decomposed, the map in one summand would have to be an isomorphism, which is impossible since the two terms of the original complex have no summands in common.