Smartform QUAN type field decimal places

Hi all, i have a smartform with a type QUAN field. It has 3 decimals and i don't want to write them. I try (.0) option but it give me an error. In debug i found that that option is not allowed for type QUAN field. Is it wright?
Regards
Roberto

Hi,
Declare a Global variable of length 13 and move that QUAN value to this field and print this value
&Field(.0)& will not work but &Field(.1)& will work
Regards
Sudheer

Similar Messages

  • ALV output is 2 decimal places, but prints as 3

    Hi,
    In my current ABAP program, the output is shown as 2 decimals, using the following domain:
    Data Type: QUAN
    No. Characters: 13
    Decimal Places: 2
    Output length: 17
    However, during unit testing, it was found that during printing, instead of printing it out as 2 decimals (ex. 12.00,) its printed out as 3 decimals (ex. 12.000.)
    The same thing can be noticed when using Print preview. It starts at the editable fields and continues onward to others.
    Why is this occurring and what can I do to fix this problem?
    Points will be rewarded and all help will be greatly appreciated.
    Thanks,
    John

    Hi
    Check once again the attributes of that Qty field in Dataelement and domain
    Because for all QUAN type fields it is always 3 DECIMAL places
    you are saying it is 2
    check it
    All the qty fields in SAP with data type QUAN uses/prints 3 decimals
    so check and  see
    like fields LFIMG.MENGE,FKIMG,KWMENG all fields with 3 decimals
    Reward points for useful Answers
    Regards
    Anji

  • Decimal places in Smartforms

    Hi All,
    In smartforms, to control the number of decimal points in a field we can use the formatting option
    &symbol(.N)&
    for e.g.
    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) -> 1,234.6
    &EKPO-MENGE&(.4) -> 1,234.5600
    &EKPO-MENGE&(.0) -> 1,235
    Can we use a variable instead to giving the number directly ?
    like
    data length type i .
      length = '1'.
    &EKPO-MENGE(.length) -> 1,234.6
    Will this approach work.
    Thanks,
    Mandeep

    Hi,
    remove quotes.
    length = 1.
    try it now.

  • Rounding a quantity field to one decimal place. PLEASE URGENT

    I have a quantity field with three decimal places. I have to print this field with only one decimal place. This is in a smartform.
    suppose: qty = 45.678
    I want it to be printed as 45.7
    Thanks in advance.

    Hi Riki,
    I think you can use Function Module ROUND to round off the value...
    REPORT ZTEST_SHAIL4 .
    data: out type p decimals 1,
    inp type f.
    inp = '45.678'.
    CALL FUNCTION 'ROUND'
    EXPORTING
    DECIMALS =
    input = inp
    SIGN = ' '
    IMPORTING
    OUTPUT = out
    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.
    Now use the variable 'out' to display the rounded off value...
    Regards,
    SP.

  • DIsplaying WRBTR (AMOUNT FIELD)WITHOUT  DECIMAL PLACES

    Dear all,
    I am facing a problem in displaying amount field  in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
    How can I do it in a alv report if I have only one output amount field?
    thanks
    Ranjan.

    Hi chittaramjan,
    1. use this kind of funda (just copy paste in new program)
    Important things
    a) one extra field in internal table
      declared in the same exact fashion
    waers LIKE tcurc-waers,
    b) Populate this field
    c) REST THE System will take care
       (based upon country settings)
    2.
    REPORT abc.
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA  : BEGIN OF itab OCCURS 0,
            f1  LIKE P0008-BET01,
            waers LIKE tcurc-waers,
            END OF itab.
    START-OF-SELECTION.
      itab-f1 = '-4.15'.
      itab-waers = 'KRW'.
      APPEND itab.
      itab-f1 = '4.68'.
      itab-waers = 'GBP'.
      APPEND itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = sy-repid
          i_internal_tabname = 'ITAB'
          i_inclname         = sy-repid
        CHANGING
          ct_fieldcat        = alvfc.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          it_fieldcat             = alvfc
        TABLES
          t_outtab                = itab
        EXCEPTIONS
          OTHERS                  = 2.
    regards,
    amit m

  • Decimal places in the BCC field

    Hello,
    I created a field in the xml to save a field of type double, but only allows up to three decimal places.
    <property name="freight" data-type="double" column-name="freight" display-name-resource="freight" category-resource="categoryBasics" >
         <attribute name="propertySortPriority" value="50" />
    </property>
    with sql for the column freight
    freight
    number(28, 20)
    NULL
    I noticed that this also occurs in other fields in BCC,
    Is it possible to increase the number of decimal places for a property?
    thanks.

    Hi,
    I created the view mapping as your orientations and looked like this
    <add-item item-descriptor="itemMapping" id="AmImTest">
      <set-property name="itemName"><![CDATA[test]]></set-property>
      <set-property name="description"><![CDATA[AssetManager Test itemMapping]]></set-property>
      <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
      <set-property name="viewMappings"><![CDATA[ivM1]]></set-property>
      <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
      <set-property name="itemPath"><![CDATA[/atg/multisite/SiteRepository]]></set-property>
      <set-property name="name"><![CDATA[AssetManager]]></set-property>
    </add-item>
    <add-item item-descriptor="itemViewMapping" id="ivM1">
      <set-property name="propertyMappings"><![CDATA[propertyViewMapping=pvM1]]></set-property>
      <set-property name="attributeValues"><![CDATA[includedProperties=av1]]></set-property>
      <set-property name="displayName"><![[scopus.geralProperties]]></set-property>
      <set-property name="name"><![CDATA[ item View Mappi]]></set-property>
    </add-item>
    <add-item item-descriptor="attributeValue" id="av1">
      <set-property name="value"><![CDATA[id,name,description,freight]]></set-property>
    </add-item>
    <add-item item-descriptor="propertyViewMapping" id="pvM1">
      <set-property name="propertyView"><![CDATA[pv1]]></set-property>
    </add-item>
    <add-item item-descriptor="propertyView" id="pv1">
      <set-property name="description"><![CDATA[BIZUI Basic editor for double properties with more than 3 decimal characters.]]></set-property>
      <set-property name="attributes"><![CDATA[inputFieldMaxlength=pvAtrDef1]]></set-property>
      <set-property name="mode"><![CDATA[aMgrMmView]]></set-property>
      <set-property name="isComponentPropertyView"><![CDATA[false]]></set-property>
      <set-property name="isReadOnly"><![CDATA[false]]></set-property>
      <set-property name="type"><![CDATA[double]]></set-property>
      <set-property name="name"><![CDATA[SCO BIZUI with more than 3 decimal characters.]]></set-property>
    </add-item>
    Did I missed something?

  • Quantity field to one decimal place. PLEASE URGENT

    I have a quantity field with three decimal places. I have to print this field with only one decimal place. This is in a smartform.
    suppose: qty = 45.678
    I want it to be printed as 45.7
    Thanks in advance.

    Create one more variable in Global definitions with only 1 decimal place.
    Assign value of qty to this new variable.
    SAP automatically takes care of the rounding.
    And then print this new variable rather than qty.
    You can write all these in a code block.

  • Storeing values in floate data type upto two decimal places

    Hi
    I want a float type field in my table but want to store value up to two decimal places.
    so what syntax i need to follow plz suggest.
    thanks

    it is not possible to store with Number datatype. if you are using the data to sho report, then change its format (like 45 to 45.00). if you want to store 45.00 in database, then you have to modify the datatype for that column. for this follow the following path
    1. Add a column of datatype Varchar2.
    2. Copy all the value of your number field to it.
    3. Drop the old column.
    4. However make sure that if you have used that column somewhare in arithmetic calculation, the modify it and use to_number function to do arithmetic opration.

  • Decimal places of the field

    i have some fields of datatype  curr and domain wertv6/wertv7...which has 2 decimal places..
    but in my screen i'm getting 5 decimal places for all those fields....how is this happening?

    hi Anil,
    go to se84
    expand abap dictionary
    go to data element
    and write domain name = wertv6,data type = curr,decimal = 2
    you will find lots of data element.
    hope it solves your problem
    thanks
    Sachin

  • Change the decimal places of a field in screen table control

    HI ,
    I have a MENGE field having data element as , BSTMG (decimals 3 ).
    This field MENGE , I have used in a table control. The value in this field is filled from a custom Z-table where the same data element BSTMG is used. So , for eq.) value in MENGE field is shown as 6.010
    But the requirement is that the value should be displayed as only 2 decemals i.e.)   6.01
    I dont want to change the domain of the field in the Z-table , to 2 decimal places , because the table is used in other developments also , so it will give a dump there which I have to correct in other developments also.
    So , is there any way to change the decimal places of a field in screen table control , without changing the domain , in the table from where the value is fetched... ????
    Edited by: abhijeet_7013 on Feb 14, 2011 3:18 PM

    Hi, create a structure in local program with same field names and change the TYPE with some 2 decimal domain of MENGE. Populate this local stucture and use it in TABLE CONTROL.
    Hope this helps...
    Cheers

  • Removing the decimal places of currency field

    Hi Gurus,
    I have a currency type field ( to be more specific a field like BSEG-WRBTR) .
    How do i eliminate the decimal places for this field.
    ie if the value is 345678.91, i need to make it 345678.
    Is there a standard keyword or something for this?
    Points will be given to all the helpful answers.
    Thanks,
    Nobin.

    You can use the FLOOR function to get the largest integer value without decimal.
    Like:
    DATA: W_RESULT TYPE I.
    W_RESULT = FLOOR( P_AMT ).
    Regards,
    Naimesh Patel

  • Reduce the field value from three decimal places to two decimal places

    hi experts,
    plz help me with this
    actually i have to display the  value of the field MENGE in the list with two decimal places.
    but when i go and see the field menge in the table mseg it is having three decimal places.
    so could u plz suggest me how to solve this.
    regards
    siri

    Please try using the DEIMALS extension of the WRITE statement.
    data: menge type menge_D value '1234'.
    write:/ menge decimals 2.
    Regards,
    RIch HEilman

  • Decimal Places in qty fields

    Hi Experts,
    I'd like to know is it possible to set 4 decimal places in Qty fields, when I make GI for Sales Order.
    Regards

    Hi,
    Go to SPRO>SAP Netweaver >General Settings> Check Units of Measurement, then click on "Units of Measure" (T.Code: CUNI) and Select your Unit of Measurement  and go to details put number 4 "Decimal Places" field (you can put 0 to 14 decimal places.
    Regards.
    Chinna

  • Change of the quantity field to 5 decimal places in SAP

    Hi Gurus,
    The quantity field is appearing with 3 decimal places in BOM, Process Order, etc. Is it possible to make the decimal places to 5.
    All the decimal digits from SAP are 3 digits. We have an interface through which the data flows from another legacy system (Fow system) to SAP. And the Fow system setting was 5 digits. The issue is some of the raw material requirement qty was really minor and it might be below the decimal 3 digits.
    In that case, when the data flows to SAP from Fow system it will cause the material stage failure. so please help me to investigate how to let the SAP also could have the 5 digits decimal. Thanks.
    Regards
    Brijesh

    Dear ,
    Its SAP standard ,to put and use decimal places in BOM qty .You can use upto 3 decimal places in BOM qty.
    At SE11 you need to see what measure field is linked to the quantity field.Then goto tranaction CUNI and chage the decimal places of the unit of measure for the qty field unit , it will not allow you more than 3 decimal places in case of BOM qty.
    You have following choice :
    1. With the access key make changes in the standard program and take help from ABAPer
    SAPLCSDI, Table Name-RC29P, Field Name- MENGE.
    2) Change the base quantity in BOM header to 1000 aand accordingly change the component quantity.
    Hope this is clear
    Regards
    JH

  • Decimal place in Quantity field

    Hello experts,
    Got a query regarding decimal places in the quantity field of a sales order.
    The material UOM is maintained as EA. I have checked the transaction CUNI, where the decimal place is maintained as ZERO. Still , Sales order / Delivery documents which i am creating is allowing decimal places for in the quantity.
    For eg: material quantity of 50 EA in sales order, during the delivery batch splitting is getting splitted as 25.095 EA and 24.050 EA. Can you pleae advise the reason for this and how to go about this...
    Thanks,
    Safeer Rahman

    Thanks for your reply....
    But , as i have already told the decimal place field  is maintained as 0(zero) in CUNI for the UOM EA.... Still its allowing me to enter decimal values... for eg:. its allowing me to enter 50.038 EA. I don't know why its not giving an error message prompting me not to enter decimal values...
    Any idea?
    Thanks,
    Safeer Rahman

Maybe you are looking for

  • MacPro17-SL-Photoshop CS2 quitting

    I was able to use Photoshop CS2 and suddenly after I installed a few fonts it suddenly would not  work anymore. I open the program, create a window but the minute I choose anything, even its preferences it suddely quits giving me the option to send a

  • Lumia 928 Won't connect to facebook chat

    For a couple weeks, my Lumia 928 will not connect to Facebook chat regardless of being connected to data or WiFi. Any troubleshooting tips?

  • Incorrect status in pricing in process SC.

    Hi masters. the vesion SRM 7.0 was updated the version SP5 to SP8 of ABAP and other components like java. after that changes the sistems was Ok. but now no working when try make sc since catalog or free text the sistem show a dump Incorrect status in

  • [Mac/InDesign CC] InDesign crashes on startup

    I am porting a plugin from CS-6 to CC. I was able to compile the project successfully, but every time when I open the application, it crashed due to this plug-in. Here's the crash report: InDesign CC crash report - Pastebin.com I'm getting no clue fo

  • Production Premium CS6 Download issue

    I purchased Production Premium CS6 last year. My computer was recently wiped clean and I need to download and reinstall the software. However, the download keeps failing once it reaches 2.5gb. Please advise. Thanks, Kalie