If the pipe is modeled as a solid, it has a planar face at each end. If the pipe is modeled as a surface, it has a circular edge at each end.
Create a Remote Displacement (type = Deformable) on one end (face or edge). Set all six components to 0.
Create a Remote Force (type = Deformable) on the other end (face or edge). Type in the force in the component direction that is axial and leave the others as 0.