A surgical stapling apparatus having a handle assembly including a movable handle, which is movable through an actuation stroke. An elongated body extends distally from the handle assembly and defines a longitudinal axis. The elongated body having a distal end adapted to releasably engage both articulating and non-articulating disposable loading unit types. An actuation shaft is supported at least in part within the handle assembly and is mounted for longitudinal movement in response to manipulation of the actuation handle. An actuation mechanism includes an articulation lever mounted adjacent the handle assembly and an articulation link. The articulation link has a proximal end operatively connected to the articulation lever and a distal end positioned adjacent the distal end of the elongated body. A
sensing mechanism positioned within the elongated body and is operatively associated with the articulation mechanism. The sensing mechanism includes a sensing member for sensing the type of disposable loading unit engaged with the elongated body.