Method for teaching-in a gear shift drum in a hybrid drive train, wherein the hybrid drive train comprises a first drive machine in the form of an internal combustion engine and a second drive machine in the form of an electric machine and a gear arrangement which is connectable to the first drive machine via a shifting element, and which is connectable or connected to the second drive machine, wherein the gear arrangement comprises a gear input shaft and a gear output shaft and a multiplicity of gearwheel stages arranged in between in the form of gear sets (40, 46, 56) which are designed to be shifted via assigned shifting elements (K1, K2, K4), wherein the shifting elements (K0, K1, K2, K4) are shifted via at least one shifting apparatus comprising a shifting roller, characterized in that the at least one gear shift drum comprises a gear shift drum body which can be rotated endlessly around a gear shift drum axis in a first and a second direction of rotation, and has a circumferential shifting contour on the perimeter of the outer surface, with the following method steps: - turning the gear shift drum into a first shifting state corresponding to a neutral position of the gear arrangement, - generating a low speed by means of the electric machine, which results in a differential speed on at least two shifting elements (K0, K2) of the gear arrangement, - turning the gear shift drum in a first direction of rotation to a second shifting state, wherein a first shifting element is shifted at the differential speed, with the result that the electric machine is suddenly braked to zero, wherein a speed signal of the electric machine is generated and this speed signal is assigned to a first corresponding reference position/rotation angle at a rotation angle of the gear shift drum as a virtual end stop, - turning the gear shift drum back to the first shifting state, - generating a low speed by means of the electric machine, which results in a differential speed on at least two shifting elements (K0, K2) of the gear arrangement; and - turning the gear shift drum in the second direction of rotation into a further shifting state, wherein a second shifting element is shifted at the differential speed, with the result that the electric machine is abruptly braked to zero, wherein a speed signal of the electric machine is generated and this speed signal is assigned to a second corresponding reference position/rotation angle at a rotation angle of the gear shift drum as a virtual end stop. - turning the gear shift drum into a first shifting state corresponding to a neutral position of the gear arrangement, - generating a low speed by means of the electric machine, which results in a differential speed on at least two shifting elements (K0, K2) of the gear arrangement, - turning the gear shift drum in a first direction of rotation to a second shifting state, wherein a first shifting element is shifted at the differential speed, with the result that the electric machine is suddenly braked to zero, wherein a speed signal of the electric machine is generated and this speed signal is assigned to a first corresponding reference position/rotation angle at a rotation angle of the gear shift drum as a virtual end stop, - turning the gear shift drum back to the first shifting state, - generating a low speed by means of the electric machine, which results in a differential speed on at least two shifting elements (K0, K2) of the gear arrangement; and - turning the gear shift drum in the second direction of rotation into a further shifting state, wherein a second shifting element is shifted at the differential speed, with the result that the electric machine is abruptly braked to zero, wherein a speed signal of the electric machine is generated and this speed signal is assigned to a second corresponding reference position/rotation angle at a rotation angle of the gear shift drum as a virtual end stop.