ALV report - remove of decimal values

Hi experts,
In my ALV report, output table having decimal values, ex:90000.50, i want to display only 90000,
can help any one inthis.
Thanks in advance.
Regards
Rams

Hi,
for that particular field in Field catalog..
<ur field cat>-decimals_out = 0.
see this sample code.
type-pools: slis.
DATA: begin of itab6 occurs 0,
chk type c,
a type p decimals 2,
b type p decimals 2,
c type c,
end of itab6.
data: ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_layout TYPE slis_layout_alv.
itab6-a = '1.12'.
itab6-b = '2.25'.
itab6-c = '+'.
append itab6.
append itab6.
append itab6.
append itab6.
ls_fieldcat-fieldname = 'A'.
ls_fieldcat-seltext_m = 'A'.
append ls_fieldcat.
ls_fieldcat-fieldname = 'B'.
ls_fieldcat-seltext_m = 'B'.
ls_fieldcat-decimals_out = 0.  "this ll do
append ls_fieldcat.
ls_fieldcat-fieldname = 'C'.
ls_fieldcat-seltext_m = 'C'.
append ls_fieldcat.
wa_layout-box_tabname = 'ITAB6'.
wa_layout-box_fieldname = 'CHK'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = ls_fieldcat[]
IS_LAYOUT = wa_layout
TABLES
t_outtab = itab6[].
Cheers,
jose.

