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

Similar Messages

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

  • 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

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

  • No Value after decimal points

    Hi Gurus,
    Our client does not the condition values in decimal points in pricing.
    They want it to be scaled up always to next round figure.
    Eg. 12.25 should be converted to 13.00
    Please suggest.
    Thanks,
    Raheel

    Dear Raheel
    For the net value field, you need to give Routine 16 in the Alt. Cal. Type in the pricing procedure and also add Routine 17 to Netvalue in your Pricing Procedure. Additionally, in table T001R such rounding data should be maintained. For this goto SPRO - SAP NetWeaver - General Settings - Currencies - Define rounding rules for currencies here maintain: Company Code + Currency = 100
    thanks
    G. Lakshmipathi

  • Number of digits after decimal point.

    Hi,
    Here is a small program which takes x1 and gives the square root of x1, For e.g for 2 it prints 1.4142135623730951
    Suppose I need to have only one decimal place i.e 1.4 then how do I get this.
    import java.util.*;
    class MySquare {
    public static void main(String args[]) {
    double x1 = 2;
    double x2 = Math.sqrt(x1);
    System.out.println("Square root of x1 " + (x2));
    Output of this is:
    Square root of x1 1.4142135623730951

    try:
    int whole = (int)x2;
    int decimal = ((int)(x2*10)) - whole*10;
    System.out.println("Square root of x1 " + whole +"."+decimal);p.s. this is untested, but it gives you an idea

  • 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

  • Currency tables that stores description of currency after decimal points.

    Hi ,
    I need table that stores description of currency
    for example : for INR its Rupees and paise...
    I need table that stores paise,Cents for Dollars etc..
    Table TCURC will show Rupees, Dollars...but doesnt show paise,,cents etc..
    Thanks in advance
    Kashyap.

    hi,
    you can get number of decimals for currency from TCURX table.
    To read them in program use SPELL_AMOUNT function module.

  • HOW to remove the decimal points for particaular field

    hi friends,
    Iam printing the quntity in decimal mode like 2.000.
      but i want to print this as only 2.
      How can i remove the the decimal in smart form..
    Iam  printing  amount as 1234.00000.
    But i have to print two zeros after decimal point..how can i remove zeros .
    appricioate for u r answers..
    regards,
    sampath kumar

    You may use the option
    field(.0) for printing the quantity
    field(.2) for printing the amount..
    Go through SAP help given below..
    <b>Number of Decimal Places
    A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.
    Syntax
    &symbol(.N)&
    The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
    &EKPO-MENGE& -> 1,234.560
    &EKPO-MENGE(.1) -> 1,234.6
    &EKPO-MENGE&(.4) -> 1,234.5600
    &EKPO-MENGE&(.0) -> 1,235</b>

  • How to delete decimal point and adding leading zeros....

    Hi,
    I have one requirement in the report   i.e.
            <b>Present Value    :</b>  44567.98
            <b>Expected Value  :</b> 0000004456798
    In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...
    Thanks in advance.
    Regards,
    Kumar.

    Hi,
    Use SPLIT and COMCATENATE fnctions.
    Eg:  split l_v at '.' into l_v1 l_v2
            concatenate l_v1 l_v2 into l_v.
    For adding leading zeros
    Use FM CONVERSION_EXIT_ALPHA_INPUT.
    Eg:
    data: tknum type vttk-tknum value '99156'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = tknum
         importing
              output = tknum.
    Sri
    Message was edited by:
            Sri Tayi

  • How to use os x yosemite calculator - need decimal points

    I updated to OS X Yosemite version 10.10.2 for my Mac.  I cannot figure out how to use the calculator!  All I want is to add dollars and cents.  How do I get a decimal point?  I've searched the web and don't see this addressed.

    I double checked.  No decimal point anywhere!  I tried typing in a number with a period….nothing.
    Along the top row it has ASCII, Unicode, Show Binary buttons and 8, 10, 16.  I tried them all. 
    I have AND , OR, NOR, XOR, <<,>>, X<<Y, X>>Y, bite flip, word flip in the first two columns. Letters and numbers in the next three columns, and AC, C, RoL, RoR, 2's, and 1's buttons along with math operation symbols in the last 2 columns.
    I can't believe I can't just add up numbers with decimals when doing simple math!
    Any other ideas?
    Thanks.

  • How to fix decimal point limit

    Hi
    how do i fix the decimal point digit.
    for e.g
    if the input number is 123.33
    then it should conver it to 123.330
    OR
    if input 123
    then it should convert it to 123.000
    OR
    if input 123.321456
    then it should convert it to 123.321
    Thanks in advance.

    No that is not the solution.
    But I found out a different solution. The following code will give me exact figure which I was looking for.
    BigDecimal inputSize = new BigDecimal(12.3215)
    inputSize.setScale(3, RoundingMode.FLOOR);
    Thanks to all of you for your support
    Ciao :-)

Maybe you are looking for

  • Fn + delete, other shortcuts not working with new Santa Rosa Macbooks?

    I recently received a brand new Macbook (Santa Rosa platform) as a replacement for my defunct old Macbook (which was the previous generation). I've noticed in bootcamp, Fn+Delete no longer serves as a shortcut for the Del key in windows. Nor does Fn+

  • How to print the same data in different pages of different trys

    Hi, Part II: Check stub u2013           We need to print Vendor account # (REGUH-LIFNR), Vendor Name ((REGUH-NAME1), Payment doc # (REGUH-VBLNR), Check date (PAYR-ZALDT) and Check number (PAYR-CHECT) in the header portion and in the detail portion In

  • Setting access rights at component level

    I have created a component. The business wants to restrict its use to a certain group of users. If a user is part of that group, ONLY then the coomponent should be available in sidekick at time of page creation. How is setting access rights at compon

  • 3 way match between PO/GR/IR per line item

    Hi.. I'm having an issue with 3 way match between PO/GR/IR. I want to this on line item level. As standard, SAP will compare line items based on line item numbers when doing the match (at least for quantity match). However, this is not possible since

  • JSP and PHP ?!

              is it possible to include a php file into a JSP with the include tag?           infos:           the php file is on another server as the jsp file.           the php server doens'nt support jsp and vice versa.           hope anyone can help