I've only seen the movie once, didn't particularly care for it. Mainly because of the actions of the American troops seemed quite "off" for an experienced Ranger unit. [If I have this confused with another movie, let me know...been a few years....] IIRC, the Rangers supposedly fought in North Africa and Italy as well (isn't there a guy collecting sand or something?). Anyway, besides that, they are supposed to be Rangers, yet all the actions of the troops shows them to be a bunch of belly-aching, sniveling little girls, bitching the entire time about the mission. Personally I do not think this was realistic, and I doubt that many Allied units were as jaded about the war during June 1944 as these guys were portrayed.
Anyway...to mortar rounds....
When a mortar round is fired, the firing pin in the weapon strikes an ignition primer. The purpose of this primer is (only) to ignite the charges that will propel the round downrange. This mechanism is distinct from the fuze mechanism that "arms" the round. In fact, if a person holding the round struck the primer on a firing pin, it would have ignited the ignition charge and cooked the throwers hand pretty well.
(I apologize for the incorrect terminoly here...been a few years since I looked at a diagram of a round....)
Inside the fuze on the nose of the round, there is a hollow kind of "tube" inside. There is a mechanism (I'll call it is 'blocking cylinder" here) that will slide within this tube. When the cylinder is towards the nose, the round is "safe." The blocking cylinder may be held in place by the "safety wire" which is inserted into the nose of the round and holds it in place. (Not all modern rounds have a safety wire - one reason why if you drop an M720 60mm HE round more than 10 feet you are not supposed to use it). Once the wire is removed, the cylinder can slide relatively freely inside the tube.
To arm the round, this cylinder must slide towards the back end of the round. Usually this occurs when the projectile is fired. Similar to the driver of a car being pressed back into the seat when a car accelerates, the projectile is accelerated very quickly towards the end of the tube (from 0 meters per second up to maybe 250 meters per second)...this causes the blocking cylinder to slide to the rear.
So, in SPR, removing the safety wire, thumping the round on the ground would provide a "jolt" strong enough to shift the cylinder, arming the fuze. No real problems with the theory. The problem (as others have pointed out) is that the fuze (nose of the round) would need to strike something in order for the round to go off. This is why mortars do not usually fire at elevations less than 45 degrees - the round will land "flat" on the side and will skip along the ground without detonating....
[Aside: Most "interesting" moment I had during Desert Storm was when a 120mm mortar pit was taken out by CAS. An HE round got blown out of the position and came spinning towards us...seemed about 6 feet of the ground, in a flat spin...not going too fast...just slow enough to think "Hey, that's a 120 HE round coming towards us....Hmmmm, this could taste like $hit." Nothing we could do but watch it...wonder if the fuze would strike anything...and if the round had the safety wire in. Fortunately the wire was in it still...and it did not hit anything other than sand. Landed about 30 feet away and skidded flat across the sand. Anyway, back to our story....]
An additional safety feature: Once the blocking cylinder has moved towards the rear, a spring loaded "shear pin" (more like a "button" today) inside the round will be pushed out of the round. While inside the mortar tube, this pin cannot be ejected. Once the round leaves the muzzle of the tube, the springs ejected this last safety pin (one of the reasons that mortar crews for many mortar systms duck their heads below the level of the muzzle - so they do not get hit by this pin) and the round is fully armed. (This feature has evolved to where the pin is not actually ejected from the round, it simply pops out of the side slightly...enough to arm the round but not affect the flight of the round or pose a hazard.) One of the reasons that a "dud" may occur is if this mechanism does not function properly.
As others have pointed out, there are a couple of people who used mortar rounds like grenades unders duress. Fully plausible, especially from a higher elevation, or in an urban environment where the fuze could also strike a vertical surface and detonate.
Hope this has been interesting for those who care.