Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the domain for CURR data tye which has 3 decimal places ?

0 Kudos
1,656

I have a requirement where I need to print the KBETR value same as it is determining in pricing. While doing pricing procedure, the KOMV-KBETR value is fetchig 3 decimal places somehow but when printing in smartform it is printing only 2 decimal places. This difference is costing a lot for our clients and thus we have to print the value with 3 decimal places.

To solve this, I thought to create a custom structure where I will be creating custom Z* field for this KBETR and then assigning it any CURR data type whose domain has 3 decimal places. But I am not able to find any CURR data tye which has 3 decimal places. Can anyone help me here please ?

6 REPLIES 6

raymond_giuseppi
Active Contributor
1,321

The number of decimals is defined by the currency code customizing (the CUKY field associated with the CURR amount field)

  • IMHO you should adapt your SmartForms, not the database.
  • If you actually always want 3 decimals printed whatever the currency code, then don't use a CURR field, but any packed numeric DEC with 3 decimals

0 Kudos
1,321

I'm pretty sure this is covered in the basic ABAP courses.

Sandra_Rossi
Active Contributor
1,321

It's non-sense to search for domains of type CURR with a given number of decimals, because the technical number of decimals is non-sense as only the total number of digits is important and the position of the decimal point is dynamically determined based on the linked CUKY field.

e.g. if you have 1000 JPY (Japanese yens), it can be stored either 1000 or 100.0 or 10.00 in the database, depending on the number of decimals of the CURR database column, but will be always output as 1000 JPY because JPY is defined as having 0 decimals (table TCURX).

if you have 1000 USD (US dollars), it can be stored either 100000 or 10000.0 or 1000.00 in the database.

Etc.

matt
Active Contributor
1,321

Values are always stored to 3dp. The output is determined by the key. In the structure, put the KBETR value and the currency in the currency key field, and by magic (if you've configured your currency tables correctly), you'll get the correct number of dp.

Sandra_Rossi
Active Contributor
1,321

matthew.billingham I guess you mean that it's in the module SD Sales & Delivery or in pricing routines (or things alike) that "Values are always stored to 3dp" (which seems to be what the OP refers to). It's variable at all other places (often 2).

matt
Active Contributor
1,321

Well, values with either a currency or a unit of measure. Yes.