PURPOSE: To prevent a metallic cap from displacing from a stem substrate by fixing at least one of the substrate and the cap with movable pins at the time of welding the cap.
CONSTITUTION: A stem substrate having external lead wirings 2, 3 which are connected via internal metallic fine wirings to electrodes on a semiconductor pellet is placed on a metallic cap 10, and four side walls 12a, 12b, 12c, 12d of the substrate 12 are interposed via movable pins 14a, 14b, 14c, 14d. Thereafter, they are pressurized by an upper die and are energized. In this manner, the ring-shaped projection 23' of a flange 23 as the welding margin of the cap 10 becomes a melting nugget, is liquefied, thereby preventing the substrate 12 from floating and moving by the viscosity of the nugget and the pressure impact.