temperature in a room is simple physics. the number of joules of energy you put in, regardless of temperature or source, makes the room hotter. light bulbs, gas furnaces, candles, all add heat energy to the room. similarly, every joule you remove makes the room colder. this is usually due to heat loss through walls, doors and windows. it can be radiative, convective, conductive, etc. type heat loss but its all the same end result: cooling. now, since you have to pay for that loss, the real question is rate of loss.
if the rooms heat retention is really thermally inefficient, the room will cool quicker. less so the better it is at holding heat. in a building, the rate of equilibration with the exterior ambient temperature is a function of various things, such as thermal mass, insulation, air tightness, etc., but once it hits ambient, its not going anywhere other than tracking with the ambient temperature.
so if you turn off your heat and leave for a half day, and the flat takes 1 day to cool to ambient, there is residual heat energy in the flat. this means you have to put less heat energy into it to bring it back to your desired temperature, thus you spend less money to do so. if you leave for 10 days, the room already cooled down as far as it was going to go in the first day. for the ensuing 9 days, no net energy was required to be inputted into the system. when you come back, you will have to add the exact same energy to bring the system back to desired temperature as you would have on day 2,3,4, etc.
so its plain to see that it would be cheaper to turn the heat off if you are going to be gone for longer than the time it takes the flat to cool to ambient. however, there are other things to consider: pipes can burst (costly), repeated thermal cycling of a space can lead to expansion/contraction/condensation (all of which can lead to broken windows, corrosion, etc. costly).
in general, residential single dwelling units are designed to be optimally maintained at normal human comfort levels of humidity and temperature (around 30% humidity and 20 deg c). you can lower this down to about 5 deg c (measured at the coldest sustained point in the structure, not at the thermostat) pretty reliably, but I wouldn't go below that.
assuming that you have time-of-use costing for heating utilities in Germany (its normal here in Canada), you could minimize your costs by having your heating system run only during the cheapest times (with a programmable thermostat)