‎2021 Mar 18 11:38 AM
Hi experts,
i have a Amount Field KBETR . in result I got value as '000000.0000000' but i want as '0000.00'.

i used shift trailing and many thing but not get result in write way.
thanks and Regards,
Yasir haider.
‎2021 Mar 18 2:28 PM
Hi Yasir,
you have also fomat option DECIMALS
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcompute_string_format_options.htm
data(string)=|{ amount_internal DECIMALS = 0}|.
‎2021 Mar 18 2:00 PM
It's a currency amount so you should format it according to the corresponding currency code and it will then contain the number of decimals defined for the currency code. For instance USD and EUR have 2 decimals, so the formatting would be automatically 0.00.
Please search currency decimals formatting in the forum. WRITE CURRENCY or string template
DATA(amount_internal) = CONV kbetr( '3.1416' ).
data(string) = |{ amount_internal CURRENCY = 'EUR' }|. " currency has 2 decimals
ASSERT string = '314.16'.
‎2021 Mar 18 2:28 PM
Hi Yasir,
you have also fomat option DECIMALS
https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcompute_string_format_options.htm
data(string)=|{ amount_internal DECIMALS = 0}|.