Barcode Writer in Pure Postscript Update
Project site http://bwipp.terryburton.co.uk/
1) Updated postscript device types
Standalone device types updated
Originally I had created some Unix scripts to adapt the BWIPP code so it could be included with SAP device types. I updated the scripts to use the ASCII85 packaged versions of the BWIPP project. I was able to extract the relevant barcodes to copy and paste the code into the device types. Therefore I have a method to create any of the barcodes into SAP device types.
QRcode, Data Matrix and Aztec Code device types can bedownloaded by following this link.
Since the original blog in 2010, I have either replied to blog comments or direct emails about certain requirements people wanted for Smart Forms in particular. These comments and emails also confirming the process worked from SAP version 4.6c up to the latest versions.
An example QRcode based smartform can be downloaded via the same zip file link in the the root directory - called z_qrcode_bwipp.xml . If you follow the original blogs method to create an output device and linked to the new Device Types then the smartform can be printed directly to PDF (or direct to any PostScript enabled printer).
The smartform is standalone and will work if tested via the generated function module. The Smart Form was created on a trial version of SAP 7.02.
Upload the Form via the smartforms transaction
Follow the prompts to import the downloaded smartform
Select change once the form is imported
Test (hit the test icon in the following screens and you will be prompted to select a printer, the one created with the device type ZBWPQR3 should be used). The generated function module is enough to run the Smart Form as it is self contained.
The smartform is standalone and if executed should produce the following output.
The Smart Form is an example and only a test of the print controls that have been added to the device type. Take a look at the smart form for the various ways the QRcode is manipulated.
Server side update
Updating to the latest version of the BWIPP to be used server side as per the blog post
To update the BWIPP using the server side method is a simple case of swapping out the one file which contains the BWIPP. I have tested the following version from the following download page (which will include the optimum sized 2d barcodes).
The exact download file I used was
I extracted the barcode.PS script and replaced the Dbwipp from the original blog post. A copy of the updated Dbwipp in the serverside directory of the download.
An example smartform that can show 26 barcodes on one page.
The example Smart Form is called z_26barcode.xml again in the serverside directory of the zip file above.
Project site https://code.google.com/p/bwip-js/
1) Node.js web service on OpenShift
Example barcodes below generated by my OpenShift barcode web service I have running. (if outside images are allowed at your site a QRcode and Aztec Code should be shown below - * if my site is up and running )
As the barcode web service produces PNG images I searched SCN to find a way to use these with Smart Forms (previously I had used the bitmap class)
I came across this document http://scn.sap.com/docs/DOC-47644 that is based on a Google service to generate QRcodes. I did doubt my cut and paste skills with my own 7.02 SAP NSP trial edition as the code did not activate without making some minor changes to the code. However once activated it worked fine and a great idea. I would recommend running the BWIPJS service on an internal Node.js server and not a cloud service. However this is just a demo and my site will not be around forever. I will leave it running though as long as I can, if the live images above are not shown then that indicates my OpenShift application is not running.
I swapped out the following line that uses the Google service from the above linked SCN document.
* CONCATENATE 'http://chart.apis.google.com/cha…..
With a line that used my OpenShift application to generate a QRcode
CONCATENATE 'http://bwipp-rjruss.rhcloud.com/bwip?bcid=qrcode&text=' qr_text INTO url.
Then to get an Aztec Code simple change the bcid parameter to the following. (Therefore any of the supported barcodes in the BWIPjs application can be used.)
CONCATENATE 'http://bwipp-rjruss.rhcloud.com/bwip?bcid=azteccode&text=' qr_text INTO url.
2) ICM, BWIPJS and Phantomjs barcode method
I had previously followed the blog linked below to serve up sapui5 with the ICM, I used openui5 in its place
Using this as a base I copied the BWIP-js code as a subdirectory as below.
Once the SAP system was restarted, then the demo page of the bwip-js is available from the SAP server. As shown below
Using the code with the controlling bsp with the same Smart Form from before. http://scn.sap.com/docs/ DOC-47644
Calling the BSP with the URL
CONCATENATE 'http://haw.robert.russell:8000/sap/bc/bsp/sap/zbwipjs/bc.htm?text=' qr_text INTO url.