As the flight between Berlin and Vienna is an internal Schengen flight, you do not cross border checks till you are ready to leave Vienna (or move from the Schengen area of the airport to the international part.)
So you can just walk out of the airport.
(It is possible but extremely unlikely that you have a visa for just Germany that does not allow you to transit through Austria, but in that case you can not use the route at all. So no need for a Schengen or Austria visa.)
Remember to leave enough time for passport and security checks, specially if you travel in a busy period. If you are not EU/EEA European, you should get a stamp in your passport in Vienna, not in Berlin.
On the way from Tokyo to Berlin you need to go through immigration (passport checks) in Vienna, but you can do that in the 'leaving the airport' stream of passengers as easily as in the 'connecting flight' stream.
When you hand in your luggage (if any) check that it is send on to your final destination, so you will not have to collect and hand in again in Vienna. (With an 8 hour stop it is rather likely that the usual is to send the luggage on.)