Under appropriate commutativity assumptions, smooth control systems that are affine with respect to controls can be extended into classes of generalized controls that contain impulses. We show how to construct generalized Hamiltonian trajectories for the extended system that lift both the continuous and the discontinuous components of candidate optimal trajectories into the cotangent bundle. This construction gives useful insights into the structure of generalized extremal trajectories. lt is also useful from the computational point of view.An example is discussed.