Material Number Format in SAP

Goto IMG path>Logistic general>Material Master>Basic settings>Define output format of article Numbers

or directly check in Tcode: OMSL

or see table  V_TMCNV  in transaction SM30.

where you will see the “Article No. Length:18 (If not defined set there) and check in your template also. In Standard SAP Maximum 18 characters are allowed.