Employee was helping install a large pin in the bucket door for the 2800 P&H electric shovel. During the process, he was using a 20-pound sledgehammer & while striking the pin, a piece of metal flew off (pin), striking & penetrating his inside upper left leg. The piece of metal was successfully removed at the hospital the same evening; laceration required stitches.