Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitchouhan
Participant
1,655
SAP Custom Widget Currency Widget is a powerful tool that displays real-time currency conversion rates between two currencies. It can be used in SAP applications to enhance user experience by providing quick access to currency conversion information. In this tutorial, we will go through the installation process and various methods that can be used with the Currency Widget.


Prerequisites:

Before starting with the installation process, you must have the following software installed on your system:

  1. SAP Analytics Cloud (SAC)

  2. Access to Custom Widget tab in the SAC Portal


Installation:


Follow the below steps to install CurrencyWidget:

  1. Download the CurrencyWidget.json file from the URLs specified in the webcomponents property of the JSON.

  2. Go to your SAC Portal, select Analytic Application from the left side bar, and then go to the Custom Widget tab.

  3. Click on the + icon on the right side and select the CurrencyWidget.json file that you downloaded.

  4. You're done! You can now use it in your app.


You can find GitHub repository from here: -  https://github.com/SAP-Custom-Widget/CurrencyWidget

Methods


The widget has the following methods:



Set Methods
































Method Parameter Type Description
setFrom(from) string Set Source Currency Code
setTo(to) string Set Target Currency Code
setAmount(amount) integer Set Amount to Calculate
setDecimalPlaces(decimalPlaces) integer Set Decimal Values

Get Methods





































Method Return Type Description
getFrom() string return Source Currency Code
getTo() string return Target Currency Code
getAmount() integer return Amount to Calculate
getDecimalPlaces() integer return Decimal Values
getCalculatedRate() string return Calculated Currency Rate

Usage:


To use CurrencyWidget in your SAP application, follow these steps:

  1. Drag and drop the CurrencyWidget component onto your SAP application's canvas.

  2. Set the source currency and target currency using the setSourceCurrency and setTargetCurrency methods.

  3. Set the amount using the setAmount method.

  4. Set the decimal places for the converted amount using the setDecimalPlaces method.

  5. Save your changes and run your SAP application.


Video Tutorial



Conclusion:


In this tutorial, we have covered the installation and usage of SAP Custom Widget CurrencyWidget. CurrencyWidget is a powerful tool that provides real-time currency conversion rates for various currencies. You can use it in your SAP applications to enhance the user experience and provide valuable information to your users. If you face any issues during the installation or usage of the CurrencyWidget, feel free to reach out to the support team of SAP Custom Widget.
Labels in this area