Looks like there's a missing space in between <cfloop ...> and query. Correction
<cfloop query="getberuf">
<cfset form["Beruf_"& currentrow] = Beruf_ID >
<cfset form["getsubfirst_"& currentrow = BerufSubFirst_ID >
<cfset form["getsubsecond_"& currentrow] = BerufSubSecond_ID >
</cfloop>