Originally a play, the ending was changed for the film. According to the Wikipedia entry: "In the stage version, she has the abortion late in the pregnancy, resulting in her inability to bear any more children, as well as David's estrangement from the family."
The role of David was played on stage by Jason Gould, the openly-gay son of Barbra Streisand and Elliot Gould.