SAP Knowledge Base Article - Public

2664939 - Currency On Extension Field Of Type Amount

Symptom

You want to set up the currency on extension fields (Key User Tool KUT fields) of type amount by conditions.

Environment

SAP Hybris Cloud for Customer

Cause

From the KUT Tool itself, currency defaulting based on conditions is not possible.

Resolution

When you use the User Interface Component Quick Create (QC), the currency will be defaulted automatically.

To have the same procedure in the User Interface Component Thing Inspector (TI), you would need to use the capabilities of the Cloud Applications Studio.

You can use the Cloud Applications Studio to write a code logic on this field. For this you can create a PDI solution.

From this PDI solution, create an Extension Business Object. This Extension Business Object should represent the Business Object on which you created the KUT field.

Afterwards you can create a Customer Specific References (.REF) file in the respective PDI solution. This reference file shows the list of all KUT fields in the system. Here you should select the respective KUT field which will allow you to make use of it in ABSL script files.

You can now create script files on the Extension Business Object to be in a position to make use of the KUT field.

You can hereby proceed in two different ways:

  • Create an AfterModify or BeforeSave event on the corresponding Extension Business Object Node. The AfterModify event will be called if a change takes place on the and the BeforeSave will be called when a save is executed on the User Interface.
  • Create a custom node on the Extension Business Object. For this custom node, create the AfterLoading Event. The AfterLoading event will be called on opening a Business Object instance. Currently AfterLoading events are not supported for Extension Business Object Nodes.

Please keep in mind that this is a suggestion and Cloud Product Support will not be responsible or consult for any PDI solution.

See Also

Please refer to the below repositories at your side :
Help.sap.com Studio documentation: SAP Cloud Applications Studio Documentation  
SCN Community for Studio: SAP Community Network for Studio  
How-Tos: http://scn.sap.com/community/business-bydesign/studio/blog/2014 /04/02/video-how-tos-for-sap-cloud-applications-studio  
OpenSAP Course : https://open.sap.com/courses/byd1

Keywords

KUT, extension field, currency, amount, SDK, Cloud Applications Studio, script, event, Extension Business Object , KBA , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , LOD-CRM-OPP , Opportunity Management , How To

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions