You can generate Data Matrix with the help of a Barcode DLL
You need to use a SAPWIN based device type (SWIN, SWINCF...) in SPAD.
You need to extend your SAPgui or SAPsprint with a Barcode DLL (e.g. TEC-IT TBarCode/SAPwin).
You need to add a new system bar code (e.g. ZDATMAT1) to your SAP system (SE73).
You need to add a new printer bar code for ZDATMAT1 to your device type (SE73).
Barcodes are embedded as usual via character formats / styles into your SmartForm.
25344 - Interface SAPSprint (SAPFprint) barcode DLL