Add zeros after decimal point

hello friends,
in smartform i have one field which is in currency i have declared it in currency also so output like 40.000,00 but actually 40,000.00 when i have converted it in string it is like 40000 but i need in 40000.00 form so how can i do it.
thanks in advance

Hi,
You can use Character Type Variable with length 15 so when you pass this Currency value it would be as your requirement is.
Check this small program.
DATA: output(15).
data: wrbtr type bseg-wrbtr.
SELECT SINGLE wrbtr FROM bseg INTO wrbtr.
output = wrbtr.
condense output.
WRITE output.
Thanks,
Prashanth

Similar Messages

  • How to remove zero after decimal point.

    hi friends
    how to remove the zero after decimal points.
    example :
    123.450 -- if print only 123.45
    45.600  - 45.6
    any body help me.
    thanks
    pauldhama

    go through this example
    it may help u
    DATA: T(14) VALUE ' abcdefghij',
    STRING LIKE T,
    STR(6) VALUE 'ghijkl'.
    STRING = T.
    WRITE STRING.
    SHIFT STRING LEFT DELETING LEADING SPACE (or use 0 to detete 0).
    WRITE / STRING.
    STRING = T.
    SHIFT STRING RIGHT DELETING TRAILING STR or 0.
    WRITE / STRING.
    Output:
        abcdefghij
    abcdefghij
            abcdef

  • How to keep the zero after decimal

    Hi,
    I'm trying to store numbers into one of the custom table column. This column must contain unique value for each record.
    Now the issue is if i want to insert a record with zero after decimal point its removing that zero.
    Emp Id (number)
    1234.1
    1234.2
    1234.9
    1234.10 --> 1234.1 (this is what is getting stored in table)
    1234.11
    ...I want to store 1234.10 not 1234.1, is there any way that i can store zeros as well after decimal point for NUMBER data type column.
    Thanks in advance,

    Hi,
    Your appending sequence number should be with leading zeroes like
    1.001
    1.002
    1.003
    1.009
    1.01
    1.011 etc
    based on the numbe rof records you haveTry this and see if this fits for you
    DECLARE
       CURSOR c1 IS SELECT * FROM custom_table1;
       i              NUMBER;
       l_len          NUMBER;
    BEGIN
       SELECT LENGTH (COUNT (*))+(LENGTH(some_seq.currval)-1) INTO l_len FROM custom_table1;
       FOR c1_rec IN c1
       LOOP
          i           := some_seq.NEXTVAL;
          INSERT INTO test_tab (ID, NAME, amount, create_date)
               VALUES (c1_rec.ID || '.' || TO_CHAR (i, rpad ('0', l_len, '0') || '9')
                      ,c1_rec.NAME
                      ,c1_rec.amount
                      ,c1_rec.create_date);
       END LOOP;
    END;G.

  • How to get values after decimal point

    Hi,
    source value is 12345.678 i wana the target side in 12345  in field and 678 in one field.
    the source value its not fixed  before decimal point value pass to one field and after decimal point value pass to other field
    please help to me how to do this one.

    Hi Swathip,
    You dont need to create 2 UDFs. You just need to create 1 simple UDF which takes one string array as input as usual and it has 2 Resultlist outputs. You need to map this 2 outputs from the UDF to the respective 2 target side fields where the values are to be mapped, one containing the portion before the decimal, and one after the decimal.
    I HAVE TESTED THE UDF AND IT WORKS ABSOLUTELY FINE.
    THE CODE FOR THE UDF IS AS FOLLOWS:
    public void sepDec(String[] num,ResultList wholeNum,ResultList afterDec,Container c)
      String part1=null;  // Stores the part before the decimal point
      String part2=null;  //Stores the part after the decimal point
                            if(num[0]!=null && num[0]!=""){
                   int index = num[0].indexOf(".");
                   part1 = num[0].substring(0,index);
                   part2=num[0].substring(index+1, num[0].length());
                         wholeNum.addValue(part1);
                   afterDec.addValue(part2);
    THIS UDF IS A CLASSIC EXAMPLE WHERE AN UDF HAS 2 OUTPUTS, WHICH IS VERY RARELY SEEN BUT VERY MUCH CORRECT
    PLEASE LET ME KNOW IF THIS CODE WAS HELPFUL TO YOU
    CHEERS,
    BISWAJIT
    Edited by: 007biswa on Feb 8, 2011 5:02 PM

  • How can i retain the trailing zeroes after decimal

    how can i retain the trailling zeros after decimal?
    values are showing in table like( 4.50,5.00) but i am trying to do some processing with these values then ithe zeroes are truncated like (4.5,5),
    how can i get values with zeroes

    If the values in the table have trailing zeroes, it's a character type column.
    Once you perform operations on them, they're implicitely converted to the number type, hence "losing" trailing zeroes.
    To get the trailing zeroes back, you have to convert them back to character data:
    TO_CHAR(1.5*3, '90d99')Have fun,
    K.

  • Eliminating zeroes after decimal

    HI all,
      I have a requirement to delete the trailing zeroes after decimal.
      It is a interest rate and it is denoted in EUR.
      i.e the number is 0,739000 % Internal declaration of this number is in DEC.
      the data type is AZINSSATZ.
    i want it to be displayed as 0,739 %
    How can i eliminate these zeroes?
    Thanx in Advance
    Regards,
    Hamsa Priya

    Hi Hamsa Priya,
    To remove leading zeros and leading blanks
    Please use FM
    CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal
    CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
    Ex :
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  input  = wf_version
                IMPORTING
                  output = wf_version.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Zeroes after decimal getting trimmed after 1:1 mapping of EDIFACT

    hi all
    i have created 1:1 mapping for XML->EDI.
    i took the output from XI and gave it as input.However, in the output of the mapping, the zeroes after decimal are getting deleted.
    for example if the input contain 2500.000, the output of the mapping contains 2500.
    I want 2500.000 in the output.
    Any suggestions as how to overcome the problem?

    hi Kai
    sorry ..i think i didnt convey properly my prob.
    This is what i want.
    My scenario is IDOC->EDIFACT using XI.
    i did a XI graphical mapping from IDOC ->to->EDIFACT_XML.Here for a particular field i got the output as 2500.000.
    Now this EDIFACT_XML is converted into EDIFACt using 1:1 mapping of BIC MD.
    When i give 2500.00 as an input to this 1:1 Mapping of BIC MD, the output contains only 2500.
    I'm not having problem in XI but in BIC MD.
    kindly suggest how i can get decimal output from BIC MD.

  • LEADING ZEROS AFTER DECIMAL

    Hi
    I want to remove leading zeros after decimal what should i do for that?.
    suppose lets thing my field is VAR and it gives value 150.000 and now i want to remove the zeros after decimal

    QMEL-QMNUM is a character 12 field, which internal format has leading zeros, simplest way to remove the leading zeros is to shift left.
    loop iords.
    shift iords-qmnum left deleting leading '0'.
    modify iords.
    endloop.
    can either use this function module also
    CONVERSION_EXIT_ALPHA_OUTPUT
    or
    SHIFT <yourField> LEFT DELETING LEADING '0'
    or
    try NO-ZERO option of WRITE statement
    or
    Another way is to create another variable of type I and assign the value into it
    example:
    DATA: L_NUMC(08) TYPE N.
    DATA: L_INT TYPE I.
    L_NUMC = '00000018'.
    L_INT = L_NUMC.
    Result will be = 18.

  • How to delete trailing zeros after decimal ?

    Hi,
    i want to delete trailing zeros after decimal.
    Example:
    if it is 22.000 then output will be 22
    if it is 22.010 then output will be 22.01.
    plz let me know hw to do this ?

    DATA:
      lv_decimal TYPE f DECIMALS 3,
      lv_string  TYPE string.
    lv_decimal = '22.010'.
    WRITE lv_decimal TO lv_string.
    SHIFT lv_string RIGHT DELETING TRAILING '0'.
    CONDENSE lv_string NO-GAPS.
    * now no trailing zeros are in the decimal stored in LV_STRING
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jan 30, 2008 12:10 PM

  • Zeroes after Decimal

    Hi,
    I am having a value as  '6009.12300 ML'  belongs to type C.
    Now i don't want the zeroes after decimal such as 6009.123 ML .
    how cud i do this?
    i tried search ,split,shift,trailing zeroes but could nt get it?
    Thanks,
    Ponraj.s.

    Hi,
      I tested the following code segment, it works well to suit your requirement.
    Just look at the code.
    DATA C(20) VALUE '6009.12300 ML'.
    DATA:  LEN TYPE I,
               FLAG TYPE I.
    LEN = STRLEN( C ).
    DO LEN TIMES.
      LEN = LEN - 1 .
      IF ( C+LEN(1) EQ '0' ) .
        C+LEN(1) = ' ' .
        FLAG = 1 .
      ELSE.
        IF FLAG = 1 .
          EXIT .
        ENDIF .
      ENDIF .
    ENDDO.
    CONDENSE C NO-GAPS.
    WRITE C.
    Reward if helpful.
    Regards,
    Sandhya

  • 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));

  • Process order confirm_Goods movement_Qty consum. after decimal point not al

    Sir,
    I am doing process order confirmation (COR6), In which go to "Goods Movement "....and consume actual consumption qty...but when i put figure after decimal point, system does not allow...e.g  3.524 KG...System rounded figure which i put in BOM...e.g in bom 3.524 KG, but when i confirm (COR6) the order shows 4 KG....
    Pl. help how to put decimal point...
    Pl. not that in BOM , system allows to put decimal point qty, but in confirmation it does not allow...
    Error message comes :
    Only 0 decimal places are permitted for unit of measure KG
    Message no. RU303
    Rajesh

    Sir,
    We check in CUNI,
    But in BOM, Decimal Point is allowed, but when we confirm the process order decimal place is not allowing...
    If seems that is it any setting in process order ?...Because if any error in CUNI then it does not allow at BOM creation level also....
    Rajesh Mehta

  • To Remove zeroes after decimal in screen field

    I need to remove the zeroes after a decimal like for a field of the type VBAP-KWMENG the is shown as 200.000 i need to show it as 200.I have to display this value inside a Table Control.

    hi,
    you can user "write to" statement with formating option.
    In your case,
    write  VBAP-KWMENG to l_var1 DECIMALS 0.
    so you will get l_var1 without any decimals and now you can populate this variable in your control.
    Please reward points if you find it useful.
    Regards,
    Jigs.

  • How to enforce position after decimal point

    Hi,
    i need to enforce a position after the decimal point in an SAPScript Form.
    The Form is MEDRUCK_RV and the field ist RM06P-PRMG1.
    I tried to enforce it with RM06P-PRMG1(Z9.1) but it doesn't work.
    I need to cut the left-hand zeros and display one position after the decimal point.
    Can someone help?

    Hi,
    Try this.
    DATA : DFORMAT TYPE XUDCPFM,
           L TYPE I.
    SHIFT RM06P-PRMG1 LEFT  DELETING LEADING  '0'.
    SELECT SINGLE DCPFM FROM USR01
    INTO DFORMAT WHERE BNAME = SY-UNAME.
    IF SY-SUBRC EQ 0.
    IF DFORMAT EQ 'X'.
    SEARCH RM06P-PRMG1 FOR '...'.
    ELSE.
    SEARCH RM06P-PRMG1 FOR ','.
    ENDIF.
    ENDIF.
    IF SY-FDPOS NE 0.
    L = SY-FDPOS + 2.
    RM06P-PRMG1 = RM06P-PRMG1+0(L).
    ENDIF.
    Thank You,
    Saritha

  • Purchase price to have 4 digits after decimal point

    Hi Friends,
    Would you please help me out with this issue?
    The purchase price needs to have 4 digits after the decimal point, because the product/component would be packed and sold in other unit, which may give huge value difference.
    The price can be set for the product/component per 100, but is there any setting in SAP Reference IMG?
    Thanks for your help.
    Regards,
    JT

    Hi,
    In material Master (MM01) which unit you maintain for that material. Go to MM02 and keep Base Unit of Measure as storing unit as earlier and maintain Sales unit (unit of measure in which the material is sold) or Order Unit (Specifies the unit of measure in which the material is ordered) in the Purchase Order according to your requirement and Enter the factor for converting the alternative unit to the base unit. In your case product/component would be packed in a Different unit.
    OR
    In your case product/component would be packed in a Different unit.
    Maintain the (BOM) Bill of Material for the finished product you are selling and its component.Create Finished Product as material type as FERT and Components as material type as HALB or ROH.
    Now try your transaction with Finished Product only and sale.
    Hope the above  will help.
    Regards,
    Biju K

Maybe you are looking for

  • Sales Order released even though Credit limit exceeded VKM1

    Hi, I have got a scenario where a Sales order has been released(Delivery,Invoicing has taken place) even though the credit limit of the Customer has exceeded. Steps: The user check the order from VKM1 (push button check and save), but he didn´t relea

  • Memory leak in MAX Preview resolved by build 411

    I was experiencing a memory leak while using the TLF that came as part of Flex 4 MAX Preview. Over the course of several hours, instances of a class called TextAccImpl would rapidly accumulate to the point where they accounted for over 50% of memory

  • Oracle 8i

    I will be grateful if anyone tells me the differences between oracle 8 and oracle 8i. What Optimizer and Query improvements are new in Oracle 8i???

  • Flash Content In Quicktime

    Just upgraded to Leopard. Can't get Flash content to play. Have tried removing preference files and changing text in files as suggested on other forums. What's the fix?

  • CF 9 / Server 2008 install

    I am installing cf 9 64 bit on Windows Server 2008 but immediately after the file is unpacked I get a message "Installer User Interface not supported. Unable to load and prepare the installer in Gui mode". The install then shuts down. Any Ideas? Than