Decimal Notation conversion as per user setting

Hi all,
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.
Example:  1,234,567.00 (for UK user) and 1.234.567,00 (for users in France, Germany, etc).

Hello,
I have already search for available FM for this functionality but haven't found any. You can use the code below.
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.
regards,
massive
Edited by: massive on Aug 20, 2009 9:58 AM

Similar Messages

  • No per user setting for JRE in Internet Explorer on W2K/W2K3 term. server

    After installing Sun Java SE on terminal servers (both 2000 &
    2003) you have an additional option within Internet Explorer 5.5 & 6.x under tools, intenet options, advanced; called "Java (Sun) Use JRE
    XXX (applet) requires restart". This option cannot be set on a per user base. When a user changes this setting, it is changed for ALL terminal server users immediately. This is a big problem.
    It should be able to set this on a per user base.
    Current key is located at: HLKM\SOFWTARE\Microsoft\Internet
    Explorer\AdvancedOptions\JAVA_SUN\SELECT
    As some websites require Sun_Java and others won't work at all
    when the Sun Java options is selected each user should be able
    to select or disable this option on a per user base.
    How can we accomplish this?

    Hello. Sorry, don't have an answer for your issue. Just wondering whether you've experienced this issue in your Windows Server 2003 envionmnet.
    We're running Windows 2000 Server (SP4) (and Citrix Presentation Server 4.0). We typically have 20+ concurrent users logged on to a server. Since JRE 1.5.0_7, we've had issues with Internet Explorer taking upwards of 15 seconds to display even though Iexplore.exe appears in Task Manager almost immediately. If we uninstall JRE 1.5.0_7 and use 1.4.2_6, Internet Explorers displays fine. We've tried JRE 1.5.0_11 and 1.6.0_3, and Internet displays slowly. Has anyone else experienced this issue? Any thoughts of why this is occuring? Thanks.

  • Currency decimal notation conversion

    I am getting finacial values from a subsidary company in comma notation instead of the decimal notation.  It is clear that their user profiles are setup with this in mind and they don't want to change them.  Is there a function out there that converts comma to decimal i.e. 123,45 -> 123.45?
    Thanks,
    Kevin

    HI Kevin May 
    USE THIS CODE: IT TAKES CARE OF DECIMAL NOTATION BASED ON USER PROFILE.
    WHAT EVER MAY BE THE USER PROFILE FOR DECIMAL NOTATION.
    <b>
    FIELD_NUM = 1,233.50
    </b>
    OR
    <b>
    FIELD_NUM = 1.233,50
    </b>
    OR
    <b>
    FIELD_NUM = 1 233,50
    </b>
    SELECT SINGLE DCPFM FROM USR01
                           INTO VAR_DCPFM WHERE BNAME EQ SY-UNAME.
              IF VAR_DCPFM EQ 'X'.
                REPLACE ALL OCCURRENCES OF ',' IN: FIELD_NUM WITH ''.
    *            TRANSLATE FIELD_NUM USING ','.
              ELSEIF VAR_DCPFM EQ ''.
                REPLACE ALL OCCURRENCES OF '.' IN: FIELD_NUM WITH ''.
    *            TRANSLATE FIELD_NUM USING '.'.
                TRANSLATE FIELD_NUM USING ',.'.
              ELSEIF VAR_DCPFM EQ 'Y'.
                TRANSLATE FIELD_NUM USING ',.'.
              ENDIF.
    THIS CODE WILL WILL RESULT INTO :   <b>
    FIELD_NUM = 1233.50
    </b>
    CHEERS,
    VIJAY RAHEJA

  • Function module for decimal notation conversion

    Hi
    Is there a function module to convert any decimal notation to the
    1,234,567.890 , and if there is , then a sample code will be very useful
    Thank you

    Hi,
    Please try FM C14N_NUMERIC_FORMAT.
    or try this.
    data: c(100) type c.
    data: length type i.
    data: offset type i.
    c = '1223,54'.
    length = strlen( c ).
    offset = length - 3.
    translate c+offset(1) using ',.'.
    write:/ c.
    Regards,
    Ferry Lianto

  • Decimal notation in Smartforms

    Hi,
    We have two  smart from USD in one smart form it is showing as  14,840.50 in USD whereas for other smart forms it is showing as 14.840,50 USD.and both the invoices has been raised for the same customer whose country is belgium and currency is USD.
    As far as i know decimal notation done in User id in SU01 default tab and country specific also we do decimal notation.
    At present we have 1.234,56 decimal notation for Belgium in country setting and 1,234.56 in user id setting.If i changed country setting to 1,234.56 thn it shows value as 14,840.50 in the second smartform also which is our requirement.But why there is a different presentation of decimal notation?On what basis decimal notation happens in SMARTFORMS.
    Regards,
    SATYA

    Hi Satya,
    You might want to check the language of the smartforms, the translations and the restricted language control in the form attributes.
    hope it helps,
    Edgar

  • DECIMAL = HEX CONVERSION PACKAGE 생성 SCRIPT

    제품 : SQL*PLUS
    작성날짜 : 2002-04-12
    DECIMAL <=> HEX CONVERSION PACKAGE 생성 SCRIPT
    ==============================================
    Purpose
    Oracle내에서는 여러가지 값을 HEX 값으로 보여주는 경우가 있다.
    이런 경우 DB내에서 decimal 값으로 변환하기 위한 방법을 알아보자.
    Explanation
    다음은 decimal <=> hexa 의 conversion을 위한 package 생성문으로서
    system user로 수행하여 사용한다.
    create or replace package support as
    function dectohex (a number) return varchar2;
    pragma restrict_references
    (dectohex, WNDS, WNPS, RNDS, RNPS);
    function hextodec (a varchar2) return number;
    pragma restrict_references
    (hextodec, WNDS, WNPS, RNDS, RNPS);
    end support;
    create or replace package body support as
    FUNCTION hextodec(a IN VARCHAR2) RETURN NUMBER IS
    x NUMBER := 0;
    y NUMBER;
    z VARCHAR2(1);
    BEGIN
    IF length(a) > 8 THEN
    RAISE invalid_number;
    END IF;
    FOR i IN 1..length(a) LOOP
    z := upper(substr(a,i,1));
    IF z = 'A' THEN
    y := 10;
    ELSIF z = 'B' THEN
    y := 11;
    ELSIF z = 'C' THEN
    y := 12;
    ELSIF z = 'D' THEN
    y := 13;
    ELSIF z = 'E' THEN
    y := 14;
    ELSIF z = 'F' THEN
    y := 15;
    ELSE
    y := to_number(z,9);
    END IF;
    x := x * 16;
    x := x + y;
    END LOOP;
    RETURN x;
    END hextodec;
    FUNCTION dectohex(a IN NUMBER) RETURN VARCHAR2 IS
    x VARCHAR2(8) := '';
    y VARCHAR2(1);
    z NUMBER;
    w NUMBER;
    BEGIN
    IF a > power(2,32) OR a < 0 THEN
    RAISE invalid_number;
    END IF;
    w := a;
    WHILE w > 0 LOOP
    z := w mod 16;
    IF z = 10 THEN
    y := 'A';
    ELSIF z = 11 THEN
    y := 'B';
    ELSIF z = 12 THEN
    y := 'C';
    ELSIF z = 13 THEN
    y := 'D';
    ELSIF z = 14 THEN
    y := 'E';
    ELSIF z = 15 THEN
    y := 'F';
    ELSE
    y := to_char(z);
    END IF;
    w := trunc(w / 16);
    x := concat(y,x);
    END LOOP;
    RETURN x;
    END dectohex;
    END support;
    drop public synonym support;
    create public synonym support for system.support;
    grant execute on support to public;

    FYI: The new xf86-video-intel (2.9) has just been released:
    http://article.gmane.org/gmane.comp.fre … xorg/40733
    According to the release announcement, the new driver fixes the backlight issue with KMS:
    * Add support for BACKLIGHT property when using kernel modesetting
      (KMS). This allows backlight adjustment with programs such as
      "xbacklight -set <percentage>" or "xrandr --set BACKLIGHT <value>".

  • Incorrect Decimal Notation

    Hello All ,
                  For some of our New Hires are facing Issues during Enrolling for Medical. It displays as u201C22,00u201D instead of u201C22.00u201D and it gives them an error after the election.
    I can do for single user through SU01 and save their Default settings, but what about if there are large number of New Hires.
    Is there a system setting that can be set so that all new users created will have the date/decimal format defaulted to something other than the normal, European format date/decimal.
    Please suggest.
    Thanks,
    CB

    Hi Chandresh,
    Refer the below links:
    Re: How to get decimal notation in 'SU01'?
    User Defaults on user creation
    Profile parameter can be changed for this -  zcsa/moddcpfm
    Rgds,
    Raghu

  • Convert from Comma notation to Decimal Notation, Any FM ?

    Hi Experts,
    I am looking to convert from Europe format to US format for Quantity & amount fields, I mean
    e.g. Europe:  12.3456,78 -> US: 12,3456.78
    pls. i can not use offsetting, replace, pattern, overlay, concatenate etc.
    So, pls. let me know that, Is there any SAP FM for this purpose of DECIMAL NOTATION conversion?
    thanq
    Edited by: Srinivas on Feb 22, 2008 10:48 PM

    use.
    Replace all occurances of ',' in w_value with '.'.
    Check this thread.
    REgarding converting  ','  TO  '.'

  • TV Access Connection​s per-user settings?

    I needed to set up a 2nd user acct profile on my T500 (Win XP Pro) to use for a special purpose and need for the Wireless Radio to be powered off when this user's desktop loads (same as clicking the TVAC icon in the system tray and choosing Power Off Wireless Radio).
    So far my experience has been that any TVAC changes made while using the 2nd user account are carried over to the 1st user acct, and vice-versa.  I would like settings to be on a per-user basis and not applied globally to all users.  Is this possible, and if so how can I do it?
    Using the system tray icon, I was able to have the radio powered off in the 2nd acct and powered on in the 1st acct.  And when the 2nd user's desktop loads the icon is in fact powered off, at least initially, but then the auto-connect popup appears and automatically powers on the radio.  If I could configure the 2nd acct to not attempt to connect automatically that would work for me, but I can't figure out how that is possible.
    Any help is appreciated.
    Regards,
    Frank

    It is not possible to do per user setting in Access Connections.

  • Change decimal notation as per user's profile

    Hi all,
    The input file has a price in the following format:
    1,000.50
    Is there any function module that converts the price as per the user's profile format.
    1,000.50 should be converted to 1.000,50  as per the user's profile setting of decimal notation.
    Regards,
    Chandan

    hi check this.....
    data: test1(10)  type c  ,
          test type p decimals 2 value '1000.50' .
    write test to test1 .
           replace all occurrences of ',' in test1 with '#' .
           replace all occurrences of '.' in test1 with '*' .
            replace all occurrences of '#' in test1 with '.' .
             replace all occurrences of '*' in test1 with ',' .
           write:/ test1 .
    regards,
    venkat.

  • Setting Default Decimal Notation with ISA User Admin

    Hello all,
    I have been trying to find out how I can select a default decimal notation when creating users via ISA User Admin.  My client wishes the default notation to be 1,234,567.89.
    In advance, many thanks
    Jon

    Gun
    Thanks for your response.
    The problem is that customers will be creating their own users via Web Based User Management.  Currently the only way we can amend the decimal notation is via SU01.  This, then, would have to happen for every user because the default notation is not the one we require.  My question is - is there a way of setting the default decimal notation for each user so we do not need to manually amend each user in SU01.
    Thanks,
    Jon

  • Decimal Notation in Forms as per his SAP Decimal Notation

    Hi,
    We need to display all numeric fields in the Adobe Form as per the Decimal notation of the User in his SAP user defaults.
    Also, we need to take care that the currencies have current decimal places.
    Please let us know if this is achievable in Adobe Forms. Is there a way we can set the number format of a field dynamically in Adobe.
    Any pointers in this regard is highly appreciated.....Thanks in Advance.,
    Raghavendra

    Hi Raghavendra,
    to be bale to decide in your abap-printprogram, which format to use for printing, you can read the decimals and number format from customizing (or user) and then pass into form through an additional interface parameter format_string of i.e. CHAR060.
    Place your format string in a hidden textfield on your form
    This format string can then be used in the adobe form to format the text-field using script:
    this.format.picture = your_hidden_textfield.rawValue;
    we do so for date-formats and currency-formatting we read out of the country customizing.
    regards

  • How to do setting of  decimal notation and arithmatic and character note

    Hi colleagues
    I do have one problem
    And the following setting tried in SAP netweaver so do not give any hint for Netweaver
    The problem is stated as follows
    in output type in Germany they use , instead of . the dot signifies point that is .
    and we use , as a seperator in means suppose we have to write 2000 we write like wise means as per our requirement whether we need to mention 2.000 or 20.00 but in germany they use comma ,
    so in output type display point the problems are increasing and they are not getting solved.
    so it is the question of compatibility
    what went wrong i am unable to understand
    is there is any significance of country specific setting of decimal notation
    or any thing need hint towards the same.

    Hi
    For your output type assign a smartform and in the smartfrom write the program that the decimals should come like , instead of . then your requirement can be fulfilled
    Also check in OY04 wheather you can maintain or not
    Regards
    Srinath

  • BestPractices Error - Set Decimal Notation and Date Format

    Hello everyone,
    first of all, I don't know, if this is the right forum for my question, but I hope so
    We're trying to implement the Best Practices Scenarios to a new SAP ERP System.
    We did the steps of the following url, where everything worked fine: http://help.sap.com/bp_dm603/DM_DE/html/index_DE.htm
    Then we integrated Best Practices 603V8 via Solution Builder (TA: /n/SMB/BBI). But now, when we switch to Implementation Assistant and try to activate Scenario DE_109 --> 100(DE) --> Folder USERSETTINGS, we receive the following error in report /SMB99/SU3_O009_B32: Set Decimal Notation and Date Format.
    So we called transaction SU3 and changed Decimal Notation and Date Format, but the error still exists.
    Anybody knows what to do?
    Thanks for your help!
    Best regards
    Patrick
    PS: We executed Testscript /SMB99/SU3_C009_B32 via TA SECATT and there is the error:
    TCD SU3 0,292 sec N Maintain Users Own Data

    Hi,
    Follow below link to verify whatever you have done is correct:
    http://help.sap.com/bp_bblibrary/600/Documentation/B32_BB_ConfigGuide_EN_MX.doc.
    Thanks
    Sunny

  • Global setting for decimal notation setting?

    Experts:
    Where can I set the decimal notation for all users? Is there a global default setting for this?
    I need to display numbers as xxx,xxx,xxx.xx.
    Each individual user can set this in their Maintain User Profile -->Default settings.
    But I need to have the system default for EVERY user to xxx,xxx,xxx.xx.
    Your assistance will be rewarded.
    Thanks
    Den

    Hi,
    Go to SU10 - Mass change. Enter all the User list and make the changes.
    Hope it will help u.

Maybe you are looking for

  • Lirc doesn't work (Lifeview FlyVideo 98FM LR50) SOLVED

    Hi.  (Solution below). I've a problem with lirc. My card used to work with exactly the same configuration for years (first on Slack, then Ubuntu). That's what I've done (btw it's my first day with Arch, and I'm impressed): cp /usr/share/lirc/remotes/

  • Status of the Background Job

    Hello Gurus, My requirement is that I am running a current program in the foreground mode .This program can be run in the background mode. In the program I need to check that whether the program is running is foreground mode.if yes then I need to fet

  • Podcast in iTunes won't download

    I'm a novice at Podcasting but used iWeb and Garage Band to produce a site and podcast that works fine from the Website. However, when I submitted it to itunes and it was accepted, the link supplied won't download. I also have tried using the RSS fee

  • Why is Preview selection greyed out in Font Book?

    I have a problem with Font Book - not the first. All my fonts seem to be listed fine, but when I go to the Preview menu, which is currently on the default selection of 'Sample', I cannot select either of the other two options. They are both greyed ou

  • In my phone 4s near the bettery showing one lock sign with round what is this ?

    in my phone 4s near the bettery sign showing one lock sign with round what is this ?