This tutorial blog guides the users on how to use the SAP Custom Widget – QR Code Widget. It includes prerequisites, installation, deployment, and usage steps. The QR Code Widget allows users to generate QR codes for various use cases such as marketing, inventory management, and product tracking.
Installation
To use this widget in your SAP application, follow these steps:
- Download the
QrCodeWidget.json
file from the URLs specified in the webcomponents property of the JSON. - Go to your SAC Portal, select Analytic Application from the left side bar, and then go to the Custom Widget tab.
- Click on the + icon on the right side and select the
QrCodeWidget.json
file that you downloaded. - You’re done! You can now use it in your app.
Repository: https://github.com/SAP-Custom-Widget/QrCodeWidget/
Methods
The widget has the following methods:
Set Methods
Method | Parameter Type | Description |
---|---|---|
setSize(size) | integer | Set QR Code Width x Height |
setData(data) | string | Set Data for QR Code |
setColor(color) | string | Set QR Code Foreground Color |
setBgcolor(bgcolor) | string | Set QR Code Background Color |
get Methods
Method | Return Type | Description |
---|---|---|
getSize() | integer | return QR Code Width x Height |
getData() | string | return Data for QR Code |
getColor() | string | return QR Code Foreground Color |
getBgcolor() | string | return QR Code Background Color |
Conclusion
SAP Custom Widget provides developers with the flexibility to build and deploy custom widgets on SAP Business Technology Platform (BTP). The QR Code Widget is one such widget developed by SAP Custom Widget that provides users with a simple and efficient way to generate QR codes. By following the steps provided in this tutorial, users can easily install, deploy, and use the QR Code Widget in their applications.