shall be commenced within two years next after a cause of action accrues or arises, and not thereafter. Notwithstanding the foregoing, no relief can be granted on any cause of action which accrues or would have accrued more than seven years after the substantial completion of construction of the improvement on or to the real property, and any right of action which accrues or would have accrued more than seven years thereafter is barred, except where prior to the expiration of such seven-year period, the architect, engineer, or builder had actual knowledge that such defect or deficiency exists and failed to disclose such defect or deficiency to the person with whom the architect, engineer, or builder contracted to perform such service.
Ala. Code § 6-5-221 (1975)