Refer to ASME Section VIII, Div. 1, 2004 Edition, Appendix 2, Paragraph 2-11. You could iterate the formulas backwards until the limiting maximum allowable code stress is obtained to determine the MAWP for external pressure conditions.
Also, remember that these calculations are for stress compliance checks only and do not necessarily assure leak tightness. Appropriate means, using analytical evaluations coupled with experience shall be used to assure leak tightness at the calculated external MAWP.
Paul