QR Code is stands for Quick Response Code.It was first developed and used in Japan.QR Code is advanced technology.It is a two-dimensional encoding, whereas a Bar Code is one-dimensional encoding in nature.
It’s store data using patterns of block dots and white spaces, arranged in a square grid.If the data you want to store in a QR code is made of only alphanumeric characters.
A single QR code can hold up to 4000 characters.
In this blog I am going to explain how to create QR Code in Sap Scripts and I covered all the steps which is required to create and print the QR Code.
Actually I got a requirement to create the QR Code and print that QR Code in SAP Scripts.
Now it is challenging to me because Scripts are older one, now smart forms is Advanced Technology and it have advanced features to print QR Code. But I need to create a QR Code in Scripts.
Let’s see how I achieved it.
Now I am going to explain you how to create a QR Code in Scripts.
Before to print QR Code in Sap Scripts we have to create own QR Code in SAP-Script Font maintenance(SE73).
Create your own QR Code font:
The following steps are as follows to create a QR Code:
Go to SE73, then click on “System Bar Code” Radio Button and Click on Display button as shown in below screen shot.
By clicking on display button the window will appear as shown in below screenshot, now click on Create(F5) Button.
A pop-up will appear, click on New button(new Bar code Technology) as shown in below screen shot.
Now we have to define the Bar Code name and Short text of the Bar code, then click on continue.
Select Bar Code Symbologies as “Datamatrix ECC200”.
Select Bar Code Alignment as ‘Normal’, Mode as ‘Auto’ and Module Size in Pixel as ‘00025’ then click on continue.
By clicking on Continue button a Pop-up will appear, click on ‘Yes’ to save Bar Code definition.
Here you can check the created QR Code as shown below.
Select the Bar Code Definition and execute it.
Click on Execute Button.
Give the Output Device as ‘LP01’ and click on ‘Print Preview’ button.
You can see the print preview of your created Bar code as executing it as shown below:
Now the QR code is created and now we have to import the created QR code to Sap Scripts.
The following steps are as follows to import the Created QR code to Sap Scripts:
Go to se71, then give the Form name and click on ‘Create’ button.
Write a meaningful meaning to Form and click on “Pages” button as shown in below screenshot.
Now go to Edit menu–>Create element.
A pop-up will appear give the page name and meaning then click on continue as shown in below screen shot.
Now go to Settings–>Form Painter as shown in below screen shot.
Go to “Sap script” tab and uncheck two check box’s click on continue as shown below.
Now click on “Character Formats”.
In standard Attributes give Char.Format as ‘C1’ and Description as QR Code.
Check the selection check box and give the created Bar code name.
Now click on “Windows” button.
Go to Edit menu–>Create Element.
Give the Window name and meaning then click on continue as shown in below screenshot.
Give the Default paragraph name as ‘p1’ for main window.
Similarly give the Default paragraph name as ‘p1’ for QR code window.
For Main Window:
For QR Code Window:
Now select the QR Code Window and Click on Text Elements as shown in below screen shot.
In Text Elements Write the below Text as shown in below screenshot:
Enter the Text as “<c1>&IKPF-IBLNR&</>”.
Now go back and click on “Paragraph Formats”.
Give the Paragraph name as ‘p1’ and press Enter button and then give the meaningful name to paragraph press Enter button.
Now click on “Page Windows” button.
Go to Edit menu–>Create Element.
Double click on the “Main Window” and provide the attributes as shown in below screen shot.
Enter the values for “Main Window” attributes and press enter button :
Similarly Go to Edit menu–>Create Element and double click on a QR code Window.
Enter the values for “QR Code Window” attributes and press enter button :
Now click on ‘Header’ button.
Give the meaningful name to Form and click on ‘Basic Settings’ as shown in below screenshot.
Give default Paragraph name as ‘p1’ and first page name as ‘page1’ as shown in below screen shot .
Now Save and Activate it.
For Execute the Script go to Utilities Menu–>Printing Test.
A pop-up will appear, give output device name as ‘LP01’ and click on ‘Print Preview’ button.
Now the QR Code is Printed as shown in below screen shot.
Finally we achieved it, we created a QR Code and Printed it in Sap Scripts.
The summary of this blog is QR Code is used for many purposes.It is commonly used for holding data such as Payments, Links to apps, URLs, etc..
Hope this blog might help you to create a QR code and print it in SAP Scripts.