One of America's most prolific writers, John Updike reportedly remarked that he wrote "A&P" in 1961 when he was living in Ipswich, Massachussetts. Driving past the A&P, which at that time was the grocery store franchise of America, Updike asked himself, "Why are there no stories that take place inside an A&P?" He proceeded, then, to write one, based upon a glimpse that he had in the store of some girls shopping in the aisles clad only in bathing suits. "They looked strikingly naked," Updike remarked. Originally, the story ended with Sammy going down to the beach to find the girls, but Updike's editor felt that it should end where it does now; Updike agreed.
So, while Updike's story is based upon a real incident, is not factual about the main character, Sammy. However, the readers' identification with Sammy lends it much verisimilitude. Its common themes of teen angst and accepting the repercussions of one's actions give Sammy's thoughts and actions much resemblance to those of many teens, including Holden Caulfield, the protagonist of J. D. Salinger's The Catcher in the Rye.
I have never read or heard anything that suggests that this story is based on any actual event from the life of any real person that John Updike knew of. Because of that, I would say that this story is purely a fictional story.
The story is not really meant to report the facts of something that actually happened. Instead, it is something that Updike has created from his own mind in order to illustrate themes that are important in his mind. Therefore, it does not really matter that this event didn't happen -- we are supposed to simply think about the issues that are raised by the fictional actions of the fictional characters.