Please refer ASME BPVC.IX Clause QW-420: Base Metal Grouping. Following for your reference.
P‐Numbers are assigned to base metals for the purpose of reducing the number of welding and brazing procedure qualifications required.
P‐Numbers are alphanumeric designations: accordingly, each P‐Number shall be considered a separate P‐Number (e.g., base metals assigned P‐No. 5A are considered a separate P‐Number from those assigned P‐No. 5B
or P‐No. 5C).
In addition, ferrous base metals have been assigned Group Numbers creating subsets of P‐Numbers that are used when WPSs are required to be qualified by impact testing by other Sections or Codes.
These assignments are based essentially on comparable base metal characteristics, such as composition, weldability, brazeability, and mechanical properties, where this can logically be done. These assignments do not imply that base metals may be indiscriminately substituted for a base metal that was used in the qualification test without consideration of compatibility from the standpoint of metallurgical properties, postweld heat treatment, design, mechanical properties, and service requirements.
For further details refer mentioned code.