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

Similar Messages

  • Download amount value without decimal place but element with decimal place

    Hi all,
    to display the amount without decimal places in classic report, i can use this way which is wa_wrshb NO-ZERO CURRENCY wa__waers.
    may i know,
    1) how to display amount in ALV where amount value (which using dmshb/wrshb) has no decimal place like JPY?
    2) what should i do if i want to download the amount value which field using dmshb or wrshb that the value has no decimal place like JPY?
    Thanks

    Hello,
    You can display the ALV output according to the decimal point in the currency.
    When creating the field catlog for the amount field add the currency parameter also.
      wa_fieldcat-fieldname     = <amount_field>.
      wa_fieldcat-tabname       = <output_table>.
      wa_fieldcat-seltext_l     = <column_heading>.
      wa_fieldcat-outputlen     = p_olen.
      wa_fieldcat-currency      = wa_waers.              " This will work same as CORRENCY wa_waers
    Regards
    DKS

  • Need to display without decimal places

    hi
    i database two fields are defined as fltp10) and fltp16 i need to display them as num (10) and num (12) and without decimal places
    please suggest i will definately rewards points to helpfull answers
    regards
    arora

    Hi Arora
    Do you mean, you need to display ignoring the decimal value???
    If so you can declare a variable of same lenght of type N and move the value, that will do the task.
    By default when we move numerical values it brings leading ZEROES.
    If the requirement is to remove the leading zeroes move to a integer type variable.
    Kind Regards
    Eswar

  • BED & AED Round up or down without decimal places

    Dear Gurus,
    My client wants BED & AED Round up to nearest value without Decimal places.
    I am using taxinn procedure and JMOP for BED and JAOP for AED As a condition.
    I tried to tick round up in condition , but it is not workig.
    Please help.

    Hi,
    In TAXINN   T code : OBQ3  against ur condition in alternative calculation type (Calty ) column put 17.
    At the same time OB90 against ur company code put 100.
    Then ur problm will be resolved.
    Biswajit

  • Formatting amount to 2 decimal places without rounding the value

    Hi 
    My requirement is to format the amount field, when I am using the simple type and setting the format as ###,##0.00 then it is rounding off the value.  Foe example say the amount is 3,567.236 in this case it rounds it off to 3,567.24 which I do not want we want the value to display as 3,567.23.  Does anyone have any idea how this can be achieved.
    Thank you
    Regards,
    Preet

    Use the following :
    BigDecimal bigDecimalh = new  BigDecimal("22.335642");
              bigDecimalh = bigDecimalh.setScale(2, BigDecimal.ROUND_DOWN);
    Regards,
    Himanshu

  • Alignment required in to display the  Amount field

    Hi Friends,
    kindly help me facing problem in to display the amount using decimal places also
    nedd to display the Pretax and aftertax amount for that purpose
    written below code . 
    it is picking amount fields but the amount is printing like this
    pretax                  aftertax
    $ 34.67               $     0.00
    $ 21.64               $   120.90->
    I need to display amount fields in order like, thens, hundreds, thousands like.
    read table lt_final into ls_final with key bplan = 'PRD'.
       if ls_final-pretx = 'X'.
         pretax = ls_final-eecst.
         write pretax to lv_pre.     "#EC UOM_IN_MES
         concatenate c_dollar lv_pre into lv_dollar.
          shift lv_dollar right deleting trailing space.
    *Pretax totals
         lv_pretax = lv_pre.
         read table out_pay1 with key name = 'PRETAX'.
         check sy-subrc = 0.
         out_pay1-value = lv_dollar.
         modify out_pay1 index sy-tabix.
         clear out_pay1.
       else.
         aftertax = ls_final-eecst.
         write aftertax to lv_after. 
         concatenate c_dollar lv_after into lv_dollar1.
          shift lv_dollar1 right deleting trailing space.
    Aftertax totals.
         lv_aftertax = lv_after.
         read table out_pay1 with key name = 'AFTERTAX'.
         check sy-subrc = 0.
         out_pay1-value = lv_dollar1.
         modify out_pay1 index sy-tabix.
         clear out_pay1.
       endif.
    Thanks,
    Sai

    Hi Daya,
    I would like to print two amount values with decimals.
    like :  like Pretax      after tax
                                   $      0.00
          $   3.45             $  120.67
          $   0.00             $      0.00
    I created using right justification one paragraph format with two tabs
    60.00              ch           Right
    68.00              ch           Right
    But my program output is comming like this.
    any one please help me.
    Program output:
    Pretax               after tax
                                   $    0.00
          $   3.45           $  120.67
          $   0.00             $    0.00
    Thanks,
    Sai

  • Suppress leading spaces while displaying an amount field in a Smart form

    Hi all,
    In a smart form, I am using fields like KONV-kbetr and VBAP-netwr each of them currency type and 2 decimal places. I want to suppress the decimal places and also the leading spaces while displaying these fields in a smartform cause when this field is inserted in a sentence, a lot of gap is there between the field and the words of the sentence. I dont want to change the field length cause it can be that huge in some cases.
    Please help.
    Thanks ,

    Hi, if you would place it in a sentence, it would be an option to concatenate the text and values into one string and then condense it.
    concatenate <text> <value> into lv_sentence.
    condense lv_sentence.
    but another way is to use codes for displaying values in smartforms:
    This is from a smartforms PDF i have..
    Output Options for Field Contents
    Use the Formatting options to adapt the value of a field before printing it. You can enter the
    relevant parameters directly behind the field name. Make sure to write the short forms of the
    different options in uppercase letters. Some of the options can be combined.
    General Information
    The formatting options are not suited for all data types of fields (for example, for character fields
    you need no exponential representation). You must distinguish between numeric fields and
    character fields.
    Numeric Fields
      If specified, the system first evaluates the length (<length>).
      If no length is specified, the system displays the value in its overall length.
      The trailing blank indicates a positive sign. To suppress it, use formatting option S.
      Any offset <offset> specified is ignored.
    Sequence of evaluation: (<length>), sign to the left(<),Japanese date (L), suppress blanks (C),
    right-justified display (R), insert fillers (F).
    Character Fields
    By default, the system displays the value of a field in its overall length, but truncates trailing
    blanks.
    Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R),
    insert fillers (F).
    Overview
    Formatting Options for Fields
    Syntax Description
    &field+<offset>& Skips <offset> places of the field value (character fields only). If the
    offset is greater than the length of the value, nothing is displayed.
    &field(<length>)& Sets the output length to <length>.
    &field(*)& If the field is defined by a Data Dictionary type, Smart Forms set the
    output length to the value specified there.
    &field(S)& Suppresses the sign
    &field(<)& Displays the sign to the left of the number
    &field(.<nat.number>)& Limits output of decimal places to <nat.number>
    &field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The
    mantissa is adapted to this exponent by shifting the decimal
    character and inserting zeros.
    SAP Smart Forms (BC-SRV-SCR) SAP AG
    Output Options for Field Contents
    72 April 2001
    &field(T)& Suppresses thousand indicators when displaying fields of types
    DEC, CURR, INT, and QUAN.
    &field(Z)& Suppresses leading zeros of numbers
    &field(I)& Suppresses display of initial values
    &field(K)& Deactivates a conversion routine specified in the Data Dictionary.
    &field(R)& Right-justified display. Use this option only when specifying an
    output length as well.
    &field(F<filler>)& Replaces left-justified blanks in the value by the fill character <filler>.
    &field(L)& Converts and a date field to a local date and displays it. The date is
    then formatted using edit mask JPDAT.
    Since this representation uses Japanese characters, use it in the
    Japanese version of the SAP System only.
    &field(C)& The system takes the field value as a sequence of words separated
    by blanks. Option C shifts these words to the left and leaves only
    one blank inbetween as separator. Any leading blanks are
    suppressed. This effect corresponds to that of the ABAP statement
    CONDENSE.

  • Convert amount with four decimal places to amount with two decimal places

    Hi,
    for specific reasons we have set the prices to four decimal places. However, in an invoice the staff needs to see all prices with two decimal places. Therefore I have created new user-defined fields which should show the rounded values However, I have not yet found the right formatted search that outputs the value with two decimal places including currency symbol.
    The statement 
    SELECT $[$38.20.NUMBER]
    outputs the value with two decimal places which is fine, but it does not contain the currency.
    The statement
    SELECT $[$38.20.0]
    outputs both value and currency, but the value still has four decimal places as the original price.
    And the statement
    SELECT CAST($[$38.20.NUMBER] AS VARCHAR(20)) + $[$38.20.CURRENCY]
    outputs a value with even six decimal places.
    Did anyone already have the same problem???
    Or does anyone have any idea???
    Thanks and regards
    Corinna

    Hi again,
    the value should be displayed in a user-defined field of the screen.
    The result of the query
    SELECT $[$38.20.NUMBER]
    has already two decimal places, so that I do not need a round here. But the currency is missing.
    When I add the round function to the query
    SELECT $[$38.20.0]
    it does unfortunatly result in an error.
    Any ideas????
    Thanks so much in advance!

  • Round Down (or not at all) and display as percent to 2 Decimal Places

    Hello,
    I have a report in SSRS with a number of computations done in the tablix.  I need to format an expression such that the value will be displayed as a percentage with 2 decimal places that is truncated(not rounded).
    For example,
    0.66666 should be displayed as 66.66% (not 66.67%)
    0.5 should be displayed as 50.00%
     I have done much Googling and have tried everything I can think of but no luck.
    I would appreciate any help anyone can provide.
    Thanks!
    Scott Olander

    Hi Alisa,
    Thanks for your response; it was very helpful.  Unfortunately I'm still having some difficulty...
    When applied to a hardcoded numeric value, your solution seems to work perfectly:
    =Left(0.66666 *100, 5) &  "%" ---> 66.66%
    I had to modify it slightly when applying it to one of my calculations as whole percentages were not displaying .00 to the right of the decimal point.  This is what I modified it to:
    Left(Format((Fields!CorrectAudits.Value/(Fields!InCorrectAudits.Value + Fields!CorrectAudits.Value) * 100),
    "N"), 5) &
    This works perfectly when applied to this particular calculation, but for some reason when I apply it to the following calculation I get funky results:
    Original calculation:
    = SUM(Fields!CorrectAudits.Value)/SUM(Fields!IncorrectAudits.Value + Fields!CorrectAudits.Value)
    Modified calculation:
    =Left((SUM(Fields!CorrectAudits.Value)/SUM(Fields!InCorrectAudits.Value+Fields!CorrectAudits.Value)*100), 5) & "%"
    Results:
    0.66666 ----> 66.66 %   (This is as desired)
    0.25      -----> 25%        (Should be 25.00%)
    0.07692      ------> 7.692 %  (This should be 7.69%)
    Adding the Format "N" piece to this calculation fixes the issues with 0.25 and 0.07962 but causes 0.6666 to round to 66.67% (not the desired result).
    Do you have any ideas?  Am I doing something wrong and just not seeing it?
    Thanks again for your help.
    Scott
    Scott Olander

  • Displaying all numbers with 2 decimal places

    Hi All,
    We have a requirement in our code where we want that all numbers must be diplayed with 2 decimal places.
    Eg: If a number is 21.234 then it should be displayed as 21.23
    If a number is 21.289 then it should be displayed as 21.28
    If a number is 21 then it should be displayed as 21.00
    Can anyone please help me how to do it in a SQL query.
    Regards,
    Shruti

    Hi, Shruti,
    This shows a couple of things you can do:
    COLUMN     trnc     FORMAT     999999.99
    WITH     got_x     AS
         SELECT     empno / 1000     AS x
         FROM     scott.emp
    SELECT     x
    ,     TO_CHAR (x,            '999999.99')     AS tc
    ,     TO_CHAR (TRUNC (x, 2), '999999.99')     AS trnc_tc
    ,     TRUNC (x, 2)                              AS trnc
    FROM     got_x
    ;Output:
    `        X TC         TRNC_TC          TRNC
         7.369       7.37       7.36       7.36
         7.499       7.50       7.49       7.49
         7.521       7.52       7.52       7.52
         7.566       7.57       7.56       7.56
         7.654       7.65       7.65       7.65
         7.698       7.70       7.69       7.69
         7.782       7.78       7.78       7.78
         7.788       7.79       7.78       7.78
         7.839       7.84       7.83       7.83
         7.844       7.84       7.84       7.84
         7.876       7.88       7.87       7.87
           7.9       7.90       7.90       7.90
         7.902       7.90       7.90       7.90
         7.934       7.93       7.93       7.93Column x is the number, as SQL*Plus displays it by default. Note there are as many digits after the decimal point as are needed.
    Column tc shows how TO_CHAR can format the number, with exactly 2 digits after the decimal point. This automatically rounds the number to the nearest multiple of .01, so on the first row (for example) 7.369 gets displayed as 7.37.
    user11272043 wrote:
    ... If a number is 21.289 then it should be displayed as 21.28You (apparantly) always want the number rounded toward 0, so column tc isn't quite what you want.
    Column trnc_tc is exacly what you requested, with the numbr rounded toward 0 (when any rouning is necessry) and 2 digits after the decimal point.
    Column tc is also exactly what you requested, but it uses SQL*Plus formatting rather than SQL. Also, column trnc is a NUMBER, while column trnc_tc is a VARCHAR2, because TO_CHAR, as its name hints, returns a VARCHAR2.
    The SQL*Plus command
    SET   NUMFORMAT  999999.99changes the default format for all number columns. If you use this, you can override it for individual columns by using TO_CHAR (since it returns a VARCHAR2, the NUMFORMAT doesn't apply),or a COLUMN command. Also, if you use SET NUMFORMAT 999999.99, you'll still have to explicitly TRUNC every number, or else 21.289 will come out as 21.29, not 21.28.

  • Displaying an integer to 2 decimal places

    celsius = 5.0 / 9.0 * (fahrenheit - 32.0);
    lblCelsius.setText(" " + celsius);
    How do I display celsius to 2 decimal places as currently 70 degrees F = 21.11111111
    Thanks

    Check out java.text.Format and java.text.NumberFormat

  • How to display total amount field in PO layout

    Dear All,
    I have a query related to Purchase Order Printing.
    I copied the standard programme SAPFM06P as ZSAPFM06P. I didn't make any changes to standard program.
    I copied the standard layout MEDRUCK as ZMEDRUCK.
    I am able to display all the data of PO but I am facing problem in displaying <b>Total Amount</b> field (i.e sum of amount and tax value).
    How can we display the Total Amount in the layout without changing the Standard program. I want to make the changes only in ZMEDRUCK for this field.
    My main window details are as follows :
    MatNo MatDesc Uom Quantity rate amount <b>Total amount</b>
    Here I am not able to print Total amount(amount + tax value)
    Please help me on this .
    Thanks & Regards
    Rajvinder

    Hi Rajvinder,
    u need not be so much against changing the program.. infact it s the best way to get the desired output if its done properly...to be completely safe,wat u can do is insert a subroutine somewhere after the values have been populated in the program n then add these inside the subroutine to get the total in a different variable..in this way ur original data s intact n u can use ur new variable in the script as total..
    neways if u dont want to change ur program, then u need to keep these things in mind..
    the value of total & tax shud be available at the point of calling the perform from the sapscript so that u can pass those to a new program for addition.
    eg :
    while writing this in script
    :/ perform add in program znew using &total& &tax& changing &final&
    before this command u need to make sure that total & tax values r ther to pass to the program..
    then u can write a FORM in ur znew to add these two n pass to final..
    in sapscript u can then print &final&
    Hope it helps,
    Regards,
    Bikash

  • Calculated field with decimal place

    Hello,
    if I create calculated field in a table using formula e.g., ColumnName/ 60, where format of ColumnName is INT (total ammount of minutes)  in order to get hours, I get only integer part, not decimal. E.g., 80 (minutes)/60 =1.3333 but, in calculated field
    I see only 1 hrs without possibility to change format of the field.
    Can calculated field be used on this way? (My wish  is to get 1.3 in that field)
    How?
    Thanks

    Of course the calculated field/column can not be an INT, if it is then change that.
    Does something like this work?CAST(ColumnName/60 AS Decimal(10,2))

  • To display value for field without its compounded infoobject value

    Hi Gurus,
    I've added a new Navigational attribute(say A) to my report which is compounded to another object(say B).
    When i execute my report I am able to see the values of my new field as B/A.
    My requirement is to just show A in the report.
    How can I achieve this?
    Thanks in advance.
    Regards,
    Akhil Singh

    Hi Shrikanth,
    What Rajendra means is that, in the WAD template properties, you will find the property 'Standard Actions of the Web Template(WEB_TEMPLATE_ACTIONS)' .
    Check this: http://help.sap.com/saphelp_nw70/helpdata/EN/14/31fa826d0bd540899b02888bf55df4/content.htm
    In this, you'll find 'Action Before Rendering'. Here, there is an option to set the command. Here, you need to assign the command 'SET_PRESENTATION'. In that, under 'List of Member Presentations (MEMBER_PRESENTATION_LIST)', select the characteristic for which compounding value is not to be displayed and then in 'List of Member Presentations (MEMBER_PRESENTATION_LIST)', select 'DISPLAY_KEY_NOT_COMPOUND'.
    Hope this helps you..!
    -Pradnya

  • Displaying the quantity field in decimal values

    hi
    I have created a web dynpro application,and I am calling BAPI functional module from that webdynpro application.
    Now the output is being displayed in the second view by giving the input from the first view.
    Now my problem is that the quantity value is being displayed as "5" and whereas It should be "5.00".
    Is there any setting to be done from the properties end of that particular table.
    Please suggest me in this issue.
    thanks and regards
    kris

    Hi Gopi,
         The property in question is "calculated". This is a property of a context value attribute. So select the value attribute in the context to which your field is bound and view the properties. Set "calculated=true". It will generate the accessors.
         In the setter method, add the following piece of code:
    public void set<your attribute name>(IPrivate<your component>View.IContextElement element, java.lang.String value)
      DecimalFormat df = new DecimalFormat("#.00");
      value = df.format(value).toString();
    Regards,
    Satyajit
    Message was edited by: Satyajit Chakraborty
    Message was edited by: Satyajit Chakraborty

Maybe you are looking for

  • How to give link between 2 customized layout in f110 transactions.

    Hello Abapers, I am developing customized layout for f110 transaction.I have developed layour for cheques as zcheques and for payment advice,i have developed layout as zpayadvice.When i am running f110 transaction..it is giving output of cheques only

  • Remove distortion from mic too close to mouth?

    Are there any recommended settings for removing the fuzziness from a tape recording (talking narration), where the person is has the mic too close or is too loud for it or both? The voice is pretty clear but the high pass filters aren't quite removin

  • Outlook categories

    Has Apple solved the problem of syncing outlook categories with multiple devices both PC's and Macs. It use to be that Icloud did not retain the category assignments made in Outlook on PC. Syncing would often times loose all category assignments weth

  • GTX680-Mac_What are the Correct Drivers for 10.8.5?

    GTX680 on MacPro5, mid 2010.... and having issues. What are the correct drivers for Mac GeForce GTX680? And is there another driver for the OS as well? Or not in use when using GTX? I can not export without my system completely shutting down....many

  • ERROR: Missing driver file /opt/SUNWjass/Drivers/ldm_control-secure.driver.

    Environment: Solaris 10u10 vm server for sparc 2.0 V22736-01.zip p10264419_420_SOLARIS64.zip --> SUNWjass-4.2.0.pkg.tar.Z Problem: Documentation and LDOM/SST tool refer to "ldm_control-secure.driver", but the file does not exist. bash-3.2# ./install-