<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Decimal Notation conversion as per user setting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000085#M1344079</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already search for available FM for this functionality but haven't found any. You can use the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_CHANGE_QTY_TO_DECMALNOTATION.
types: begin of t_tab,
         sample_value(30) type c,
       end of t_tab.

types: begin of t_number,
         text(30)        type c,
       end of t_number.
data: i_tab  type standard table of t_tab,
      wa_tab type t_tab.

data: g_dcpfm type usr01-dcpfm.
data: g_whole(30)        type c,
      g_decimal(30)      type c,
      g_strlen           type i,
      g_ndiv             type i,
      g_nmod             type i,
      g_delimiter        type c,
      g_separator        type c,
      name(30)           type c.

initialization.
clear: g_dcpfm,
       g_whole,
       g_decimal,
       g_strlen,
       g_ndiv,
       g_nmod,
       g_delimiter,
       g_separator.

selection-screen begin of block b1.
*parameter: p_value(30) type c.
select-options: s_value for name no intervals obligatory.
selection-screen end of block b1.
*At selection-screen
Start-of-selection.

select single dcpfm
into g_dcpfm
from usr01
where bname = sy-uname.
if sy-subrc ne 0.
  g_dcpfm = space. "by default
endif.



loop at s_value.
  split s_value-low at '.' into g_whole
                                   g_decimal.
  g_strlen = strlen( g_whole ).
  g_ndiv   = g_strlen div 3.
  g_nmod   = g_strlen mod 3.

  case p_dcpfm.
    when space.
      g_delimiter = '.'.
      g_separator = ','.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.

      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.

    when 'X'.
      g_delimiter = ','.
      g_separator = '.'.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.
      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.

    when 'Y'.
      g_delimiter = space.
      g_separator = ','.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.
      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.
    when others.
  endcase.
  modify s_value. "from wa_tab.
endloop.

end-of-selection.
WRITE: SY-UNAME.
WRITE: G_DCPFM.

loop at s_value. "into wa_tab.
  write: / s_value-low.
endloop.

form change_quantity using p_delimiter type c
                                               p_separator type c
                                      changing p_sample_value.
data: li_number  type standard table of t_number,
      lwa_number type t_number,
      l_flag     type c.
data: l_temp     type i,
      l_previous type i,
      l_previous_text(30) type c.

refresh: li_number.
clear:   lwa_number,
         l_previous,
         l_temp,
         l_flag,
         l_previous_text.

* initially *
clear: lwa_number,
       l_temp.
if not g_nmod is initial.
  lwa_number-text = g_whole(g_nmod).
  append lwa_number to li_number.
  l_temp = g_nmod.
endif.

clear: l_previous.
do g_ndiv times.
    lwa_number-text = g_whole+l_temp(3).
    l_temp = l_previous + 3.
    l_previous = l_temp.
    append lwa_number to li_number.
    clear: lwa_number.
enddo.

clear: l_flag,
       l_previous_text.
loop at li_number into lwa_number.
if l_flag is initial.
  concatenate l_previous_text
              lwa_number-text
  into g_whole
  separated by p_delimiter.

  replace first occurrence of p_delimiter in g_whole with space.
  condense g_whole no-gaps.

  l_previous_text = g_whole.
  l_flag = 'X'.
else.
  concatenate l_previous_text
              lwa_number-text
  into g_whole
  separated by p_delimiter.
  l_previous_text = g_whole.

endif.
p_sample_value = g_whole.
endloop.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;massive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: massive on Aug 20, 2009 9:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2009 07:56:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-20T07:56:35Z</dc:date>
    <item>
      <title>Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000076#M1344070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The decimal point and the u2018thousand separatoru2019 must conform the convention used that is specified in the user profile of the user who is running the program.Please let me know the standard Function Module name for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:  1,234,567.00 (for UK user) and 1.234.567,00 (for users in France, Germany, etc).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 04:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000076#M1344070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T04:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000077#M1344071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two ways:&lt;/P&gt;&lt;P&gt;1. Table USR01. Field DCPFM.&lt;/P&gt;&lt;P&gt;2. BAPI_USER_GET_DETAIL. Structure DEFAULTS. Field DCPFM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DCPFM values:&lt;/P&gt;&lt;P&gt;space = Decimal point is comma: N.NNN,NN&lt;/P&gt;&lt;P&gt;'X' = Decimal point is period: N,NNN.NN&lt;/P&gt;&lt;P&gt;'Y' = Decimal point is N NNN NNN,NN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 04:46:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000077#M1344071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T04:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000078#M1344072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any standard Function Module available for this conversion..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 04:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000078#M1344072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T04:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000079#M1344073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM susr_get_user_defaults gives user settings,give user id in baname&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 04:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000079#M1344073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T04:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000080#M1344074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM &lt;STRONG&gt;CLSE_SELECT_USR01&lt;/STRONG&gt; to get the user default settings for decimal point and seperator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 05:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000080#M1344074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T05:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000081#M1344075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , please try  this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CETA_USR01_READ'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    bname     = sy-uname&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    usr01_exp = gw_usr01&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    no_entry  = 1&lt;/P&gt;&lt;P&gt;    OTHERS    = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOW USR01-dcpfm can have three values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gw_usr01-dcpfm EQ ' '.&lt;/P&gt;&lt;P&gt;     space = Decimal point is comma: N.NNN,NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF gw_usr01-dcpfm EQ 'X'.&lt;/P&gt;&lt;P&gt;     'X' = Decimal point is period: N,NNN.NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF gw_usr01-dcpfm EQ 'Y'.&lt;/P&gt;&lt;P&gt;    'Y' = Decimal point is N NNN NNN,NN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Prashant singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 05:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000081#M1344075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T05:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000082#M1344076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FM 'C14N_NUMERIC_FORMAT'&lt;/P&gt;&lt;P&gt;or SET COUNTRY statement in programm.&lt;/P&gt;&lt;P&gt;Working code for example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: fff type p decimals 3.
