P-Nos.
In order to reduce the scope of welding & brazing procedure requirements, all the materials included in ASME boiler and pressure vessel code have been assigned P-numbers. Under one P-number, all those materials which may exhibit the same properties while welding or brazing have been included so same welding or brazing requirements would be applicable to all of them as per ASME Sec. IX.
S-Nos.
These are the listing of those materials which have been included by ASME B31 code or by selected ASME boiler and pressure vessel code cases but are not included in ASME boiler and pressure vessel code material specifications (ASME Sec. II). Purpose is the same as of P-numbers.
Just for the information, any material with prefix "SA" shall have a P-number, as "S" authenticates that this specific ASTM material has been listed in ASME Sec. II. And where "S" would be absent, that material should have a S-number instead of P-number as not listed in ASME Sec. II.
For further information, see ASME Sec. IX QW-420.
You can refer to QW-422 (Ferrous P-number & S-numbers).
There you will find some materials with prefix "A" not "SA". Those materials have S-numbers.
For example, A-108 does not have a P-number, instead having an S-number. Same goes for A-139, A-167, A 182 Gr. F6a Cl. 3 etc.