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: 

Change dismals from 3 to 4

samer_welliam
Explorer
0 Kudos
1,584

It can be change on stander table

MARA-VOLUM

and make the dismals 4 not 3.

I know it is not recommended but they need bucouae the volume not correct

To be correct need to be 3.9302

And now only apple to put 3.930.

1 ACCEPTED SOLUTION

DominikTylczyn
Active Contributor
1,463

Hello samer.welliam

!!! TL;DR - do not do it !!!

Technically it is possible. MARA-VOLUM is defined with the VOLUM data element, that points to the MENG13 domain:

You could change the data element and assign it to a different domain that would define 4 decimal points. That is easy.

What is difficult, is that the data element VOLUM is used in almost 80 tables. If you change the data element all those tables would need to be converted, with all the data they keep. That process will most likely fail and that will break the system. Unless it is some kind of sandbox system and you are just experimenting, the risks outweigh by far, I mean by VERY FAR, any potential benefits. Plus a system with such change will not be supported by SAP for sure.

!!! In short again, do not do it !!!

Best regards

Dominik Tylczynski

13 REPLIES 13

DominikTylczyn
Active Contributor
1,463

I guess it should be MARA-VOLUM, shouldn't it?

samer_welliam
Explorer
0 Kudos
1,463

Yes, I just type it by mistake It

MARA-VOLUM

DominikTylczyn
Active Contributor
1,464

Hello samer.welliam

!!! TL;DR - do not do it !!!

Technically it is possible. MARA-VOLUM is defined with the VOLUM data element, that points to the MENG13 domain:

You could change the data element and assign it to a different domain that would define 4 decimal points. That is easy.

What is difficult, is that the data element VOLUM is used in almost 80 tables. If you change the data element all those tables would need to be converted, with all the data they keep. That process will most likely fail and that will break the system. Unless it is some kind of sandbox system and you are just experimenting, the risks outweigh by far, I mean by VERY FAR, any potential benefits. Plus a system with such change will not be supported by SAP for sure.

!!! In short again, do not do it !!!

Best regards

Dominik Tylczynski

0 Kudos
1,463

Thanks Dominik,

So what is the correct solution if I have Finished Product and need the volume in transaction MM02 volume 4 dismals not 3

0 Kudos
1,463

samer.welliam You either live with the precision you have or use a smaller unit of measure e.g. cm3 instead of dm3.

0 Kudos
1,463

Seconded on the don't do it... this is the type of thing that should never be considered. The kind of thing where people should step back, take a pause, and transform their thinking (reshape the problem).

matt
Active Contributor
1,463

TL;DR surely? 😉

raymond_giuseppi
Active Contributor
0 Kudos
1,463

Don't change MARA-VOLUM definition (Data element VOLUM of type QUAN, else run)

Use another smaller volume UOM Unit Of Measure in MARA-VOLEH (or try to define one with 4 decimals reounding and display defined by copy with transaction CUNI, with a conversion factor of 1 to original UOM, tbc)

0 Kudos
1,463

Defining units of measure with more decimals than 3 won't help here. Volume precision is limited by the data element definition.

Sandra_Rossi
Active Contributor
1,463

I guess you mean "decimals", not "dismals" 😉

matt
Active Contributor
1,463

SAP always stores quantities to 3dp.

Don't change the definition of the element; use the a UOM which has 4 decimal places. You can define your own.

If you have 1.2345 quantity in your UOM, it will be stored as 12.345

If you use another UOM with 2 dp, 1.23 will be stored as 0.123

When it comes to output though, and you use the correct UOM, then you'll get the correct decimal places.

With this piece of code with a 4dp UOM and quantity held in the database as 12.345, output_field will contain 1.2345.

DATA quantity TYPE mara-volum.
DATA my_unit_of_measure TYPE mara-voluh.
DATA output_field TYPE c LENGTH 20. SELECT SINGLE volum voluh FROM MARA INTO (quantity, my_unit_of_measre)
WHERE matnr EQ 'MY_MATERIAL'. WRITE quantity UNIT my_unit_of_measure TO output_field.

0 Kudos
1,463

Hello,

I created a unit of volume with 4 decimals with transaction CUNI :

Then I tried your code and quantity is displayed with 3 decimals :

Transaction MM02 doesn't permit to fill a unit volume field with 4 decimals.

matt
Active Contributor
0 Kudos
1,463

In that case, you need to use a smaller unit of measure. E.g. if you're using liters, try using deciliters.

In that way, if you have 1.2345 liters, it will be 12.345 dl.