fff = 10000 / 3.

set country 'DE'. " Germany
write fff.

new-line.

set country 'EN'. " United Kingdom
write fff.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 05:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000082#M1344076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T05:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000083#M1344077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had  similar requirement for Date format conversion as per user settings. We have identified standard function module for date conversion.I am looking for standard FM for this Decimal conversion also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 06:15:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000083#M1344077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T06:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000084#M1344078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are no exist such FM.&lt;/P&gt;&lt;P&gt;As I have said you earlier - use SET COUNTRY in report.&lt;/P&gt;&lt;P&gt;Also check this: &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4929411"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="378002"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1285133"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 06:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000084#M1344078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T06:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000085#M1344079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already search for available FM for this functionality but haven't found any. You can use the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_CHANGE_QTY_TO_DECMALNOTATION.
types: begin of t_tab,
         sample_value(30) type c,
       end of t_tab.

types: begin of t_number,
         text(30)        type c,
       end of t_number.
data: i_tab  type standard table of t_tab,
      wa_tab type t_tab.

data: g_dcpfm type usr01-dcpfm.
data: g_whole(30)        type c,
      g_decimal(30)      type c,
      g_strlen           type i,
      g_ndiv             type i,
      g_nmod             type i,
      g_delimiter        type c,
      g_separator        type c,
      name(30)           type c.

initialization.
clear: g_dcpfm,
       g_whole,
       g_decimal,
       g_strlen,
       g_ndiv,
       g_nmod,
       g_delimiter,
       g_separator.

selection-screen begin of block b1.
*parameter: p_value(30) type c.
select-options: s_value for name no intervals obligatory.
selection-screen end of block b1.
*At selection-screen
Start-of-selection.

select single dcpfm
into g_dcpfm
from usr01
where bname = sy-uname.
if sy-subrc ne 0.
  g_dcpfm = space. "by default
endif.



loop at s_value.
  split s_value-low at '.' into g_whole
                                   g_decimal.
  g_strlen = strlen( g_whole ).
  g_ndiv   = g_strlen div 3.
  g_nmod   = g_strlen mod 3.

  case p_dcpfm.
    when space.
      g_delimiter = '.'.
      g_separator = ','.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.

      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.

    when 'X'.
      g_delimiter = ','.
      g_separator = '.'.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.
      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.

    when 'Y'.
      g_delimiter = space.
      g_separator = ','.
      perform change_quantity using g_delimiter
                                    g_separator
                          changing s_value-low.
      concatenate s_value-low
                  g_decimal
      into s_value-low
      separated by g_separator.
    when others.
  endcase.
  modify s_value. "from wa_tab.
endloop.

end-of-selection.
WRITE: SY-UNAME.
WRITE: G_DCPFM.

loop at s_value. "into wa_tab.
  write: / s_value-low.
endloop.

form change_quantity using p_delimiter type c
                                               p_separator type c
                                      changing p_sample_value.
data: li_number  type standard table of t_number,
      lwa_number type t_number,
      l_flag     type c.
data: l_temp     type i,
      l_previous type i,
      l_previous_text(30) type c.

refresh: li_number.
clear:   lwa_number,
         l_previous,
         l_temp,
         l_flag,
         l_previous_text.

* initially *
clear: lwa_number,
       l_temp.
if not g_nmod is initial.
  lwa_number-text = g_whole(g_nmod).
  append lwa_number to li_number.
  l_temp = g_nmod.
endif.

clear: l_previous.
do g_ndiv times.
    lwa_number-text = g_whole+l_temp(3).
    l_temp = l_previous + 3.
    l_previous = l_temp.
    append lwa_number to li_number.
    clear: lwa_number.
enddo.

clear: l_flag,
       l_previous_text.
