cd119 - introducing qr-codes in your sap system
DESCRIPTION
I hosted this presentation at SAP TechEd 2010 in Berlin. It's about QRcodes and SAP.TRANSCRIPT
9/28/2010
1
ISO 9001:2000
2003 – 2010 Techedge - All rights reserved
Any Techedge external diffusion is forbidden, except if specifically authorized
Sergio FerrariSAP Mentor
@SergioFerrari
CD119 - Introducing QR-Codes
in Your SAP System
October, 13th 2010
www.TechEdgeGroup.com
2
Session CD119 - Introducing QR-Codes in Your SAP System
This session will explain how it's easy, within the SAP Business Suite, to take advantage
of QR-Codes, the two dimensional bar codes that appear as patterned squares.
It's a good opportunity to learn about:
the QR-Codes basic concepts
the available options to generate a QR-Code both for printing (PDF) and for online
applications (Web images)
how to build the Web pages that will be presented to the mobile device (e.g.
iPhone, Nokia, Android, Blackberry) once a QR-Code is scanned
We will talk about possible business scenarios while scanning your first QR-Codes.
Session Details
SAP TechEd 2010 Berlin
CD119 - Introducing QR-Codes in Your SAP System
by SAP Mentor Sergio Ferrari
9/28/2010
2
3
QR-Codes basic concepts
Business Cases
QR codes within the SAP Business Suite
Agenda
4
What are they?
Mr. Quick Response Code(also known as QR Code or 2D Code)
...decoded at high speed
Capacity4296 characters7089 digits
Created by DENSO wave (1994)member of the Toyota Group
StandardISO/IEC 18004, June 2000
http://en.m.wikipedia.org
9/28/2010
3
5
What can we do with them?
Point on a code DecodingTake a Picture Website
“Tell me more”, community based Content
Add to contactsNew Business Cards
CallPhone number
Show on a mapGeo-location
….…
Often defined as:
“mobile tagging”
“mobile-readable URLs”
6
Basic Informations – main attributes
Encoding
Correction LevelL - [Default] Allows recovery of up to 7% data loss
M - Allows recovery of up to 15% data lossQ - Allows recovery of up to 25% data loss
H - Allows recovery of up to 30% data loss
Content
http://code.google.com/apis/chart/docs/chart_wizard.html
9/28/2010
4
7
Basic Informations – business data
an idea for SAP related content
8
Basic Informations – content
Data Encoding
Free format with some
common protocol like:http:
tel:
sms:
geo:
9/28/2010
5
9
Basic Informations - versions
hello
1.000 times “A”Pixel density (version) is related to
the amount and type of data and to
the correction level
The QR Code trend
10
http://www.google.com/insights/search/#q=qr%20code&cmpt=q
QR codes are exploding in popularity
during the “Smartphone era”
supported by excellent
Open Sources processing library
like ZXing ("Zebra Crossing")
9/28/2010
6
11
QR-Codes basic concepts
Business Cases
QR codes within the SAP Business Suite
Agenda
12
Business Cases – “the QR estate agency”
9/28/2010
7
13
Business Cases – “Tell me more”
QR Code specific “Tell me more” with
current prices, campaign, social content
(rating, comments,…)
Get location
Get language
Show the best content
Count visits (+1)
Real Life
Mobile Internet Apps
An hyperlink between physical and virtual worlds
14
Smartphone Apps
9/28/2010
8
QR-Codes basic concepts
Business Cases
QR codes within the SAP Business Suite
• Encoding
• Scanning and Decoding
• Landing pages
15
Agenda
QR code encoding from SAP Business Suite
16
Printing (PDF)
SAP Adobe Forms
SAP Smart Forms
SAPscript
Web (.PNG)
encoding services
Web Dynpro for ABAP
9/28/2010
9
17
QR Code is
natively supported
by Adobe Forms
In add to the QR
code Content
(binding) the
propriety “Error
correction level”
can be specified
Printing a QR code via Adobe Forms
18
1. Generate the QR Code image file (.PNG) with one of the methods presented in the
following pages
2. Upload the image into the SAP system
1. Convert the generated file (file.png) to TIFF
1. Use SAP IGS via class CL_IGS_IMAGE_CONVERTER (see GRAPHICS_IGS_IMGCONV_DEMO)
2. Upload
1. use report RSTXLDMC to upload the image into SE78
3. Include the image into the Form:
1. SAPScript /:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST
2. Smart Form Graphic node
Printing a QR code via SAP Smart Forms and SAPscript
Possible but not recommended !
9/28/2010
10
19
Great resource to perform
the first encodings
Manual QR Code Generator from the ZXing Project
http://zxing.appspot.com/generator/
sergio@sergio-ubuntu:~$ qrencode -hqrencode version 3.0.3Copyright (C) 2006, 2007, 2008 Kentaro FukuchiUsage: qrencode [OPTION]... [STRING]Encode input data in a QR Code and save as a PNG image.
-h display this message.--help display the usage of long options.-o FILENAME write PNG image to FILENAME. If '-' is specified, the result
will be output to standard output. If -S is given, structuredsymbols are written to FILENAME-01.png, FILENAME-02.png, ...;if specified, remove a trailing '.png' from FILENAME.
-s NUMBER specify the size of dot (pixel). (default=3)-l {LMQH} specify error collectin level from L (lowest) to H (highest).
(default=L)-v NUMBER specify the version of the symbol. (default=auto)-m NUMBER specify the width of margin. (default=4)-S make structured symbols. Version must be specified.-k assume that the input text contains kanji (shift-jis).-c encode lower-case alphabet characters in 8-bit mode.
(default)-i ignore case distinctions and use only upper-case characters.-8 encode entire data in 8-bit mode. -k, -c and -i will be
ignored.-V display the version number and copyrights of the qrencode.[STRING] input data. If it is not specified, data will be taken from
standard input.
20
“qrencode” as command line QR code generator
sergio@sergio-ubuntu:~$ sudo apt-get install qrencodesergio@sergio-ubuntu ~$ qrencode -o output.png http://www.techedge.itsergio@sergio-ubuntu:~$ cat input.txt | qrencode -o output.png
http://fukuchi.org/works/qrencode/index.en.html
Kentaro Fukuchi is
the owner of one of
the best open source
project called
libqrencode
Libqrencode is a C
library for encoding
data in a QR Code
symbol
Available from
command line
Several wrappers are
also available (e.g.
PHP, Ruby, Python)
9/28/2010
11
21
ZXing ("Zebra Crossing") as Java QR code generator
public void createQrCode(OutputStream outputStream, String content, int qrCodeSize, String imageFormat){try{// Create the ByteMatrix for the QR-Code that encodes the given String.Hashtable hintMap = new Hashtable();hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);QRCodeWriter qrCodeWriter = new QRCodeWriter();ByteMatrix byteMatrix = qrCodeWriter.encode(content, BarcodeFormat.QR_CODE, qrCodeSize, qrCodeSize, hintMap);// Make the BufferedImage that are to hold the QRCodeint matrixWidth = byteMatrix.getWidth();BufferedImage image = new BufferedImage(matrixWidth, matrixWidth, BufferedImage.TYPE_INT_RGB);image.createGraphics();....
flexible option based on Open Source
Java that can be integrated
wherever desired
http://code.google.com/p/zxing/
22
Google Chart API as REST web service QR code generator
http://chart.apis.google.com/chart?cht=qr&chs=200x200&choe=UTF-8&chld=H&chl=Hello%20world
9/28/2010
12
23
abap2qrcode - QR Code generator from ABAP
http://code.google.com/p/abap2qrcode/
the idea is to
wrap QR code
generators within
an HTTP ABAP
Handler
The ABAP
wrapper can
manage with
different
generators to fit
all the
requirements
24
abap2qrcode - QR Code generator via Google Chart API
http://sapecc.techedge.it/sap/zsdn_tags/qrcode? http://chart.apis.google.com/chart?
http http
From the browser, the QR Code images are coherently received from the SAP Web AS
All the resources are generated by the same host:protocol (e.g. HTTP /HTTPs)
Parameters:
t (type) = e.g. gc for google chart, others to be implemented
s (size) = e.g. 200 – one dimension it’s enough
l (error correction level) = e.g. L – it can be LMQH
c (content) = e.g. http://twitter.com/sapmentors
9/28/2010
13
25
Abap2qrcode - QR Code generator from ABAP - WDA
DATA: l_qrcode_url_string TYPE string.
l_qrcode_url_string = zsdn_qrcode_gc=>encode_url(
im_type = ls_form-type
im_size = ls_form-size
im_error_correction_level = ls_form-error_correction_level
im_content = ls_form-content
).
QR Codes can be easily included into
Web Dynpro ABAP or BSP pages
QR-Codes basic concepts
Business Cases
QR codes within the SAP Business Suite
• Encoding
• Scanning and Decoding
• Landing pages
26
Agenda
9/28/2010
14
27
Most popular QR code reader applications
are:
• Barcode SCanner per Android
• KAYWA Reader
• Nokia Reader
• i-nigma Reader
• Active Print
• UpCode
• QuickMark
• SnapMaze
• BeeTagg
• NeoReader
• ScanLife
• MobileTag
QR code Scanning and Decoding
Applications based on
Sybase Unwired Platform can also
intregrate QR Code readers
QR-Codes basic concepts
Business Cases
QR codes within the SAP Business Suite
• Encoding
• Scanning and Decoding
• Landing pages
28
Agenda
9/28/2010
15
29
Landing pages
BSP or JSP are well suited framework to
host landing pages (mobile sites)
Thank you
30
http://chart.apis.google.com/chart?cht=qr&chs=350x350&chl=MECARD:N:Sergio+Ferrari;URL:www.techedge.it;EMAIL:ser
gio.ferrari%40techedge.it;NOTE:SAP+Mentor;;
9/28/2010
16
31
Open Source Project Home pages:
abap2qrcode http://code.google.com/p/abap2qrcode/
ZXing http://code.google.com/p/zxing/
libqrencode http://fukuchi.org/works/qrencode/index.en.html
Further Information
9/28/2010
17
Copyrights
The term QR Code itself is a registered trademark of Denso Wave Incorporated.