Sap Script : getting comma in place of decimal point & viceversa

Hi experts
In one Sap script for 2 currency fields comma is there in place of decimal point & viceversa.(But rest of currency fields are getting displayed correctly.)
ex: 1426.88  is printed as 1.426,88
please provide me solution as early as possible
Thanks & Regards
Swathi Vuddala

Hi Swathi,
Check this info.
I am providing two ways with some sample code, you modify it accordingly to your code.
THIS PROCEDURE IS BY CHANGING SETTINGS :
In your user profile, change the decimal format you are currently using.
System->User Profile->Own data.
Go to defaults tab and then change your decimal notation.
THIS PROCEDURE IS WITHOUT CHANGING DEFAULT SETTINGS:
Report YH642_TEST.
TABLES:
mard.
DATA : W_mard_labst type p decimals 3,
w_dt1(18).
data:
W_N TYPE I.
SELECT SINGLE * FROM MARD INTO MARD WHERE LABST = '10000.00'.
WRITE: mard-labst .
W_mard_labst = mard-labst.
WRITE:/ W_mard_labst .
w_dt1 = w_mard_labst .
write W_mard_labst to w_dt1.
Hope this resolves your query.
Reward all the helpful answers.
Regards

Similar Messages

  • How to get only two digits after decimal point of an expression

    i am doing simple multiplication between two float numbers.
    both the numbers have two digits after decimal point.
    so naturally the result will have 4 digits after decimal point.
    i want to get only two digits after decimal point.
    help me please...

    If you just want to limit the displayed decimal places, you can do the following...
    import java.text.*;
    public class Formatting {
        public static void main(String[] args) {
            NumberFormat format = NumberFormat.getNumberInstance();
            format.setMaximumFractionDigits(2); //what you seem to want
            format.setMinimumFractionDigits(2); //if you always want at least 2 digits displayed
            System.out.println(format.format(12.345));
            System.out.println(format.format(12.0));

  • FM to get only quantity without its decimal points

    hi guys,
    is there any FM that can enable to get only qty without its decimal points without rounding up.
    e.g.: 500.12 , i need to get only 500 and exclude .12

    Hi Ester,
    U dont need any FM for that. You can use a simple logic like shown below:
    data: lv_quant  TYPE p DECIMALS 3 VALUE '500.96'.
    DATA: lv_out  type i.
    lv_out = trunc( lv_quant ).
    write lv_out. "this will have your result
    Regards,
    Prakash

  • Comma is showing in place of  decimal point  ( smartform)

    Dear All
    When i try to display quantity or amount field with decimals in smartform report,  system is displaying comma instead of decimal point. for e.g 1200.50 is displayed as 1200,50.
    Please advice.
    Ravindra Suvarna

    posting part of the code for your verification. Pls let me know is you need any further information.
    Form Interface
    IS_BIL_INVOICE     TYPE     LBBIL_INVOICE
    IS_NAST          TYPE     NAST
    IS_REPEAT     TYPE     NA_REPET
    Global Definitions
    WA_EXCISE     TYPE     LBBIL_HD_KOND-KWERT
    WA_CESS          TYPE     LBBIL_HD_KOND-KWERT
    WA_CST          TYPE     LBBIL_HD_KOND-KWERT
    WA_TCS          TYPE     LBBIL_HD_KOND-KWERT
    WA_FREIGHT     TYPE     LBBIL_HD_KOND-KWERT
    WA_INVVAL     TYPE     LBBIL_HD_KOND-KWERT
    WA_ITMVAL     TYPE     LBBIL_HD_KOND-KWERT
    WA_RATE          TYPE     LBBIL_HD_KOND-KWERT
    WA_EX_WORDS     TYPE     CHAR_200
    WA_IN_WORDS     TYPE     CHAR_200
    WA_NUM_CHR     TYPE     CHAR_18
    WA_VTTK          TYPE     S_VTTK
    TOT_NETWT     TYPE     PNUM
    TOT_GRSWT     TYPE     PNUM
    T_NETWT          TYPE     PNUM
    initialization
      PERFORM CHECK_INVOICE USING  IS_BIL_INVOICE
                            CHANGING WA_EXCISE
                                     WA_CESS
                                     WA_CST
                                     WA_TCS
                                     WA_FREIGHT
                                     WA_INVVAL
                                     WA_ITMVAL.
    Form Routines
    FORM check_invoice USING is_bil_invoice TYPE lbbil_invoice
                       CHANGING wa_excise   TYPE lbbil_hd_kond-kwert
                               wa_cess     TYPE lbbil_hd_kond-kwert
                               wa_cst      TYPE lbbil_hd_kond-kwert
                               wa_tcs      TYPE lbbil_hd_kond-kwert
                               wa_freight  TYPE lbbil_hd_kond-kwert
                               wa_invval   TYPE lbbil_hd_kond-kwert
                               wa_itmval   TYPE lbbil_hd_kond-kwert.
      DATA : wa_kond TYPE lbbil_hd_kond.
      DATA : wa_ikond TYPE  lbbil_it_kond.
      CLEAR wa_excise.
      CLEAR wa_cess.
      CLEAR wa_cst.
      CLEAR wa_tcs.
      CLEAR wa_freight.
      CLEAR wa_invval.
      CLEAR wa_itmval.
      LOOP AT  is_bil_invoice-hd_kond INTO wa_kond. "header sub total
        CASE wa_kond-kschl.
          WHEN 'JEXP'.
            wa_excise = wa_excise + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'JECP'.
            wa_cess   = wa_cess   + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'JLST' OR 'JCST' OR 'JIVC' OR 'JIVP'.
            wa_cst    = wa_cst + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'ZTCS' OR 'ZTCX' OR 'ZENT' .
            wa_tcs    = wa_tcs + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
          WHEN 'ZFRC'.
            wa_freight = wa_freight + wa_kond-kwert.
            wa_invval = wa_invval + wa_kond-kwert.
        ENDCASE.
      ENDLOOP.
      LOOP AT is_bil_invoice-it_kond INTO wa_ikond. "item value
        wa_itmval = wa_itmval + wa_ikond-kwert.
      ENDLOOP.
      wa_invval = wa_invval + wa_itmval.
      IF wa_invval NE  is_bil_invoice-hd_gen-bil_netwr.
        MESSAGE e002(sy) WITH 'Invoice total Error. Pls Check the Pricing Conditions'.
      ENDIF.
    ENDFORM.                    "check_invoice
    Display
    &WA_ITMVAL(11.2)&
    &WA_EXCISE(11.2)&
    &WA_CESS(11.2)&
    &WA_CST(11.2)&

  • SAP Script - Getting Started

    Hi all,
    Pls help me in developing an SAP Script form from the scratch.

    Arul,
    1. Take transaction SE71. Give a name starting with Y or Z.
    2. Create a window
    3. Create a praragraph
    3. Create page windows
    4. Attach window to page window
    5. Write the code in the window text element
    6. Activate form
    Create a print program. Use the function modules OPEN_FORM, WRITE_FROM and CLOSE_FORM to call the SAPScript created.
    Please look at the following site for more info.
    http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
    Thanks
    Vinod

  • Why does TestStand use both comma and period for decimal point separation?

    TestStand stores our test data to a SQL server using SQL Server Stored Proc, but for some reason a comma is used for separation (double values) for "PROP_NUMERICLIMIT.HighLimit" and "PROP_NUMERICLIMIT.LowLimt", but not for "PROP_RESULT.Data" (or any other numeric value field). Why is that? I haven't been able to figure out if it is a bug or if I have missed some step in the configuration.

    I ran across this in the TestStand Help. You might want to try the change in the ODBC Administrator.
    When you use the MySQL ODBC driver and the operating computer specifies a comma character as the decimal symbol character, the ODBC driver might return an error because the ODBC driver internally converts a floating-point value to a string value. The computer locale causes MySQL to interpret the comma decimal symbol character in the SQL syntax as a multi-value list character separator. Configure the MySQL data source in the ODBC Administrator and enable the Don't Use Set Locale option in the Miscellaneous Options section to resolve this error.

  • SAP Script - get a message "update was terminated for author......."

    Hi,
    I am try to print a purchase order(me22n) into form(script form), Gettin the following fatal error - No SAPscript message exists. and one message in pop-up window is coming up like : "Update was terminated for user...."
    TD 000: No SAPscript message exists
    Any one came across this error.
    Pls treat it as urgent. i will reward for every helpful responses.
    Cheers
    Bobby

    Hi,
       Thank u for quick response.
       but already  have maintained driver program and forroutine in TCODE - NACE in Quality system.
    Thx in Adv.
    Bobby

  • Comma instead of decimal point

    Is there a global way to doubles and floats to use a comma instead of a decimal point (like we do in Europe) when output as a string? (as opposed to having to reformat each number individually every time I want to display it)

    Kramis wrote:
    Thanks. Writing code internally is no problem with a dot. Will the locale of my computer determine the string output style automatically?I'm not sure what exactly to change on your PC to make that happen, but yes, I believe you can do this. This varies on every OS, of course, but you should look into your OS's country- and/or location settings.
    Kramis wrote:
    ... but then I assume I have to use it every time I output to a string with each individual number.That is correct.
    Kramis wrote:
    ... I was hoping for a more global method.You could place the formatter(s) in a separate class and invoke them from there: no need to create new formatter(s) every time you want to display a number. But you will have to do yourFormatter.format(aDouble) every time though.

  • Step by step procedure to design  a form using SAP Scripts (SE71)

    Hello Experts, I am new to SAP Scripts ...I am interested to learn SAP Scripts,
    Please help me out to learn SAP Scripts  by giving some example codes.
    Thanks and Regards,
    Shaik.

    check the following link for the same.
    SAP Script, Change form , SE71
    Regards,
    Gauravjit
    Reward points if the link is helpful

  • How 2 debug a Perform subroutine in sap script

    Hi,
    I have a perform endperform in Script. But tht is not working in some case. i m trying to debug but i m not able to go inside the routine and see wht it is doing? . can any one help me how to debug a subroutine in sap script.

    Hi Panigrahi,
    1) Put a break point in your perform.
    2)  YOu should change the dispatch option in your Output screen of the transaction which triggers your sap script. The dispatch option should be 1 (Send with a periodically scheduled job).
    Then save your transaction.
    3) Go to se38 and run the program RSNAST00.
    Give the Object Key as the Document Number for which you are triggering the script output.
    The control will stop in your perform.
    Regards,
    Ravi

  • 2 Decimal points in inventory module

    Dear Expert,
    In SAP 2005, inventory module allowed for 6 decimal points somehow in SAP 2007, it does not allow for 6 decimal points only 2 decimal points are allowed.  When I try to zerolise my Inventory quantity, they still remain some quantity in the in stock field.
    Please advice.
    Regards,
    Saw Hua, Ng

    Hi,
    Refer this thread for what the decimal settings determines
    Difference between Decimal places for  Quatities and Units
    Even if the quantity is set to 6 decimal,the item master shows only 2 decimal places.
    Where as in the documents you can use upto 6 decimal places and same is stored in the OITM table.
    And also you can only increase the decimal places and once if it increased it cannot be decreased in 2007 version,refer this note:1147799 on the same.
    Hope this clarifies your issue !

  • Adding a decimal point to a number column

    I have a column defined as number(10,2)
    I've imported data to this column from a betrieve database which did not use decimal points, so my data looks like this:
    13000
    2000
    I need to update this column and place a decimal point in front of the last two zeros, so the new data would look like this:
    130.00
    20.00
    Any suggestions on the best way to accomplish this?

    yes, all the data ends with double zeros and all the data is end the same format.
    I gotcha! There is no need to insert a decimal if I divide the 100! Dah!
    Thanks!

  • How can see upto 2 decimal points

    how can i get the result upto 2 decimal points in a variable which is of
    double type, when i do
    system.out.print(variable name);

    Use DecimalFormat.
    DecimalFormat td=new DecimalFormat("0.00");

  • How do I create new photoshop doc using 3 decimal points without it defaulting to 2 decimal points?

    I am creating a new document in Photoshop at the following dimensions. 3.889"w x 6"h. After document is created I go check the canvas size or the Image size and it shows my document as 3.89"w x 6"h. How do I get Photoshop to allow 3 decimal points?

    I think that the way measure units work in photoshop, i try to draw a rectangle marquee and only two decimal point appear.
    I tried in indesign CS6 and 3 decimal work fine.

  • Help with decimal points

    hi,
    I'm trying to add commas, and 2 digit decimal point after a number. Can someone please help me with this small query.
    for example:
    63000 -> $63,000.00
    15000 -> $15,000.00
    2789164.15 -> $2,789,164.15Here is my code:
    select  '$'||ADJSTD_AMT
    from    finance.bud_lines
    where   fyr =2012Thanks in advance

    Rooney wrote:
    hi,
    I'm trying to add commas, and 2 digit decimal point after a number. Can someone please help me with this small query.
    for example:
    63000 -> $63,000.00
    15000 -> $15,000.00
    2789164.15 -> $2,789,164.15Here is my code:
    select  '$'||ADJSTD_AMT
    from    finance.bud_lines
    where   fyr =2012Thanks in advancewhen all else fails Read The Fine Manual
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions201.htm#SQLRF06130

Maybe you are looking for

  • IE problems with vertical spry menu bar

    hi, first of all: I'm aware that this problem has been discussed before. but nothing I've found so far has really helped me. the problem is that my vertical spry menu bar doesn't work properly with the internet explorer. I've (clumsily) repositioned

  • Safari won't update fromVersion 5.0.5 to5.1.7

    Safari won't update fromVersion 5.0.5 to5.1.7

  • [SOLVED] Losing more and more space everyday

    Hello, During around 2 weeks I have a really strange problem: I'm loosing more and more free space everyday, and I can't figure what cause that. The system is installed on a 12GB ext4 partition. My home is on it but as I move data to another partitio

  • Want to change Tax Code Rate

    Hi <b>Using SRM 5.0 Ext Class Scenario. Tax calculation occurs in R/3.</b> I want to change the Tax rate. As I am creating SC & PO in EBP. I use TAX CODE. Now I want to change the tax rate of Ecess from 2% to 3%. Can u please tell me whether I can ch

  • Help with distinct

    I need to return the cust_id and the count of the distinct names for this customer as in-line view (requirement), but having troubles because Oracle doesn't see the statements inside the second brackets. Please, help me with that. Thanks a lot, tom s