loop at li_number into lwa_number.
if l_flag is initial.
  concatenate l_previous_text
              lwa_number-text
  into g_whole
  separated by p_delimiter.

  replace first occurrence of p_delimiter in g_whole with space.
  condense g_whole no-gaps.

  l_previous_text = g_whole.
  l_flag = 'X'.
else.
  concatenate l_previous_text
              lwa_number-text
  into g_whole
  separated by p_delimiter.
  l_previous_text = g_whole.

endif.
p_sample_value = g_whole.
endloop.

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;massive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: massive on Aug 20, 2009 9:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2009 07:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000085#M1344079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-20T07:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000086#M1344080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massive,&lt;/P&gt;&lt;P&gt;thanks a lot for this example. It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Eddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 16:20:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000086#M1344080</guid>
      <dc:creator>edemey</dc:creator>
      <dc:date>2011-12-20T16:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000087#M1344081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2015 16:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/6000087#M1344081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-03T16:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal Notation conversion as per user setting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/14167846#M2042222</link>
      <description>&lt;P&gt;There is a bug in the FORM change_quantity.&amp;nbsp;&lt;BR /&gt;Eg: Please refer the below test scenario.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PraharshaReddyPV_0-1753946481215.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/294385iF783986647B8013E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PraharshaReddyPV_0-1753946481215.png" alt="PraharshaReddyPV_0-1753946481215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PraharshaReddyPV_1-1753947026747.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/294418iD267C543E82500F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PraharshaReddyPV_1-1753947026747.png" alt="PraharshaReddyPV_1-1753947026747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Therefore, the corrected one:&lt;BR /&gt;The below code will work for user selected decimal format on the selection screen.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form f_change_value
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Change values based on user selected decimal format
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; --&amp;gt;  p1        text
*&amp;amp; &amp;lt;--  p2        text
*&amp;amp;---------------------------------------------------------------------*
FORM f_change_value USING u_delimiter TYPE c
                          u_separator TYPE c
                 CHANGING c_sample_value ##PERF_NO_TYPE.

  TYPES: BEGIN OF ty_number,
           text(30) TYPE c,
         END OF ty_number.

  DATA: lv_whole(30)         TYPE c,
        lv_decimal(30)       TYPE c,
        lv_strlen            TYPE i,
        lv_ndiv              TYPE i,
        lv_nmod              TYPE i,
        lv_flag              TYPE c,
        lv_temp              TYPE i,
        lv_previous_text(30) TYPE c,
        ls_number            TYPE ty_number,
        lt_number            TYPE STANDARD TABLE OF ty_number.


  CLEAR: lt_number, ls_number, lv_temp, lv_flag, lv_previous_text, lv_whole, lv_decimal, lv_strlen, lv_ndiv, lv_nmod.

  SPLIT c_sample_value AT '.' INTO lv_whole
                                   lv_decimal.
  "Get value length without decimals
  lv_strlen = strlen( lv_whole ).
  "Divide length and get quotient
  lv_ndiv   = lv_strlen DIV 3.
  "Get remainder for length
  lv_nmod   = lv_strlen MOD 3.

  "Get remainder value length of first set of digits into table.
  IF lv_nmod IS NOT INITIAL.
    ls_number-text = lv_whole(lv_nmod).
    lv_temp = lv_nmod.
    APPEND ls_number TO lt_number.
    CLEAR: ls_number.
  ENDIF.

  "Do quotient number of times and append the 3 set digits into table.
  DO lv_ndiv TIMES.
    ls_number-text = lv_whole+lv_temp(3).
    lv_temp = lv_temp + 3.
    APPEND ls_number TO lt_number.
    CLEAR: ls_number.
  ENDDO.
  CLEAR: lv_whole.

  LOOP AT lt_number ASSIGNING FIELD-SYMBOL(&amp;lt;fs_number&amp;gt;).
    IF lv_flag IS INITIAL.
      "Assign first set of digits into variable
     lv_whole = &amp;lt;fs_number&amp;gt;-text.
      "remove spaces
      CONDENSE lv_whole NO-GAPS.
      lv_previous_text = lv_whole.
      lv_flag = abap_true.
    ELSE.
      "concatenate remaining 3 set digits
      CONCATENATE lv_previous_text &amp;lt;fs_number&amp;gt;-text INTO lv_whole
                                          SEPARATED BY u_delimiter.
      lv_previous_text = lv_whole.
    ENDIF.
    c_sample_value = lv_whole.
  ENDLOOP.
  IF lv_decimal IS NOT INITIAL.
    CONCATENATE c_sample_value lv_decimal INTO c_sample_value
                                  SEPARATED BY u_separator.
  ENDIF.
ENDFORM.&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 07:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/decimal-notation-conversion-as-per-user-setting/m-p/14167846#M2042222</guid>
      <dc:creator>PraharshaReddyPV</dc:creator>
      <dc:date>2025-07-31T07:43:12Z</dc:date>
    </item>
  </channel>
</rss>

