Decimal places in form

Dear Gurus.
I need to display dinamic decimal places in my form.
for example if I have a variable containing value:
1.500  - need to display it as 1.5 (omitting trailling zeroes)
1.520  - need to display it as 1.52,
1.000  - need to display it as 1
please help.
Thanks & Regards,
William Prawira.

Hi,
you need to write program lines in order to check the first,second and thrid decimal places with the following code and then display accrodingly the values.
LV_DEC_PART = FRAC( TABLE-FIELD ).
then in insert three text nodes with the same field with offsets.
&TABLE-FIELD.0&  with the condition LV_DEC_PART+0(1) = 0.
&TABLE-FIELD.1&  with the condition LV_DEC_PART0(2) = 0 AND LV_DEC_PART0(1) # 0.
&TABLE-FIELD.2&  with the condition LV_DEC_PART0(3) = 0 AND LV_DEC_PART0(1) # 0 AND LV_DEC_PART+0(2) # 0.
Hope this is clear.
Regards,
Ram

Similar Messages

  • Decimal places on forms

    The decimal places in General Settings>Display is set to 6 for Amounts and Prices.  They would like only 2 decimal places to acutally print on the SO and AR Invoice.  How can we do this?

    Hi Kathy,
    You can add another formular field with round(Field_XXX,2) to display only two decimal places for any fields. Then hide the long decimal field.
    Thanks,
    Gordon

  • Decimal places when exporting HFM form to Excel

    Hi All,
    We are on HFM 9.3.1.3.
    From the web, when we export a data form to Excel, we lose the decimal places.
    In our data form we use 3 decimal places, however all exports to Excel deafult to 0 decimal places. We can reproduce in Excel 2003 and 2007.
    Is there a setting we can change so that an export to Excel picks up the decimal places used in the data form?
    Thanks for your help.
    Seb

    Hi,
    Thanks for the reply. I just checked and both settings are the same:
    decimal separator is a . in the server's regional settings and user preferences.
    I have tried changing the regional settings to no avail.
    The strange thing is that if I connect from my laptop to another 9.3.1 environment then I can export to excel with the correct decimal places.
    I'd say this is definitely an environment issue.
    Thanks again for your help.
    Seb

  • How do I round calculations to two decimal places (form-wide)

    Hi,
    I've created an order form where customers input the quantity of product they want to order and the form outputs the total due (including shipping and sales tax). Depending on user input, the resulting total sometimes contains more than two decimal places. How do I round calculations to two decimal places? Is there a way to do this form-wide?
    I'm new at using Acrobat for calculations. Any help would be greatly appreciated! Thanks...

    The above will affect the displayed value not the actual value of the field nor its value when accessed in another computation. This behavior may cause an error of 1 cent or more in the grand total or sales tax computation. If you want the the value and displayed value to be the same value you can use the following Validation script:
    event.value = util.scand("%,1 0.2f", event.value);

  • Smart Forms - Set decimal places in display formatting

    Hello,
    i have a variable (quantity 15 field with 3 decimal places) which i want to print via smartforms.
    sap help describes that you have to set (.<number>)
    for example: &field(.2)& to do that.
    this doesn t work at all.
    Does anybody know how you can do that?
    I would appreciate an answer, because that costs me already alot of time.
    thanks alot!
    Jasmin

    Hi Jasmin,
    We use this notation in a smartform to print weights and it works fine. Perhaps you should also mention the total numbers to display before the decimal?
    We have used: &BRGEW(8.0)&
    Regards,
    John.

  • Problem while changing decimal places in SAP B1 2007

    Hi Experts,
    I want change the decimal places of Quantity type fields from 2 decimal places to 4 decimal places. But while changing it in Genral settings form ,it shows the error message "Cannot update while another user is connected to the company". it is working in SAP B1 2005B but not in SAP B1 2007
    Please help me if you have any solution on this issue..
    Thanking you in advance

    Paul,
    Please see SAP Note 1247060 as is discusses the fact that this did work in 2005, but the behavior was changed in version 2007 ...
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&;note_numm=0001247060
    Eddy

  • Decimal Places in DSO

    Hi All,
    I'm trying to load a field from source system whose decimal length is 5. The InfoObject I created for this field is of data type Decimal and given decimal places upto 5 in additional properties of the InfoObject. I alos checked "Key Figure with Maximum Precicion". I loaded data into the InfoObject and its taking only 3 decimal places.
    Any solutions?

    Hello,
    I think its nothing to do with user parameters, it simply tells how the decimal format for that user is.
    I think you should be OK with the use of FLTP KF. Though it will show in exponential form in the display data, in the report it should be fine for the display with the needed decimal places (non exponential display in the report).
    Regards,
    Shashank

  • Decimal Notation in Forms as per his SAP Decimal Notation

    Hi,
    We need to display all numeric fields in the Adobe Form as per the Decimal notation of the User in his SAP user defaults.
    Also, we need to take care that the currencies have current decimal places.
    Please let us know if this is achievable in Adobe Forms. Is there a way we can set the number format of a field dynamically in Adobe.
    Any pointers in this regard is highly appreciated.....Thanks in Advance.,
    Raghavendra

    Hi Raghavendra,
    to be bale to decide in your abap-printprogram, which format to use for printing, you can read the decimals and number format from customizing (or user) and then pass into form through an additional interface parameter format_string of i.e. CHAR060.
    Place your format string in a hidden textfield on your form
    This format string can then be used in the adobe form to format the text-field using script:
    this.format.picture = your_hidden_textfield.rawValue;
    we do so for date-formats and currency-formatting we read out of the country customizing.
    regards

  • Formatting Numeric Only with Variable Decimal Places

    Acrobat Pro 9, Windows XP
    I'm creating a form that has a number of text box form fields that are to be numeric only per the form requestor. However, for any given field of this type the number of decimal places that can be entered can vary from 0-3 and the requestor does NOT want any unnecessary decimals to appear in the final output (e.g., a "1.2" entry should not appear as "1.200"). The standard number formatting properties always show all the decimal places so I know it's not that route. No calculations will be performed with any of these entries -- the form requestor merely is entering data and then printing it out so that it's legible for the end-user.
    I know that the following line of JavaScript in the Custom Keystroke property limits the entry to numeric only, but how should I tweak the syntax to allow a decimal entry:
         event.rc = (!event.change || /^\d$/.test(event.change))
    I probably also need a script to format for decimal places, but I don't know where to look in the JavaScript for Acrobat API Reference or in the MDN JavaScript Reference.
    Thanks in advance for any assistance.

    Good question. To keep it simple (because there are about 300 form fields in this document), if they choose to add extra decimal zeros, then who am I to argue with their entry. So in your example for a given form field, if they enter "1.200" then I expect that they want "1.200" to display.
    OK, but earlier you said:
    "However, for any given field of this type the number of decimal places that can be entered can vary from 0-3 and the requestor does NOT want any unnecessary decimals to appear in the final output (e.g., a "1.2" entry should not appear as "1.200")."
    This seems inconsistent. Can you clarify? The point is the code and where it's placed depends on this. It could be implemented either as a custom Validate or Format script, in addition to a Keystroke script.

  • Decimal place problem in smartforms..

    Hi All,
    I my smart forms i am displaying a quantity filed, but itz displaying with 3 decimal places. But i need to hide the decimal places. I try to use formating option &symbol(.N)&  but itz giving error while calling the smart forms.
    Plz help me...
    Regards,
    Pavan.M

    Hi,
    I've yet to find any SAP documentation or training material the recommends using the table's own header as the Smartforms work area.  I have however found it causing unusual problems in the generated function module.
    That said, I've tried reproducing your problem and have not been able to.  You could try defining a work area and seeing if that helps.
    Regards,
    Nick

  • BUG: Inputting decimal places into new duration preferences (Premiere Pro 2014.2)

    So, I checked the release notes for the newest version of Premiere Pro CC (2014.2). I was happy to see the ability to switch between frames and seconds when choosing the default durations of transitions and still images.
    Immediately found a bug. Decimal places don't work correctly after switching units.
    Open Preferences.
    Switch Video Transition Default Duration units from the default Frames to Seconds. Try to insert a decimal place using the keyboard. It doesn't work.
    Hit OK to close the Preferences, with Video Transition Default Duration now set to seconds
    Open preferences again and change the units back to frames. Now try to input decimal places. No matter where the text cursor is, the decimals just get added to the end of the form field.
    This seems to affect all three form fields (not just Video Transition, but Audio and Still Frame as well).
    Really weird bug, and I'm not sure how you guys at Adobe missed this one...
    Anyone else having this bug? I'm on Windows 7.
    If so, can someone please file an official bug report? I'm at work and low on time, but I felt like I needed to bring this up to make sure I'm not the only one in this boat.

    I've reproed this issue and logged a bug report.
    A workaround is to toggle the Unit setting, click Okay to close Preferences, then reopen Preferences and adjust the Value. Sorry for the inconvenience.
    I urge you to submit your own bug report (Adobe - Feature Request/Bug Report Form). The more customers who report an issue, the higher the odds that a fix will make it into the next release...

  • Round off Double to 2 decimal places??

    Hi all the pro out there..
    anybody can tell me how to go about rounding off eg 5.9542 to 2 decimal places in java? i went to search in API Double class, no method that allow me to do that..
    is there any other way?
    pls advise thank you

    If the former, you can do it manually by multiplying by an appropriate number, casting to int, and then dividing by the same number.Although this won't always work.
    Suppose you want 1.125 --> 1.1
    1.125 --> 11.25 --> 11 --> 1.1 plus some epsilon, since 1.1 can't be represented exactly in base-2.Yes, I know that (I assume you knew I knew that). So, maybe the OP needs to use both methods in combination (and maybe use some rounding method [such as in the Math class] other than cast).

  • Round sum to 2 decimal places

    I've got this sum for a 'shopping cart' style design and want the prices to round to 2 decimal places
    I know I've got to put Math.round... in somewhere, but I just don't know
    Script:
    <script type="text/javascript"><!--
    function updateultra() {
    document.form.ultra.value = (document.form.sum1.value -0) * (1.79);  }
    //--></script>

    <script>
    function updateultra() {
        document.form.ultra.value = Math.round((document.form.sum1.value -0) * (1.79)); 
    </script>

  • A double with 2 decimal places

    I need to output a double that has 2 decimal places. The default is just one and I don't know the command to make it two. For example,i want an output of 37.5 to be displayed as 37.50. If you know the command, please tell me. Thanks!

    Looks like you are trying to deal with money.
    Firstly if you are dealing with money store everything as the lowest form of currency in your given area. eg as pence or cents and place it in a int or long. That way you dont get any rounding erros when you multiply up the value.
    To put two decimal places on a number is easy just use a DecimalFormat from java.text
    Like this
    double myNumber = 3.1;
    DecimalFormat decF = new DecimalFormat( "######0.00" );
    String myFormattedNumber = decF.format( myNumber );
    System.out.print( "My number is " + myFormattedNumber ); The #######0.00 in the DecimalFormat constructor call is a pattern that is used to format the number. The # indicate an optional number the 0 indicates a required number and if one is not provided a 0 will be included.

  • SSM 7.5 SP7 - Entry & Approval decimal places

    Hi all,
    I create a PAS database with several KPI's/metrics. For one of those KPI's I configure the Actual and the Target metrics to have 4 decimal places.
    My question is now related with the Entry & Approval, because when I try to put values on those metrics E&A only allows two decimal places (is ignoring the setting of PAS database).
    How can I insert a value with 4 decimal places for those metrics using E&A?
    PS: This happens in both E&A metric set form, and also using the Excel data entry of E&A.
    Thanks in advance
    Regards
    Pedro Costa

    Hi Pedro,
    As far as I know you won't be able to load more than two decimal places in E&A unless you use customization. And the second problem is that even if you load the four decimals for your measures (through E&A or automatically) the scorecard will still show 2 decimal places so I think you would need another change there as well.
    In my experience this changes are relatively easy (depending on the flexibility of your users), but as they are customizations you need to change it in such a way it's easy to maintain from one service pack or release to the next one.
    I hope this helps.
    Hector

Maybe you are looking for

  • How to use the 3of9 font in report in concurrent program

    Dear All, I have developed a report in 6i, and selected the font 3of9.ttf in Report Builder, which is a Barcode type font. but when i register the report as concurrent program and run the report concurrent program it is not showing me the field value

  • CRM Release 12 service requests and creation of notes

    Hi, is it possible to get an email notification for a service request (in CRM Release 12) that includes the Note texts? Thanks very much, Louise

  • Lightroom 1.4 - Note from Adobe

    I am in the process of removing Lightroom 1.4 builds from Adobe.com and recommend that those who have updated to Lightroom 1.4 revert to Lightroom 1.3.1. I will have further information shortly but I understand that there are a number of users on thi

  • Possible for a new CC member to install CC 7.2?

    My client wish to install Premiere CC 7 (not 2014 to be compatible with me) but is not able to find the installer for that version. Even by checking in the new Creative Cloud "Previous Version" Dropdown menu. Is it possible for him to install this ve

  • Problem with iTunes compatability with iMovie and iPhoto

    I purchased some music from the iTunes music store and wanted to use that music in a homemade DVD I made. I also have tried using the purchased music when I play a slideshow in iPhoto. In both instances, an error window popped up saying that I needed