The visa mentions Germany in valid to field.
This means that, for unknown reasons, the visa is only valid for Germany.
You should try to find out why this is so. The reason would have been entered into the VIS information system when the visa was issued.
Visa Code Article 2 Definitions
4. ‘visa with limited territorial validity’ means a visa valid for the territory of one or more Member States but not all Member States;
Visa Code - Annex VII
1.3. When the sticker is used to issue a visa with limited territorial validity pursuant to Article 25(1) of this Regulation this heading is filled in with the name(s) of the Member State(s) to which the visa holder’s stay is limited, in the language of the issuing Member State.
i was stopped and checked by Austrian police who after looking at the visa said it was not valid for travel to other schengen states but only Germany. They later handed me over to Hungarian police, who detained me for few hours, checked my visa, and later released me telling me that I should immediately return to Germany,
This happened since Austria and Hungry were not listed in the valid to field.
Article 25 Issuing of a visa with limited territorial validity
2. A visa with limited territorial validity shall be valid for the territory of the issuing Member State. It may exceptionally be valid for the territory of more than one Member State, subject to the consent of each such Member State.
would the Hungarian authorities have entered this incident in SIS
This is unlikely based on the Alert categories and requirements, since you are allowed to be in the Schengen Area itsself. The reason for the territorial restriction would have been noted in the VIS information system when the visa was issued. As mentioned elsewhere, you would have been informed in writing.
could it result in problems now that I am in the process of applying for blue card in Germany?
After arrival in Germany, you are expected to go to the immigration office so that the granted resident permit can be issued.
There you should ask why the visa was restricted and if that restriction also applies for the residence permit.