You want to print a Data Matrix Barcode through Smartform or SAPScript.
Note 1557674 describes the different possibilities for printing barcodes in SAP:
1557674 - Overview of bar code printing from SAP
If you want to print a data matrix barcode, method 1 and 2 are the only ones which can be used. So either you must have a printer where a barcode module is installed which contains the data matrix barcode, or you need a barcode.dll which contains the barcode.