I'm not sure I am understanding the question as I can think of three different ways the answer could go. That being said, I will give you all 3 answers.
If you are asking how you would do bi-directional flow from an axial piston pump with the drive shaft turning in one direction of rotation then you would look at a Closed Circuit Hydrostatic Transmission pump which allows the swashplate to "go over center" which changes the flow from the unit: what was the outlet now becomes the inlet and what was the inlet now becomes the outlet.
If you are asking how do you change the direction of rotation on an axial piston pump then you typically would have to change the controls as well as the valve plate inside which has provisions for the new timing.
If you are looking to drive the pump shaft in both directions and have it act as a pump in both cases would require a number of modifications depending on the pump's design and manufacturer's requirements.