If the pipe was for a toilet, there is no trap under the floor and sewer gas can enter. No real need to disconnect it from the drainage system. I would cut a piece of wood that will wedge into the hole and use hydraulic cement. Leave a bit of room near the top for a finish coat of cement.
if you have never made a mistake, you probably haven't done much.