cancel
Showing results for 
Search instead for 
Did you mean: 

Quantity item printed withouty decimals when decimal part is 0

joan_ibaez
Explorer
0 Kudos

Hi all,

I have a field type QUAN with 3 decimals. When the value of this field has 1, 2 or 3 decimals my smartform print 3 decimals, but when this field has no decimals, my smartforms print no decimals. Exemple:

457,1 --> 457,100

12,28 --> 12,280

24 --> 24

I need to print always 3 decimals. (24 --> 24,000).

Thanks,

Joan

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

Your field is probably is probably linked to a unit of measure field, from which it takes the number of decimals.

So, you have to create another variable with 3 decimals, do not relate it to a unit of measure (avoid to type it according to a table field (for example do not type it according to EKPO-MENGE), typing it using a data element will always work (for example type it using BSTMG)).

For more information, see this wiki: http://wiki.sdn.sap.com/wiki/display/ABAP/SAPscript#SAPscript-Whatarethevarioustextformattingoptions...

joan_ibaez
Explorer
0 Kudos

Ok, it works fine.

Thank you very much.

Joan

Sandra_Rossi
Active Contributor
0 Kudos

Great. Joan, I see that you didnt' use the forum system of thanking (check the forum rules for more info) yet in your previous questions. That would be nice to update them, people who answered would be grateful to you.

Thx

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

try something like this:

&EKPO-MENGE(.3)&

regards,darek

joan_ibaez
Explorer
0 Kudos

Thanks but doesn't work.

Regards,

Joan