Originally Posted by
cygnus
... you will go through immigration at your first stop in Europe, while customs inspection will happen at your final destination.
Slightly incorrect. AFAIK, customs inspections take place both when entering the Schengen area and when arriving at your final destination within the Schengen area.
Just after entering the Schengen area, you are supposed to declare any declarable goods, that you carry in your carry-on. When arriving at your final destination (i.e. the place you are reunited with your checked luggage), you'll need to declare the declarable goods in your checked luggage.
That's as far as the theory goes. In practice, there's usually an empty desk just behind immigration and you have to ring somebody to arrive. I've never seen anyone declare something there. All of this is of course irrelevant to the OP as he probably won't need to declare anything.
---
Your bags are checked thru automatically if you bought the journey on a single ticket. You'll have to go thru immigration in Berlin and - provided you booked everything on 1 ticket - will just have to walk to the next gate and eventually go thru security again.