During last year, it was interesting to learn about QR Codes and I was very very happy when able to generate them directly from ABAP. It was a pleasure to host, at SAP TechEd 2010 in Berlin, the session CD119 – Introducing QR-Codes in Your SAP System (download).
I presented there three ways, in add to the Adobe Form, to generate QR Codes from ABAP:
- calling the command line open source library Libqrencode
- calling the open source Java class ZXing (Zebra Crossing)
- calling the free Google Chart API
Great blog by Robert about the use of ZXing (Zebra Crossing)
I was happy to read the great blog Generating QR codes with a Zebra Crossing in the Java stack by the Active Contributor Robert Russell that describes in detail the related how-to.
Another new encoding approach from Robert based on Postscript
But the power of the SDN community was even more evident once Robert in his fantastic blog Barcodes in SAP with the Barcode Writer in Pure Postscript. proposed another completely different approach based on Postscript.
Working together via SDN (wiki, code exchnage)
Since I believe we’re just at the beginning, I extended the use of the SDN platform taking advantage also of the Wiki and the Code Exchange to prepare for a better collaboration.
Wiki Mobile Tagging
About wiki, we created the page http://wiki.sdn.sap.com/wiki/display/EmTech/Mobile+Tagging to collect materials related to QR Codes but also the other similar technologies:
Code Exchange project abap2qrcode
In Code Exchange indeed I created the project abap2qrcode where you can find the HTTP Handler class (/nSICF) I propose to use as a generic method to generate QR Codes together with the ABAP class that wrap Google Chart API making you the life easier.
The HTTP Handler accepts typical QR Code parameters and it could be easily enhanced to call any new ABAP Class that will represent another generation option.
The URL parameter “t” (type), for example, could be used to specify the type of encoding to be used. “gc” stands for Google ChartAPI, “jzx” stands for the implementation based on ZXing Java Encode.
Have a look to ABAP class ZSDN_QRCODE_ICF_HANDLER (available in the various .slnk files fo the project) to get a better understanding.
In the project you’ll also find a Web Dynpro application to test QR Code generation online. It is called zsdn_abap2qrcode_generate.