ASTM provides, amoung other things, material specifications, such as A516. The A is for ferritic materials.
ASME provides codes and standards, and the ASME Boiler and Pressure Vessel Code includes material specifications for use with that Code, in Section II of the Code. They adopt, and sometimes modify, the ASTM specifications, and the number of the ASME specification begins with an S, e.g. SA516. These are specifications approved for use with with the ASME Boiler and Pressure Vessel Code.
You can get dual stamped (e.g. A516/SA516 materials) indicating compliance with both specifications.