Change Decimal Notation Format

Hi All
We have a requirement to output currency and quantity fields in a smartform to a different format than is specified in the users settings.
This can be different depending on the country key of the vendor.
Does anyone know of a way to dynamically change the decimal notation of a smartform.
Thank you
Darren

Hi,
Please check this function Module HRGPBS_HER_FORMAT_AMOUNT
or
You can use :
Write <CURRENCYFILED> to <new_field >USING CURRENCY 'USD'.
then you can use New-field in the smartform
Regards
Sudheer

Similar Messages

  • New  Decimal Notation Format Required  For Indian Projects

    Respected Members,
    As at the user level or tcode SU01 only three decimal notations are provided.
    But for country India the decimal notation format is totally different.
    Given decimal notation format is
    1,234,567.89
    And the Required Format For India is
    1,23,456.78
    Becoz we mention the Rupees in this format only.
    And this second format is not available in SPRO also .
    How to create the desired decimal notation and add the corresponding functionality.
    And if we use the given format (1,234,567.89) then when we converting the amount in words through Function module
    SPELL_AMOUNT ,it is not converting properly even though we have maintain the entries in View V_T015Z.
    Suppose our amount is 1,00,000 that is One lakh but it will show in the output  ONE HUNDRED THOUSAND.
    I know that there is another function Module HR_ch_ something to convert in words according to indian currency.
    But it does not solve the issue properly.
    THis DECIMAL NOTATION format for Indian Projects is a BIG MESS.
    So kindly tell me any solution or it is the drawback of SAP.
    So that we can ask SAP to append this Decimal Notation and required Functionality for the Indian Projects.
    Kindly Send Your Valuable answer and Try To Make clear picture and SAP Technical People if Reading this thread then kindly give stress on the REQUIRED DECIMAL NOTATION.
    THANKS A LOT.

    Hi Manish please you can try this code
    REPORT ZAMOUNT_CONVERSION.
    DATA : RESULT1(20).
    PARAMETERS : NUM TYPE P DECIMALS 2.
    DATA : num2 type STRING.
    DATA :  col_amt(20) type n,"15
             col_b type i,
             num_1(20) type C,"15
             Length type i.
    num_1 = num.
    write : 'default format      :',num.
    uline.
    skip.
    IF ( num >= 999999999 ).
           write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.
           CONDENSE col_amt.
           length = STRLEN( col_amt ).
           if length = 16.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
           write :/'amount indian format:',col_amt.
           endif.
    ELSEIF NUM < 999999999 AND NUM >= 9999999.
           write num_1 using edit mask 'RR__,__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           if length = 13.
             REPLACE first OCCURRENCE OF ',' in col_amt with space.
             write :/'amount indian format:',col_amt.
           else.
             write :/'amount indian format:',col_amt.
          endif.
    ELSEIF NUM < 9999999  AND NUM >= 99999.
           write num_1 using edit mask 'RR__,__,______' to col_amt.
           condense col_amt .
           length = STRLEN( COL_AMT ).
           write :/'amount indian format:',col_amt.
    ELSEIF NUM < 99999.
       data : dumy(10) type c.
       dumy = num .
       CONDENSE dumy.
       length = STRLEN( dumy ).
         if length <= 6.
           write :/'amount indian format:',num.
           else.
           write num_1 using edit mask 'RR__,______' to col_amt.
           write :/'amount indian format:',col_amt.
          endif.
       ENDIF.
       uline.
    create a function module with this code .hope this will solve the issue.

  • 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.

  • Impact on changing decimal notation at country setting

    Hello,
    There is a need to make change in the decimal notation in country setting (T005-XDEZP) from 1.234.567,89 to 1,234,567.89
    The company in this country is a live company since last couple of years.
    In case we make changes in t-code OY01 & change the decimal notation from 1.234.567,89 to 1,234,567.89,
    1. What will be overall impact?
    2. Will it affect
        a> posting
        b> reporting
        c> printing
        d> history data
        e> any other impact
    Thanking you in advance
    Regards
    Santosh

    Hi all,
    Although my functional has submitted a request to SAP on this issue, but i still hope by letting this issue still open in this forums that there are still ideas for this weird problem... su01 not saving the latest decimal notation...
    I will get back to everyone if there is an update from SAP.
    Thanks
    William Wilstroth

  • How to change Decimal Notation based on User settings programmatically?

    Hello All,
    Like cl_abap_datfm=>conv_date_ext_to_int  and cl_abap_datfm=>conv_date_int_to_ext which changes the date format ,is there any class/method which changes the number format......I mean decimal and thousand separator format. I have to do that based on the User settings which I am getting from USR01 table. But not getting any class/method where I have to submit the number along with the format to get the format as per user settings.
    Thanks in Advance.
    regards.
    Sarbajit.

    Hi Sarbajit,
    No need for FM. Try like below using 'Write To' statement,
    Declare a variable of type P.
    Move ur number to that variable.
    Then Write that variable to variable of type Char.
    Now Char variable will contain value according to the User Decimal Settings.
    PARAMETERS: num TYPE i DEFAULT 9999.  " Enter ur number
    DATA: qty TYPE p DECIMALS 3,  " Variable of Packed type
                ch(13) TYPE c.  " Character variable
    qty = num.          
    WRITE qty TO ch.     " According to Decimal format in SU01, value is written
    WRITE ch.
    Thanks,

  • 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

  • Changing decimal format

    Dear experts,
    I want to know how to change the decimal notations format..presently my system is showing comma after every 2 decimals but it should appear after every 3 decimals .
    we are working for a Nigerian client.
    For example : 1,00,000.00 should displayed as 100,000.00
    Regards,
    Rajeev.
    Edited by: rpillaiv on Jun 22, 2011 2:52 PM

    Hi,
    Apart from SU3, we can have country specific decimal pt notation.  T-code OY01.
    SPRO path:  IMG > SAP netweaver > General setttings > Set countries > Define countries in mySAP systems. 
    Go to country code NE - Niger, which is your country I guess. At the end, you have an option to control this.
    Regards,
    P Gomatheeswaran

  • Use custom Decimal Notation

    In user master there are three default decimal notation. We want to define a new decimal notation format.
    Is it possible to define a custom decimal notation format.
    We changed the domain "XUDCPFM" & add one new format. New format is visible in SU01 decimal notation dropdown list. But when we assigned it to the user, output is not appeared as per mentioned format
    Edited by: HP BASIS on Mar 23, 2009 12:42 PM

    I had the same problem
    You have to log off and log on SAP to take changes.
    It works for me.
    Edited by: Eduardo Luiz Nunes Ribeiro on Apr 22, 2009 3:39 PM

  • Regional Settings Decimal Notation

    Hi - Quick question here
    I want to default a specific Decimal Notation for our field sales team and do not want them to have to go to the Personalize menu to change.   How do I do this?   I have reviewed the Admin Guide but could not find any details on how to do this.
    Thanks,
    Jeff

    Hi Jeff,
    The decimal notation depends on the personalized settings of each user.
    In the current release of the system these changes are user specific i.e. all your users will have to change it with their respective logins to be able to use the required decimal notation.
    I’ve heard there is a plan to deliver a report which enables changing decimal notation for mass employees, but there is no commitment for this.
    Best Regards,
    Cristiano Rosa

  • External table.How to load numbers (decimal and scientific notation format)

    Hi all, I need to load inside an external table records that contain 7 fields. The last field is called AMOUNT and it's represented in some records with the decimal format, in others records with the scientific notation format as, for example, below:
    CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Jan;11200100;'60800;CYZ900;41380,77
    The External table's script is the following:
    CREATE TABLE HYP_DATA
    COUNTRY VARCHAR2(50 BYTE),
    YEAR VARCHAR2(20 BYTE),
    PERIOD VARCHAR2(20 BYTE),
    ACCOUNT VARCHAR2(50 BYTE),
    DEPT VARCHAR2(20 BYTE),
    ACTIVITY_LOC VARCHAR2(20 BYTE),
    AMOUNT VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY HYP_DATA_DIR
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'HYP_BAD_DIR':'HYP_LOAD.bad'
    DISCARDFILE 'HYP_DISCARD_DIR':'HYP_LOAD.dsc'
    LOGFILE 'HYP_LOG_DIR':'HYP_LOAD.log'
    SKIP 0
    FIELDS TERMINATED BY ";"
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    "COUNTRY" Char,
    "YEAR" Char,
    "PERIOD" Char,
    "ACCOUNT" Char,
    "DEPT" Char,
    "ACTIVITY_LOC" Char,
    "AMOUNT" Char
    LOCATION (HYP_DATA_DIR:'Total.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    If, for the field AMOUNT I use the datatype VARCHAR (as above), the table is loaded but I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation as:
    CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Feb;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Mar;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Dec;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    All the others records with a decimal AMOUNT are loaded correctly.
    So, my problem is that I NEED to load all the records (with the decimal and the scientific notation format) together (without records rejected), but I don't know which datatype I have to use for the AMOUNT field....
    Anybody has any idea ???
    Any help would be appreciated
    Thanks in advance
    Alex

    @OP,
    What version of Oracle are you using?
    Just cut'n'paste of you script and example woked FINE for me.
    however my quation is... An external table will LOAD all data or none at all. How are you validating/concluding that...
    I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation
    select * from v$version where rownum <2;
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    select * from mydata;
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Feb     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11200100     '60800     CYZ900     41380,77
    CY001_STATU     2009     Mar     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Dec     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11200100     '60800     CYZ900     41380,77MYDATA table script is...
    drop table mydata;
    CREATE TABLE mydata
    COUNTRY VARCHAR2(50 BYTE),
    YEAR VARCHAR2(20 BYTE),
    PERIOD VARCHAR2(20 BYTE),
    ACCOUNT VARCHAR2(50 BYTE),
    DEPT VARCHAR2(20 BYTE),
    ACTIVITY_LOC VARCHAR2(20 BYTE),
    AMOUNT VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY IN_DIR
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'IN_DIR':'HYP_LOAD.bad'
    DISCARDFILE 'IN_DIR':'HYP_LOAD.dsc'
    LOGFILE 'IN_DIR':'HYP_LOAD.log'
    SKIP 0
    FIELDS TERMINATED BY ";"
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    "COUNTRY" Char,
    "YEAR" Char,
    "PERIOD" Char,
    "ACCOUNT" Char,
    "DEPT" Char,
    "ACTIVITY_LOC" Char,
    "AMOUNT" Char
    LOCATION (IN_DIR:'total.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;vr,
    Sudhakar B.

  • Decimal Notation in SU3 keeps on reverting after I changed

    Hi all,
    I am changing the decimal notation in the DEFAULT TAB at SU3 (user maintenance).
    the problem : the decimal notation always revert back to old selection despite i selected a new one, saved it, log out and login to get refresh.
    How do i stop the decimal notation from reverting to old one after I choose a new and saved it.
    Thanks
    William Wilstroth

    Hi all,
    Although my functional has submitted a request to SAP on this issue, but i still hope by letting this issue still open in this forums that there are still ideas for this weird problem... su01 not saving the latest decimal notation...
    I will get back to everyone if there is an update from SAP.
    Thanks
    William Wilstroth

  • Changing the Decimal Notation of Invoice Smartform

    Hi Gurus,
    Is there a way to change the decimal notation of Standard Invoice Smatform "LB_BIL_INVOICE" ?
    I want to change the decimal notation of Smartform from "1.234.567,89" to "1,234,567.89".
    Please reply.
    Points will b awarded...
    Thanx in Advance..

    there are 2 ways that you can set these
    1. Go to SU01, change the defaults Decimal Notation to X 1,234,567.89
    2. If you have done 1st step, the notation still didn't change, put the below code in the initialization of smart forms:
    SET COUNTRY ' '.
    These should solve your problem.

  • Changing the Decimal Notation

    Hello Experts,
    We have a request to change the decimal notation of values. Please consider the below example.
    Value: 450000 (Four lakhs and fifty thousand)
    Actual Decimal Notation in the syetm is 450,000.00 (In thousands)
    Expected Decimal Notation: 4,50,000.00 (In Lakhs)
    Please advice where to set this up in the system.
    Thanks in advance,
    Regards,
    Sekar

    Dear,
    Please go to Systems>User Profile>Own data,
    It will open a screen for your user ID, now go to Default Tab and change the decimal Notation as per your requirement.
    Hope this helps!!!
    Br,Vivek

  • How to convert decimal notation to comma notation

    Hi Folks,
    I have an issue in converting decimal notation to comma notation for France.
    I have changed the decimal notation in SU01 from 123.4 to 123,4 but when i run some custom program written by me it is extracting output as 123.4 than 123,4.
    So i want to have the output of report to conver all numerical values(from decimal format to comma format) i.e., 123,4 format from the 123.4 format.
    Please help me in fixing this issue
    Edited by: Nishanth Kumar Reddy Chenchu on Apr 24, 2008 1:16 PM

    Hi Nishant,
    U can use the statement WRITE TO. This will write the data as per the user settings. When ever user changes his settings like decimal notations then this statement will write the data as per the current settings of the user.
    DATA: l_amount1 TYPE wrbtr VALUE '123.45',
              l_amount(16) TYPE c.
    WRITE:/1 l_amount1.
    WRITE l_amount1 TO l_amount.
    WRITE:/1 l_amount.
    Just copy paste above code in a sample program. First execute this program and note the output. Then change the user settings for decimal notations and log of from SAP(Because user settings will become active only after fresh login). Now execute ur report and see the difference. In this way u no need to change the program when ever user changes his settings.
    This thing not pnly applies for amount but also for date, time Quantity fields
    Thanks,
    Vinod

  • Converting char to decimal value format as defined in SU3(User profile)

    Hi Techies,
    Is there any FM to convert CHAR value into Decimal fomat as defined in SU3.
    If we use, WRITE statement for printing the value in decimal format , it shows the value in decimal format correctly
    in SU3 transaction , there are three different decimal format notations which can be user specific
    I would appreciate your valuable inputs ....
    Thanks
    Santhosh

    This is my code in a generic method to transform a table into a csvrow
    when 'P'.
            tmpstr = <p_field>.
            len = strlen( tmpstr ) - 1.
            tmpstr = tmpstr+0(len).
            if <p_field> < 0.
              sign = '-'.
            else.
              sign = ' '.
            endif.
            case decimalformat.
              when 'X' or 'E'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of '.' in cp with ','.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when 'Y' or 'D'.
                split tmpstr at '.' into int frac.
                ptmp = int.
                write ptmp to cp.
                shift cp left deleting leading space.
                replace all occurrences of ',' in cp with '.'.
                concatenate
                  s
                  sign
                  cp
                  frac
                  delimiter
                into s in character mode.
              when ' '.
                concatenate s sign tmpstr delimiter into s in character mode.
              when others.
                concatenate s '????????' delimiter into s in character mode.
            endcase.
    where pfield is a fieldsymbol type P. (honestly ist from type any, but determined by RTTI). I needed this cause i want to format the value from "outside" without taking the user settings in consideration as write...to.. is doing.
    What i'm doing is to use the write... to... clause modifying the result (change decimal point, thousand separator and sign) according to the demanded decimal notation.
    Edited by: Rainer Hübenthal on Oct 7, 2009 4:47 PM

Maybe you are looking for

  • Business Content for Bill Up transaction in CRM system

    To all Experts, I'm currently working on a project that requires Bill Up transactional data ( Source Table: CMSD_BU ) to flow from CRM to BW system. I'm looking for Business Content that can fulfill this requirement. However, till to date, I couldn't

  • Variable color in SVG export

    Hello, we are in the process of designing a website for one of our customer, with the goal of making them self-sufficient in feeding the site with new products. One of the feature requires producing custom SVG files which are then rendered to PNG (wh

  • Creation of Import Control/commodity codes and Language translation

    Dear All, My requirement is to maintain new control codes for country India for the different Custom duty rates and to maintain the condition records for all the condition types associated with Customs Duty. 1) I have already maintained chapter-ids i

  • Recover Files from Web Site I created?

    I created a site at mac.com but the original files were accidently deleted. Is there any way to download or import the flies from the web site into iweb so I can work with them? Thanks!

  • Where is the eject button?

    This is a simple question, where is the eject button on itunes? My ipod says 'hit eject before disconnecting". I saw it once before, but now I can't remember where I saw it!