Similar Messages

  • ALV removal of decimal values

    Hi All,
    I want to remove the decimal values of report output based on certain condition I am using code like this
    type-pools: slis.
    DATA: begin of itab6 occurs 0,
    chk type c,
    a type p decimals 2,
    b type p decimals 2,
    c type c,
    end of itab6.
    data: ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    wa_layout TYPE slis_layout_alv.
    itab6-a = '1.12'.
    itab6-b = '2.25'.
    itab6-c = '+'.
    append itab6.
    append itab6.
    append itab6.
    append itab6.
    ls_fieldcat-fieldname = 'A'.
    ls_fieldcat-seltext_m = 'A'.
    append ls_fieldcat.
    ls_fieldcat-fieldname = 'B'.
    ls_fieldcat-seltext_m = 'B'.
    ls_fieldcat-decimals_out = 0.  "this ll do
    append ls_fieldcat.
    ls_fieldcat-fieldname = 'C'.
    ls_fieldcat-seltext_m = 'C'.
    append ls_fieldcat.
    wa_layout-box_tabname = 'ITAB6'.
    wa_layout-box_fieldname = 'CHK'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    it_fieldcat = ls_fieldcat[]
    IS_LAYOUT = wa_layout
    TABLES
    t_outtab = itab6[].
    But still it is not removing the decimal value.
    What could be the reason?
    Regards
    Sagar.

    Thanks Florian,
    Issue resolve
    Regards
    Sagar

  • ALV: issue in truncating decimal values (rounding up)

    Hi,
    I have been receiving a problem truncating decimal values in alv environment using this abap code.
    WRITE gwa_komv-kwert TO gv_out_tax CURRENCY rte0143sf-currency
            DECIMALS l_decimals LEFT-JUSTIFIED.
    where l_decimals = 0.
    More exactly the value is rounded up but this is not my expectation.
    Any idea?
    Thanks.
        Giovanni

    Standard behaviour with DECIMALS 0: rounding up or own.
    And when you use the addition DECIMALS, then the CURRENCY addition is ignored as well.

  • Editable alv not update with decimal values

    Friends.
    i have editable alv, there is a editable field is with 3 decimal places.
    my problem is when i changed there value as  15 its take 1.5 and if i change as 150 its take 15.
    can you please help me to solve my problem?
    thanks in advance!

    Hi Friend,
    This Problem will be solved in below method.
    Define Your filed type in currency.
    Eg. vnumber TYPE CE1SAS1-KWABLK (kwablk is a currency field).
    In FIELDCATALOG add currency.
    Eg:
    lw_fcat-fieldname = 'VNUMBER'.
    lw_fcat-edit = 'X'.
    lw_fcat-datatype = 'CURR'.

  • 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

  • Decimal  values for a field in ALV

    Hi,
    I created an ALV report.
    It has a field which will display the calculated value as '103,839,389'. This should be dispalyed as '103,839,389.00' with decimal value, I mean with 2 decimal places, how can this be achieved?
    Thanks,
    Kumar

    hi check this..
    use these in populating the fieldcat..
    it_fieldcat-decimalsfieldname = fieldname
    it_fieldcat-decimalstabname   = tabname
    it_fieldcat- decimals_out   = 2.
    regards,
    venkat

  • ALV grid can we remove the repetation values in field & display as one .

    Dear Freinds,
                      i have developed a custom development relating to a salarly report based on the orgunit, the output is coming however i have one doubt in alv output.
    right now my internal table data having data as follows  : (iam giving only some fields)
    orgunit         orgdesc                  Empno     Empname     
    70000905        Human Resources      7056     Richard        
    70000905        Human Resources      7057     Reymond Jain       
    70000905        Human Resources      7058     Maria Gulz
    70000905        Human Resources      7061       Jacob
    now in my output i dont want to have the orgunit value 70000905 and orgdesc (human resources) shouldnt not be repeated . is there any option in ALV where we  I can use in
    the field cat ( any parameter) where i can set that we can make the orgid as one and remove the repeation.(iam using alv grid function module).
    Please help me in this regard
    Regards
    Syamla

    Hi,
         Before displaying sort ur internal table.
    refer this code.
    *&      Form  sub_display_data
          text
    FORM sub_display_data .
    *--To sort the output through material number
      DATA : lwa_sort TYPE slis_sortinfo_alv.
      DATA : lit_sort TYPE slis_t_sortinfo_alv.
    *--Pass the values to the table
      lwa_sort-fieldname = 'PERNR'.             "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '1'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = 'X'.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
    *--Pass the values to the table
      lwa_sort-fieldname = 'WORKDATE'.          "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '2'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = ' '.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
    *--Pass the values to the table
      lwa_sort-fieldname = 'WEKLY'.             "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '3'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = ' '.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
      wa_layout-colwidth_optimize = 'X'.
      IF NOT it_final2[] IS INITIAL.
    *--Call the function module to display the ALV report
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            is_layout          = wa_layout
            i_callback_program = v_repid
            it_fieldcat        = it_fieldcat1[]
            i_default          = c_chk
            i_save             = c_save
            it_sort            = lit_sort
          TABLES
            t_outtab           = it_final2
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ELSE.
    *--Message No data found
        MESSAGE i888 WITH text-017.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " sub_display_data
    Regards,
    Prashant

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

  • ALV .  How to remove the sort buttons on toolbar in ALV report?

    Hi,experts
      As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
      Thanks for your help .

    Hi guixin,
    1. Before calling REUSE_ALV_LIST_DISPLAY
    2. Write this code :
    data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.
    exclwa = '&OUP'.
    append exclwa to excl.
    exclwa = '&ODN'.
    append exclwa to excl.
    3. Then while calling the FM,
       pass this parameter also .
    IT_EXCLUDING     = excl
    It will work fantastic.
    regards,
    amit m.

  • Call tcode from alv report and passing  group of values

    hi all .
    i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
    ex. passing group of GL to fbl3n and display the detials of all .
    thank you

    Dear,
    You have done a small mistake
    --> rspar_line-option = 'EQ'.
         rspar_line-HIGH = PDATE-HIGH.
    u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
    So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-LOW = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'BT''.
    rspar_line-LOW = PDATE-LOW.
    rspar_line-HIGH = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    try above code , hope it helps...
    i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in  loop.
    PROGRAM
    DYNPRO
    DYNBEGIN
    FNAM
    FVAL
    ex:-
    LOOP AT GT_TEMP INTO GS_TEMP.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = 'SAPXXXX'.
    bdcdata_DYNPRO = '1000'.
    bdcdata_DYNBEGIN = 'X'.
    bdcdata_wa-fnam = '''.
    bdcdata_wa-fval = ''.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'SD_SAKNR'.
    bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = 'XXX'.
    APPEND bdcdata_wa TO bdcdata_tab.
    ENDLOOP.
    try above code if u r using call transaction...
    Edited by: mihir6666 on Jul 9, 2011 3:10 PM
    Edited by: mihir6666 on Jul 9, 2011 3:11 PM
    Edited by: mihir6666 on Jul 9, 2011 3:13 PM

  • Value in ALV report

    Hi experts,
    I have an ALV report.
    In the ALV report one of the field is Currency conversion rate to USD.
    For this i am fetching value from TCURR-UKURS.
    The value is taken into an internal table.
    I have seen in the internal table the value is coming correctly. like: suppose the value is 1,114.10000- in that perticulat field. then the same value is coming in my final internal table.
    But in the report display it is coming as /1,114.10000
    Please help me out
    regards,
    charles

    Check the field-reference what is your ALV-field pointing at. Maybe this reference is pointing at a field, which enables only positive numbers.
    And if you just modified it, don't forget about the ALV-cache, which stores a lot of setting about ALV grids while you are logged in.
    To clear ALV cache you can use a transaction (but I forgot it ), or you can log off and relogin to SAP.
    Happy developing
    Tamá

  • Display Currency symbol with value in ALV Report

    Hi Experts,
    I need to display currency symbol with value in ALV Report like if currency type is dollar then $200.
    Here I am using field catalog type slis_t_fieldcat_alv and suing field merge catalog FM: 'REUSE_ALV_FIELDCATALOG_MERGE'
    I tried like this
        IF <fs_fieldcat>-fieldname = 'STPRS'.
          <fs_fieldcat>-seltext_s = 'Std Cost '.
          <fs_fieldcat>-seltext_m = 'Std Cost'.
          <fs_fieldcat>-seltext_l = 'Std Cost '
           <fs_fieldcat>-tabname = 'MBEW'.
          <fs_fieldcat>-ctabname = 'T001'.
          <fs_fieldcat>-cfieldname ='WAERS'.
          <fs_fieldcat>-datatype = 'CURR'.
        ENDIF.
    Please any one can suggest the solution for this.
    Advance Thanks.
    Regards,
    Bala Achari

    Hİ,
    Check this link.
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=24379571
    Take care.
    Çağatay

  • Need to remove space for a field when displayed in ALV Report

    Hi,
    I have material field of length 18, but the content is only 10 char. I need to remove the extra space when it is displayed on ALV Report.
    Is there any option in ALV field catalogue

    use statement condense.
    condense zmatnr.
    also giv output lenth of alv column as 10.

  • Tool Tip Text for field values in ALV report

    Hi,
    How to get the tool tip text for the field values in ALV report.
    Thanks & Regards,
    Pallavi.

    Hi,
    In fieldcatalog specify the TOOLTIP.
    <b>
    LVC_S_FCAT-TOOLTIP
    </b>
    In this speicfyteh tooltip you want.
    Then append this to the fieldcatalog.
    Hope this solves ur problem.

  • Not showing Net Order Value in PO Currency in ALV report

    Dear all,
    Good day.
    In my ALV report i want to display net order value in PO currency which comes from ekpo-netwr field. But this field is showing 0.00 for all records. i,e value is not coming here. Please tell me how to show the value in ALV and how to show blank space when value is not in database.
    Thanks.
    Best regards.

    Hi,
    Place a break-point just before you call the ALV display "Reuse_alv_*".
    Check the value here in the column price.
    Most probably you do not have a value here which is why there is no value displayed.
    Regards,
    Jovito

Maybe you are looking for

  • Mastering 16:9

    we're trying to master a PAL 16:9 SD DVD and we can't seem to get it to work properly. material has been shot in 16:9 anamorphic, captured and edited in fcp as such. in compressor we used the PAL 16:9 presets then in the DVDSP project, we set the set

  • 11.5.10 forms server error

    hi all i have installed EBS 11i on windows xp it worked fine for last few months.now i am getting forms server error. i can login as user and when i try to go to applications like AR transactions, jinitiator is also geting intiated.it stops at this s

  • Passing field "BSCHL"  to bapi BAPI_ACC_DOCUMENT_POST.

    Hi developers,              I've just searched the forum, but I can't find the solution to the following problem: I need to use bapi BAPI_ACC_DOCUMENT_POST to simulate FB01 transaction. I need to pass to the bapi the field "BSEG-BSCHL" for each recor

  • Question about "Auto Qos Voip Trust" on 3560X

    Hi, I applied command "auto qos voip trust" to the uplink interface. But I found that the interface shown command "auto qos trust" was applied when i show running-config. Could the command "auto qos voip trust" show in the configuration after i appli

  • Consignment pick up - quantity not confirmed

    Dear All, Iam creating consignment pick up KA order and material is at customer place, but in order its not confirming, i checked MB58 , stocks at customer place, but in order its showing its not confirmed quantity in schedule lines. Could you all gi