Casting Number as Char - how to hide decimal places?

I am casting a number as a Char because I am concatenating it with other things. The problem is that when I cast to char, it displays two decimal places of just 0's. I really don't want to show the decimal place or anything after it. Is there a way to remove them?
Thanks

Hi,
You can have two approaches for the same.
1> cast( cast(column as int) as char)
2> Go to the column properties(i.e the finger mark on the coulmn heading). Then select the data format tab and check the override the default data format tab. Then you can set the decimal places.

Similar Messages

  • How to maintain decimal places in BOM Qty & what is the essence of base qty

    Hello PP members
    How to maintain decimal places in BOM Qty & what is the essence of base quantity in BOM ?
    Thank You

    ur first question is not understood, You can have maximum of 3 decimals in BOM item qty.
    Base qty is the qty which is refered to all the BOM items.
    example -
    Product X, base qty 1
    Raw material 1 - componen t qty= 1
    Raw material 2 - Component qty= 5
    This means To produce Product with qty1, it needs raw material 1 qty 1  and raw material 2 qty 5.
    This means To produce Product with qty10, it needs raw material 1 qty 10  and raw material 2 qty 50.
    This is the meaning of Base qty..it is the referece qty refered to all the components.
    About the decimal places
    let us say  example 2
    To produce Product with qty1, it needs raw material 1 qty 1  and raw material 2 qty .0001.
    When you enter this in SAP for the raw materialm 2 system will give error message that you  need to enter the qty with maximum 3 decimal places, hence you need to enter as below
    Product with qty10, it needs raw material 1 qty 10  and raw material 2 qty .001.
    This is how you need to adjsut the base qty and component qty with decimalplaces moer than 3,
    pl come back

  • Hide Decimal places if they are 0

    Hi,
    is it possible to hide the decimal places if they are 0?
    For Example, if the number is "123.00" I want to display "123" in the decimal field and if it is "123.45" it should show "123.45".
    Regards
    Gerhard

    Hi,
    Stumbled upon this thread via a google search.  I'm looking for an answer to the exact opposite of the question Gerhard8 has raised.
    I've entered a decimal field in the PDF I'm creating via Livecycle.  When previewing it a value entered as "123.00" is automatically converted into "123" when the user exits out of the field.  I don't want it to do that.  I want "123.00" to stay as "123.00". 
    Is there a particular numeric pattern used to achieve that?
    Many thanks
    Susith

  • How to decrease decimal places in invoices

    Good day,
    How do i drecrease decimal places in invoices. For example , i have set the decimal places to 4 for costing purposes but i want the final invoice to be 2 decimal places for display purposes. i have tried decreasing the decimals using the decrease decimals icon but the decimals are still 4.
    Thanks

    Hi Wendy,
    This is System Standard that If you increased Decimal Place then you can not decrease those decimal Place again.
    If you want this then you can do this in (Print of Document) Document Layout through Crystal Report.
    Hope this help
    Regards::::
    Atul Chakraborty

  • In VC WEBDYNPRO compiler mode, how to set decimal places to 2

    The compiler mode is webdynpro,
    The ivew table column's data type is num type,
    The column show a curreny data.
    Now the problem is when the num data is like a number as "1000.00",the ".00" will not show,but when the value is "1000.01" ,it show "1000.01". I want it always show  the formatting like "X.XX".
    There is also no formatting property to set in the column like in flash compiler mode then i can set decimal places to 2.
    What should i do?

    Hi,
    You can use Decimal Format Class and declare something like:
    DecimalFormat df = new DecimalFormat("#,##0.00;(#,##0.00)");
    wdContext.currentContextElement().setSueldoTxt(df.format(wdContext.currentOutputSueldoElement().getPe_Betrg()));
    You'll have the two decimals...!!
    Good Luck and regards,
    Maria Margarita Monteverde

  • How to concetenate decimal place

    hi
    i have declared a variable as
    var_ad_addtn(16)  TYPE p  DECIMALS 10.
    now the value is coming as two decimal place i want to truncate the decimal place and only show as integer but i cannot declare like integare and the field value passed to this variable is type curr and upto two decimal place
    what i am doing is var_ad_addtn+(.0). but this is not working please let me know the syntex and statement for truncating and not display the decimal place value from a value
    eg 1232834.90 i want to show as 1232834 only
    regards
    arora

    Hi Nishant,
    Then try the following fucntion modules:
    HR_NZ_ROUNDING_DECIMALS
    ROUND
    CALL FUNCTION 'ROUND'
        EXPORTING
          DECIMALS      = 0
          INPUT         = var1
          SIGN          = '-'
        IMPORTING
          OUTPUT        = var1
        EXCEPTIONS
          INPUT_INVALID = 1
          OVERFLOW      = 2
          TYPE_INVALID  = 3
          OTHERS        = 4.
      IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards,
    Chandra Sekhar

  • How to allows decimal place for unit of measure of order confirmation

    Hi Guys
    we have some special cases here that need to confirm the order quantity as decimal place,is that possible made some customizing in code CO11N? or have some ways support it .....
    ex. work order A   10 EA
    - operation 1   : colse 10 EA
    - operation 2   : close 4.5 EA
    Regards/Eric

    Hi,
    You can set a UoM to allow decimals in transaction CUNI. But i fail to understand why you would want to set EA to have decimals.
    If a material is to be managed in decimals then evaluate the usage of a different UoM which allows for decimals.
    Regards,
    Vivek

  • How to avoid decimal places in smartorms

    hi friends,
    i have to display a field VBAP-KWMENG (order quantity) in samrt forms it has a value 1.000  but it is display ing as 1,000.
    how can i avoid those zeroes after the 1 my req is to print 1.
    KWMENG is a data element with packed decimal as (15,3).
    i tried VBAP-KWMENG(Z), VBAP-KWMENG(T) , VBAP-(KWMENG(K),
    but it is not supprssing those zeroes.
    pls urgent........
    thanks in advance.
    VENUMADHAV

    Hi
    Declare a local Variable in the program line.
    L_display of type char .
    Pass 1 to l_display .
    In the ouput field pass &l_display& .
    Hope this helps .
    Praveen

  • How to find decimal place?

    If I have a number such as:
    123.45
    how can I figure out that the number has a decimal point greater then 0? I just want to isolate the decimal part and compare it's value, but I'm not sure what a good way to do that would be. My first thought was to change it to a string and then back again, but I'm not sure if that is a good way.
    Message was edited by:
    bclark

    public class Test
         public static void main(String args[])
              double number = 123.45;
              int intValue = (int)number;
              System.out.println( number > intValue );
              number = 123.00;
              intValue = (int)number;
              System.out.println( number > intValue );
    }

  • How to change decimal places in currency

    Hello ,
    I am an abapers,I Have one problem while displaying the currency fields in my Report.
    My problem is In Fbl5n,it displaying amounts as 50,000 for document number,
    But in my database,It is storing as 500,00 for that document number.I need to store the amount as 50,000. is there any settings to be changed to solve this problems
    For this how can i solve this problem.
    Waiting for your favourable reply
    Regards
    Maruthi

    Hi
    You can change your profile in SU3 transacton.
    Thanks
    Ashok
    Assign points for useful answer

  • SQL*Loader how to handle decimal place

    Hi all
    I need to load data into table with number field (12,2)
    however, the source data is 1,025.02. Then the data cannot be loaded and in log, there is error message Invalid Number
    Please kindly advise how to handle this in control file?
    Thanks
    Thomas

    load data
    ,YOUR_NUMBER_COLUMN .... ... ... " to_number(:YOUR_NUMBER_COLUMN,'999G999D99' , 'NLS_NUMERIC_CHARACTERS=''.,'' ')"
    )

  • How to correct decimal places in script

    Hi,
    I have a packed integer variable. The value stored in that variable is 8,156,265.598.
    But i want it as 8.59 in the form.
    How to achieve this?
    Ezhil.

    use [this link|http://help.sap.com/saphelp_nw04/helpdata/en/1c/f40c6fddf311d3b574006094192fe3/content.htm] on formating numerics fields for display.. [<click>|http://help.sap.com/saphelp_nw04/helpdata/en/1c/f40c6fddf311d3b574006094192fe3/content.htm]

  • Does anyone have any idea how do i key in number that contains 20digit, 17 decimal places?

    I need to key in a number that contains at least 17 decimal places using numeric digit control and i need to use expression note as well. Can anyone help?

    After laying down a numeric control right click on it and select "Format and Precision..." to change the number of decimal places. You can also right click and change the "Representation" of the numeric control. By default it will be a DBL which is a 64 bit decimal number with an approximate range of 10**(-308) to 10**308. This is about 15 decimal digits of precision. I know SGL will only give you 10**(-38)to 10**38, which is about 7 decimal digits of precision. Neither of these will cut it for what you are trying to do.
    I would recommend using the Extended Precision (EXT) representation. According to the linked document La
    bVIEW's implementation of the Extended Precision follows the IEEE 80-bit spec(on Windows OSes). Supposedly even the IEEE 128-bit spec(not implemented on the Windows OSes)only gets you 19 decimal places but I am not sure what the limitations of LabVIEW's implementation are. (I found a good table in the LabVIEW help title, "Numeric Data Types Table".)
    I was able to successfully get 17 digits after the decimal point but that was with a leading 0 only before the decimal point. I think you may just be approaching the limit of how a number can be represented in this programming language.
    Anyone else?
    -scraggs99

  • How to put both number and char in values?

    Hi ,
    Cud anyone tell me how can i put both number and char value in one colun. Such as i want to put ..(A121)..in REFNo column . so it includes both number and char .how can i do this?

    Hi,
    If you will ever want to treat the numeric part of refno as a NUMBER, then I suggest you store the values in two separate columns, refno_alpha and refo_num. For example, if "ORDER BY refno" should produce:
    A1
    A1.1
    A2
    A10
    A11
    A100
    A121
    B1then it will be easier to have two columns.
    When necessary, you can always combine the two columns (using "refno_alpha || refno_num"). You can create a function-based index and/or a view with that expression if it helps you.
    Also, as William said, validation is easier if the numbers are separate.

  • Number formatting with either 2 decimal places or none

    Hello,
    I'm using Acrobat 8 in XP and not familiar with Javascript.
    I have some dollar amount fields where I need it to be number formatted, and limited to 2 decimal places but leave the user the ability to enter only an integer.
    ie, go to two decimal places if any of
    > .
    > .0
    > .00
    > .000(...)
    are present but leave it off if none are present.
    I assume I need a custom format script but I've not been able to learn enough to figure it out yet.
    If anyone can give me some code I can edit and paste, that would be great. Any help is appreciated.

    > Have a String as "3.0000000"
    String s = "3.0000000";
    System.out.printf("%.2f", Double.parseDouble(s)); // 3.00
    Formatting - Numbers and Currencies
    ~

Maybe you are looking for