I haven't reached that point yet in my story, so I can't talk from any kind of experience, but I think it boils down to how well thought out the ending is. Note that this ending isn't necessarily of the entire book, it can be of the volume, the arc, etc.
I have done that for the entire book, thus have a rough image of how long its going to be and what each volume will roughly contain, and did the same with the current volume I am working on. Before I begin writing the first chapter of the volume, I think to myself and create bullets for which stuff should happen and which I want to happen. The moment I begin writing the first chapter I already have a plan as to how I am going to end up in the bullet, but have it open enough to allow change in case I find a better idea. That has worked well for me.
My problem (mostly) lies in my inexperience as a writer, and that's what I am currently working on, so it will take some time to fix, but I'm going to end it here, because I'm going off topic.
Cheers!