Skip to Content
Author's profile photo Lars Hvam

Device-Independent Datamatrix in Smartforms, Proof of Concept

Lately SAP note 2001392 has been released that allow printing of Datamatrix for some device types. There are also fonts and other 3rd party tools that allows you to print a datamatrix.

However most of these solutions have some specific requirements, as a workaround to this I created a proof of concept that allows for printing a datamatrix with minimal requriements.

The solution uses 2 tricks:

Only 10×10 datamatrices have been implemented, allowing it to contain up to 3 characters.

The code can be downloaded from https://github.com/larshp/Datamatrix

To test, run the report

/wp-content/uploads/2014/11/1_596905.png

and it will show the smartform as print preview

/wp-content/uploads/2014/11/2_597125.png

The smartform consists of a 10×10 template where the background colour of each cell is changed from ABAP,

/wp-content/uploads/2014/11/3_597126.png

This technique can be extended to QR, aztec and other 2d barcode symbologies.

Note: Do not regard this as best practice, however in some situations it might be beneficial to use this approach.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Lars,

      Nice one..!!!!!

      I was really searching for it..!!!!!!!!!!!

      Thanking You All.

      Author's profile photo Lars Hvam
      Lars Hvam
      Blog Post Author

      Note this only works for 10x10, ie. 3 characters. Extending it can be done, but it will take some time. I currently dont have any use for this example, so I'll not be looking into extending it.