A substrate processing apparatus has a transfer mechanism arranged on a
transfer base and configured to transfer a processing substrate between
predetermined transfer positions, a mapping sensor arranged on the
transfer base and configured to detect an arrangement state of a
processing substrate inside a processing substrate accommodating case
which accommodates a plurality of processing substrate in a shelf-like
form, and a Z-axis teaching jig provided on or in the vicinity of one of
the transfer positions. This substrate processing apparatus detects, by
the mapping sensor, a height of the Z-axis teaching jig so as to perform
teaching of Z-axis to the transfer mechanism with respect to the one of
the transfer positions.