Query about decimal point field in mapping

hi,
In interface one field is supposed , Both dollars and cents will be formatted with an implied decimal point before the last  two digits in the data. 
for exm : input is -620.27. then output should be -000062027. Maximum length of the field is 10.
if input is 44.44.then output should be 0000004444.
In this way.
Name of the field is Pay_Amount.
how do i get this mapping?
Regards,
Sanghamitra

Use the replace string function to replace decimal point with null. Then pass the value to a udf.
Write a udf (value cached) and pass the input a= value from Pay_Amount and b - required length of field (10)
public String AddLeading(String a,String b,Container container){
String temp = new String(String.valueOf(Integer.parseInt(a)));
int temp1 = Integer.parseInt(b);
for(int i = 0; (temp1 - a.length()) > i ; i++)
temp = "0" + temp;
return(temp);

Similar Messages

  • About decimal point

    hi,expert!
    in the cube ,i find the data is 0.5,but it display as 1.0 in my query,who can help me ?
    thanks!

    the problem is resolved.i set the measure's "Decimal pl. rounding " as 3, former is space.

  • Query : Addition of extra fields in the User Registration page of portal.

    Hi All,
    I have a query, about adding extra fields in the new user registration page of portal.
    If you can suggest the required source files in details,inorder to incorporate two more fields.
    Say, AGE and COMPANY,with the existing fields in the same page.
    Along with this,can you please send the details of retrieving those information from backend and the backend functionalities associated with the SUBMIT button on the registration page.
    Regards,
    Sudeep

    Hi,
    Your query is divided into two parts.
    The first part is adding new fields into existing form. This feature comes under Branding of portal. Plz use the link below understanding the same and related help :
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm
    The second part is retrieving the values from backend.Here it will be the UME database. You need to develop a logon.par file and replace the same in your portal.
    Happy Customizing.
    Sukanta Rudra

  • Dynamic displaying of decimal points for currency field in ALV

    Hi,
            In ALV output there is a currency field and displaying data of different countries. It should display decimal point according to the country's currency. But at a time it can display data of different countries.

    Hi Dilip,
    I think your question is about currencies with different number of digits after decimal point. If you have the currency field in the ALV row, you have to give it's name as currency reference for the value field in the field catalog.
    After creating the field catalog, call a form and do something like this (change fielnames accordingly).
    <pre>
    *&      Form  alv_fieldcat_enhance
          Individual Enrichment of field catalog
    FORM alv_fieldcat_enhance
      CHANGING pt_alv_fieldcat TYPE slis_t_fieldcat_alv.
      FIELD-SYMBOLS:
        <alv_fieldcat> TYPE slis_fieldcat_alv.
      LOOP AT pt_alv_fieldcat ASSIGNING <alv_fieldcat>.
        IF <alv_fieldcat>-fieldname(5) = 'KBETR' OR
           <alv_fieldcat>-fieldname(5) = 'SKBTR' OR
           <alv_fieldcat>-fieldname(5) = 'DMBTR'.
    Company code currency
          <alv_fieldcat>-cfieldname = 'BWAER'.
    Document Currency for conditions, net value and taxes
        ELSEIF  <alv_fieldcat>-fieldname(5) = 'KWERT' OR
                <alv_fieldcat>-fieldname    = 'NETWR' OR
                <alv_fieldcat>-fieldname    = 'NPAX_MWST_AMNT'.
    Document Currency
          <alv_fieldcat>-cfieldname = 'WAERK'.
        ENDIF." <alv_fieldcat>-fieldname(5) = 'KBETR' or
      ENDLOOP." at pt_alv_fieldcat assigning <fieldcat_alv>.
    ENDFORM.                    " alv_fieldcat_enhance
    </pre>
    Regards,
    Clemens

  • Using Lookout to write a decimal point to an RTU in the field.

    Is thier a way to send an lookout exp.(ex.1.56) to a known writable register on an RTU out in the field. I am using the modbus object. I plan to send this expression that I have created to a series of regs. in the field and pull the info to a readable screen to display the converted readings from lookout. I want to use lookout to handle the complexed math and send it to the registers. EX. The RTU sends raw data (40003)to lookout. I convert it in an expression and I want to send it to reg(40501) out in the field. Question # 2. I also need to see if I can use a portable laptop in the field that mirrors the main host and is updated when the host updates. This is for the same application above. This is a mobile RTU
    if you will. But as you move around in a 70 mile area repeaters change.

    Hi,
    It's not clear to me what exactly you mean by "you can't send two values to a register."
    I am guessing you're trying to write a 32-bit floating point number. If this is the case, then here's how you would do it:
    To write a 32-bit floating point value (decimal point), you will have to use the F registers. E.g., F40001. Lookout will then split the value into two 16-bit registers accoring to the IEEE floating point notation and write them in two consecutive registers.
    Similarly, when you want Lookout to interpret two (consecutive) 16-bit registers in your PLC as a single 32-bit floating point number, you will use the F registers.
    For a detailed description of all this please see the following two articles:
    Detailed Descripti
    ons of Lookout Accessing Floating Point Numbers/Registers in a Modbus PLC:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/2de82ef20b2cc991862567f600432e33?OpenDocument
    The Working Principle behind Reading Adjacent (32 Bit) D or F Registers of Modbus
    http://digital.ni.com/public.nsf/websearch/4ef459f549fcc7028625660a000a7629?OpenDocument
    I hope this is what you're looking for.
    Regards,
    Khalid

  • LSMW field with 5 decimal points

    Hi All,
    I need to pass a field in the LSMW with 5 decimal points.
    we cannot pass the data type as "PAC5". can any one suggest how this can be done in LSMW.
    Also, I am passing the currency key as USDN in the LSMW using Idoc method. But it is taking only as USD even though the length of the field is 5 chars. But I am able to acheive this if I manually post it as USDN.
    please suggest on the above 2 issues.
    Helpful answers will definitely be rewarded.
    Thanks in Advance,
    Asif Ali Khan

    hi khan,
    see the below link
    http://www.abapcode.sapbrainsonline.com/2008/03/write-output-formatting-options-abap.html
    http://www.abapcode.sapbrainsonline.com/2008/03/types-abap-keyword.html
    sapabap.iespana.es/manuales/pdf/lsmw.pdf
    abapprogramming.blogspot.com/2008/03/sap-abap-syntax-for-assign.html - 122k
    abapprogramming.blogspot.com/2008/03/sap-abap-syntax-for-assign.html - 122k
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90cef248-29e0-2910-11bb-df8dece7e22c
    thanks
    karthik

  • How to restrict decimal point entry in numeric field?

    Hi All,
    There is a requirement from our client that, they cannot accept amount in decimals. That is, they cannot accept the cents, the amount that can be received from them is only in EURO and the same will be entered in the field. They want me to restrict the entry of a decimal point totally in the field, so that there requirement is fulfilled.
    Is this possible? If yes let me know how?
    If no, can you provide me justification, so that i can intimate the same to my client.

    Dear Steve,
    I had written in my first thread that, They want me to restrict the entry of a decimal point totally in the field.
    If i use 9999 as format mask, then it still allows me to enter a decimal, but when the focus moves out of the field, it highlights the field and warns me "Field must be of form 9999".
    But my requirment is to "Restrict the entry of decimal point totally @ runtime".

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

  • Query about field symbol

    Hi,
    Can we write a query like this using field symbol.
    <FS> is a field symbol mapped onto an internal table.
    select * from dbtab into corresponding field of internal_tab for all entries in <FS>
    where field1 = <FS>-field1.
    It gives a syntax error when I check this query. Even if I turn field1 into a field symbol <FS1> to hold the field name, it gives an error.
    Could anyone advice in this context.
    Thanks for the help in advance.
    Regards,
    Vijay

    Vijay,
    Its not a limitation.
    You would have declared your table like this, right?
    FIELD-SYMBOLS : <FT> TYPE TABLE.
    Now, unless you assign this to table, the field symbols will not have a structure, right. This assignment happens only at runtime. So, there is no way that the system can identify <FT>-field1 at design time and compile the same, right?
    However, the question is if you know the structure at design time, why do you want to use a field symbols for the table?
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Query to remove decimal point

    Hi all,
    I have a table A, in which there is a column currency with integer values having decimal point, i have to just remove the decimal and keep the number as it is.
    Ex:- A number 23.45 should be 2345
    A number 17.9 should be 179
    I have to do this for all the currency values of the table A.
    Can someone kindly help me with a query.
    regards,

    Hi,
    user10243788 wrote:
    Thank you all for replying,
    The problem is that there are different rows in table A, i.e many values, so i think we would have to pass this value as variable in runtime.Sorry, I don't understand.
    What value do you think you have to pass as a variable? The decimal point character ('.' in America, ',' in Germany)? The number of decimal places? Some value, such as 175?
    select to_number(replace (1.23, '.')) from dual;
    or
    SELECT REPLACE (crncy, '.') AS crncy_w_o_dot
    FROM table_x;
    how can i use the above query like a loopAny query is like a loop; it finds each row, and does the same sort of thing to each one.
    i.e if i have many values like below in the column currency, how can i change them all.Are you saying you have different columns that need to be transformed?
    If so, the answer depends on what your data is like, what results you want, and what version of Oracle you're using..
    If what you want to do is simple, and the number of columns isn't to big, the best thing is to repeat the formula for every column.
    Other options are likely to be slower.
    You could write a user-defined fucniton to do the transformation.
    You could unpivot the table, so that all the columns to be transformed become one column. You could then pivot the results back to the original number of columns, if necessary.
    17.5
    23.456
    89.9343
    43.98121thanks again for your help,Is this your sample data? It looks like just one column. Post some sample data as CREATE TABLE and INSERT statements.
    What are the results you want from that data? If you need to pass some parameter to the query, give a couple of examples of different parameters and the different results they produce given the same sample data.
    Whenever you have a question, say what version of Oracle you're using.
    Edited by: Frank Kulash on Jul 13, 2010 11:05 AM

  • Can field point folder be mapped in Windows Explorer?

    Can storage in field point controller be mapped with a drive letter in Windows Explorer?

    Hi Roger.
    You can see your FieldPoint in Windows Explorer by typing ftp://(your IP address) into the address bar. This will not display as a lettered drive in My Computer, but if you want to have a folder that will connect to that FieldPoint controller, you can make a shortcut to the device by creating a new shortcut in Windows, and give the location as "explorer ftp://(your IP address)"
    I hope this helps.
    Regards,
    Stephen S.
    National Instruments
    Applications Engineering

  • 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 the decimal points at the end of the value????

    hi,
    we are using crystal reports 9.0. we have some reports which contains group by field.  we have one field like address. if we select group by as address "The data is displayed grouped by the Address. But the address is shown in decimal points". for example if we have 55 as address field value, it shows 55.00. 
    the formula has written like as follows
    if lowercase({?GroupBy}) = 'Address' then totext({rsp_GetDevMicro.Address})
    now, i want to remove zeros which comes along with address field values.
    can anyone help me in this?

    Not sure about Crystal 9 but on 11 I would convert it to a number to remove the leading zeroes then back to text again which allows you to remove the decimal point and any thousand seperators, ie:
    CStr(ToNumber(),0,"")

  • 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

  • Decimal point  for Price value in  ALV Report

    HI,
    I have created ALV report,
    I have 2 price fields in ALV report
    For first field i have to display  in the below format.
    If the value of the field is 3601152 then I have to display it as 36011.52 
    For second field I have to display in the below format
    if the  value is 2494 then I have to display it as 2495.00
    else if the value is 3498.73,then I need not to do anything.
    that means If there is no decimal point, then I have to keep decimal point.
    Thanks&Regards
    RamaDevi

    HI,
    you can work with search and concatenate.
    value1 = 3601152
    search value1 for '.' .
    if sy-subrc eq 0.
      concatenate value1(5) '.' value1(2)+5 into text.
    Or value1 = value1 / 100.
    endif.
    Regards
    Nicole

Maybe you are looking for