Just to add to JS55's response; the annex in the back of the construction code will indicate what group the base metal belongs to, i.e., A, B, C, D, to properly use the graph in the code. So, four factors:
1) The applicable construction code,
2) Base metal group (different from the P-number found in Section IX),
3) Lowest anticipated service temperature (from the engineer), and
4) Thickness of the base metal being welded.
The construction can severely limit the base metals qualified for production based on the P-number and the group number of the base metal used when qualifying the WPS. In the case of B31.3 high pressure fluid service, the WPS is limited to the base metal specifications used when qualifying the WPS.
Best regards - Al