We present a phase reconstruction scheme for X-ray near-field holographic imaging based on a separability constraint for probe and object. In order to achieve this, we have devised an algorithm which requires only two measurements - with and without an object in the beam. This scheme is advantageous if the standard flat-field correction fails and a full ptychographic dataset can not be acquired, since either object or probe are dynamic. The scheme is validated by numerical simulations and by a proof-of-concept experiment using highly focused undulator radiation of the beamline ID16a of the European Synchrotron Radiation Facility (ESRF).