How to remove decimals in ALV

How to remove displaying decimals in ALV report(using FM) ?

HI Sri,
   Pass the values into a variable of type i.
data : var type i,
         var1 type f value '2.111'.
    var = var1.
or else
change the field catalog this way ..
<b>lv_cat-decimals_out = '0'.</b>
Regards,
Santosh

Similar Messages

  • How to remove Decimals in Quantity Objects in SAP BO Explorer View created on top SAP Bex Query?

    Hi,
    I created SAP BO Explorer report on top of SAP BEx Query.
    In SAP BEx Query, Decimals were hided but when i created OLAP Universe on top that SAP BEx Query and Created Index on top of Information Space in SAP BO Explorer and then created Exploration Views. But i'm getting Decimals in my Exploration Views where as SAP BEx Query in RSRT, no decimals were appearing.
    Can anyone suggest me how to remove decimals in SAP BO Exploration Views.

    Hi Ramana,
    I am not use how you connect to SAP BEx query (Via universe or BWA or HANA)
    What I could say is BWA and HANA, you cannot adjust this
    For universe, you could try in universe layer, there is note about this
    For BWA and HANA, this function might be enhanced but you 'd better raise OSS to SAP to check with them
    Best regards
    Alex yang

  • How to remove decimals

    Hi Gurus,
    I have an IO having properties CHAR (30).
    Data is showing in the report like this eg.123.000000 ,for this IO.
    Can I remove the decimals?
    Please help.
    Points assured.
    Rgds,
    Sourav

    SAP,
    It would be advisable to change your ID to something else .... you might be asked to do the same by the other moderators also... try to give a name instead... makes it much easier and generally SAP would refer to the package on an SAP forum....
    Arun
    Sourav, you can store alphanumeric values in NUMC also - but where is the data coming from ... and how do you want it to be changed?
    Message was edited by:
            Arun Varadarajan

  • How to remove repetition  in ALV GRID

    Dear freinds,
    In  ALV grid  iam getting repetitive for a feild Count (where iam giving count of the no of
    records .........i.e if i have four records i  have to give 4 but iam getting for all the 4 records as  4,4,4,4 in the output. Can i remove the repetation and get only once
    the value as 4 ...........Iam using the  data type for count as  INT3.
    CLEAR l_wa_sort.
    l_wa_sort-fieldname = 'COUNT'. "Field name in o/p inttable
    l_wa_sort-spos = '2'.
    l_wa_sort-tabname = 'fp_i_pyrol_final'. "Output Internal table
    l_wa_sort-up = 'X'. "Sort in ascending order
    l_wa_sort-down = ' '. "Sort in descending order
    APPEND l_wa_sort TO l_i_sort.
    However i tried changing the data type to Numc it working but total iam getting as 1 only
    not 4  which is wrong since i have four records.
    please can any one correct me what i can do in this case.
    regards
    syamla

    hi,
    REFRESH the count in the begin of the loop or at end of the loop.

  • How to remove all ALV buttons?

    Hello all.
    Does anyone know how to remove all the ALV buttons?
    I now the IT_EXCLUDING option, but is there a different and
    faster way?
    (I'm using ALV classes).
    Thanks!

    hii..
    All the ALV Toolbar Buttons can be removed in Single Shot.
    There is a method in CL_GUI_ALV_GRID->SET_TOOLBAR_VISIBLE.
    it is protected method create class that is inheriting from CL_GUI_ALV_GRID.
    CALL METHOD ME->set_toolbar_visible
             EXPORTING
               visible = '0'
    *        EXCEPTIONS
    *          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.
    Set visible to '0' will disable all the buttons.
    Example Program:
    *DATA DECALRATIONS
    TYPES : BEGIN OF ty_sflight,
           carrid TYPE sflight-carrid,
           connid TYPE sflight-connid,
           Fldate TYPE sflight-fldate,
           price TYPE sflight-price,
           currency TYPE sflight-currency,
      END OF ty_sflight.
    DATA : IT_SFLIGHT TYPE TABLE OF TY_SFLIGHT,
            WA_SFLIGHT TYPE TY_SFLIGHT.
    DATA : IT_FCAT TYPE LVC_T_FCAT ,
            WA_FCAT TYPE LVC_S_FCAT.
    data : o_cont type REF TO cl_gui_custom_container ,
            o_grid type REF TO cl_gui_alv_grid.
    CLASS LCL_ALV DEFINITION INHERITING FROM CL_GUI_ALV_GRID.
       PUBLIC SECTION.
         METHODS : M1.
       ENDCLASS.
       CLASS LCL_ALV IMPLEMENTATION.
         METHOD M1.
           CALL METHOD ME->set_toolbar_visible
             EXPORTING
               visible = '0'
    *        EXCEPTIONS
    *          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.
         ENDMETHOD.
         ENDCLASS.
       START-OF-SELECTION.
         CALL SCREEN 200.
    *&      Module  STATUS_0200  OUTPUT
    module STATUS_0200 output.
       SET PF-STATUS 'ZDC'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    module USER_COMMAND_0200 input.
    CASE SY-UCOMM.
       WHEN 'BACK'.
         LEAVE TO SCREEN 0.
         ENDCASE.
    endmodule.                 " USER_COMMAND_0200  INPUT
    *&      Module  GET_DATA  OUTPUT
    module GET_DATA output.
    SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF TABLE IT_SFLIGHT
                                                              UP TO 50 ROWS.
    CLEAR WA_FCAT.
    WA_FCAT-col_pos = '01'.
    WA_FCAT-fieldname = 'CARRID'.
    WA_FCAT-tabname = 'SFLIGHT'.
    WA_FCAT-ref_table = 'SFLIGHT'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-col_pos = '02'.
    WA_FCAT-fieldname = 'CONNID'.
    WA_FCAT-tabname = 'SFLIGHT'.
    WA_FCAT-ref_table = 'SFLIGHT'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-col_pos = '03'.
    WA_FCAT-fieldname = 'FLDATE'.
    WA_FCAT-tabname = 'SFLIGHT'.
    WA_FCAT-ref_table = 'SFLIGHT'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-col_pos = '04'.
    WA_FCAT-fieldname = 'PRICE'.
    WA_FCAT-tabname = 'SFLIGHT'.
    WA_FCAT-ref_table = 'SFLIGHT'.
    APPEND WA_FCAT TO IT_FCAT.
    CLEAR WA_FCAT.
    WA_FCAT-col_pos = '05'.
    WA_FCAT-fieldname = 'CURRENCY'.
    WA_FCAT-tabname = 'SFLIGHT'.
    WA_FCAT-ref_table = 'SFLIGHT'.
    APPEND WA_FCAT TO IT_FCAT.
    CREATE OBJECT o_cont
       EXPORTING
    *    parent                      =
         container_name              = 'C1'
    .DATA O_ALV TYPE REF TO LCL_ALV.
       CREATE OBJECT O_ALV
       EXPORTING
         I_PARENT = O_CONT.
    CALL METHOD o_ALV->set_table_for_first_display
       CHANGING
         it_outtab                     = IT_SFLIGHT
         it_fieldcatalog               = IT_FCAT
    CALL METHOD O_ALV->M1.  "method called to remove all the toolbar buttons
    endmodule.

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

  • How to remove the the standard button APPEND/INSERT/DELETE in webdynpro alv

    Hello,
    how to remove the the standard button APPEND/INSERT/DELETE in webdynpro-abap  alv
    Thanks
    Rakshar

    Use  this.
        data lo_cmp_usage type ref to if_wd_component_usage.
        lo_cmp_usage =   wd_this->wd_cpuse_alv1( ).
        if lo_cmp_usage->has_active_component( ) is initial.
          lo_cmp_usage->create_component( ).
        endif.
        data lo_interfacecontroller type ref to iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_alv1( ).
        data lo_value type ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        data: lr_std type ref to if_salv_wd_std_functions.
        lr_std ?= lo_value.
        lr_std->set_export_allowed( abap_false ).
    NOte: ALV1 is alv component name
    Regards
    Srinivas
    Edited by: sanasrinivas on Dec 1, 2011 6:11 AM

  • How to remove the buttons in ALV GUI?

    Hi All,
    I am using the FM REUSE_ALV_GRID_DISPLAY for disaplying the ALV grid. i need how to remove these buttons ( mail word processing, loal file, Mail recipient,  ABC analysis, Microsoft Execl and Graphics ) from the ALV Gui?
    please give solution.
    Regards,
    Santha

    hi,
    IT_EXCLUDING TYPE SLIS_T_EXTAB OPTIONAL
    you need to append the Fucntion codes to the it_exclude and then pass it to the parameter it_excluding.
    append '&ABC' to it_excluding.
    append '&BAC' to it_excluding.
    call function 'REUSE_ALV_GRID_DISPLAY'
    IT_EXCLUDING = it_exlcuding
    Regards
    Anver

  • How to remove a column from alv table

    Hi All
    How to remove a specific column from alv table.?
    Thanks & Regards
    SUN

    For delete u can follow the above post..
    Fo making invisible :
    data m_col type ref to cl_salv_wd_column.
    m_col = alv_mode->IF_SALV_WD_COLUMN_SETTINGS->GET_COLUMN (' col1' ).
    m_col->SET_VISIBILITY( '01'  ).

  • How to remove "Records passed" list when printing ALV report

    Hi all,
    I have developed an ALV report, in which I have used reuse_alv_list_display functional module to print the output. After pressing print button, when I view the output in spool request transaction, an additional list with Number of records passed and "Calculated total records" is displayed. How to remove this additional list.
    I am using Get_print_paramaters FM to print.
    Thanks,
    rajan

    Hi
    Suppress the messages of the FM by commenting the exceptions and message statement
    Regards
    Shiva

  • How to remove a Sort button from ALV List

    Hi Experts,
    How to remove sort button from ALV List.
    I have requirement where I need to remove the sort button from ALV list.
    Kindly give me useful clues.
    Higher points will be awarded for the useful inputs.
    Thanks in Advance,
    Dharani

    Hi dharani,
    1. UP and Down Sort Button will get removed.
    2. Important code is marked in bold
    3. Just copy paste.
    4.
    report abc.
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvfcwa TYPE slis_fieldcat_alv.
    <b>data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.</b>
    data : begin of itab occurs 0.
            include structure usr02.
    data : end of itab.
    START-OF-SELECTION.
      select * from usr02
      into table 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
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    <b>*----
    IMPORTANT
    fcodes to remove
    Up and Down Sort Button
    exclwa-fcode = '&OUP'.
    append exclwa to excl.
    exclwa-fcode = '&ODN'.
    append exclwa to excl.</b>
    Display
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat   = alvfc
          <b>IT_EXCLUDING     = excl</b>
        TABLES
          t_outtab      = itab
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
    regards,
    amit m.

  • Problem in displaying decimals in ALV

    Hello Everyone,
    I am facing problem in displaying decimals in ALV
    Here i want to display 1.00000- but is displaying as 1,000.00-
    Is there any solution by not using REPLACE and changing the user settings. Please let me know. <removed by moderator>
    Thanks in advance.
    Radha.
    Edited by: Thomas Zloch on Dec 12, 2011 6:23 PM

    - If this is a currency amount or a quantity, did you correctly define the link to currency code or quantity unit of measure ?
    (Many available documents to read like [Value Display with Currency/Quantity Unit|http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649b1f17411d2b486006094192fe3/frameset.htm])
    - If this is not such a field, but a basic numeric type, did you try to fill DECIMALS_O in the field catalog ?
    Regards,
    Raymond

  • How to remove space from a variable in a smartform

    Hi,
    I have a problem in displaying a variable in a smartform..The variable shows some blank space that preceeds the data.
    for eg:,
    variable =        18.000.
    How to remove space before 18.000?

    To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
    &symbol(.N)&
    where N is number of decimal places.
    Since you dont want decimals use &symbol(.0)&
    For the other case it depends on how the currency is represented , any way try using the syntex &symbol(T)&
    Please give me reward point If it is useful
    Thanks
    Murali Poli

  • Remove decimals from the Bar Graph..

    Hii,
    How to remove the Decimals from the Bar Graph.
    I am using Reports 9i.
    I have created a Bar Graph in that It is showing the decimals bar. Actully in the query i hv used the inbuild function Round but while i run the report it is showing the decimals.
    It is showing if the value is under 10 then 3 decimals. Value is between 10 to 100 then 2 decimals. 100 to 1000 is 1 decimal.
    How can i remove the same.
    Also in the X axis how can I put the description of a field. While i take the description fiel it is showing some exception error.
    Description field width is 50 Now I am showing the code field only have 3 digits.
    Please check this also...
    remove decimal places
    Thanks in Advance
    Jithesh

    Hi Simran
    1. You can get proper variable without decimal point.
    2. Use function "FLOOR" and get the output value assigned to variable defined in step 1.
    data : wv_wh_no type p decimals 0 .   -
    you take as per your requirement
    Let say,
    wv_dec_no = 1.0001.
    w_no = FLOOR(wv_dec_no).
    Hope it will help you.
    Regards,
    Anil Salekar

  • No decimals in ALV

    Hi,
    I am populating field quantity (13+3 decimals) in ALV.
    I want it to appear without decimal places.
    how should i get rid of it?
    there is a field called 'decimals_out' in ALV field catalogue. How to use this..? I am passing '0' in that but its not working for me..
    Reply quickly,
    Regs,
    Ags..

    Here is code: 
    PERFORM populate_fieldcat USING:
       'MOQ'           'GI_ALV_OUTPUT' text-038   ' '  '15' ' ',
       'AUMNG'         'GI_ALV_OUTPUT' text-039   ' '  '15' '0'.
    *&      Form  populate_fieldcat
          Subroutine to populate the field catlogue
    FORM populate_fieldcat  USING  fv_fnam
                                   fv_tabnam
                                   fv_headtxt
                                   fv_nozero
                                   fv_length
                                   fv_decimals.
      CLEAR gw_afield.
      gw_afield-fieldname         = fv_fnam.
      gw_afield-tabname           = fv_tabnam.
      gw_afield-seltext_l         = fv_headtxt.
      gw_afield-no_zero           = fv_nozero.
      gw_afield-outputlen         = fv_length.
    gw_afield-decimals_out      = fv_decimals.
    IF fv_fnam = 'SCMNG' OR
        fv_fnam = 'AUMNG'.
        gw_afield-decimals_out = '0'.
       gw_afield-datatype     = 'QUAN'.
    ENDIF.
      APPEND gw_afield TO gi_fieldcatalog.
    ENDFORM.                    " populate_fieldcat
    I am passing  gi_fieldcatalog to FUNCTION 'REUSE_ALV_GRID_DISPLAY':---
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_bypassing_buffer       = 'X'
          i_buffer_active          = ' '
          i_callback_program       = lv_report
          i_callback_pf_status_set = gc_status
          i_callback_user_command  = gc_user_command
          i_callback_top_of_page   = gc_top_of_page
          is_layout                = gw_layout
          it_fieldcat              = gi_fieldcatalog
          it_sort                  = gi_sort
          i_save                   = gc_save
          is_variant               = gw_variant
          it_events                = gi_events
        IMPORTING
          e_exit_caused_by_caller  = gv_exit_caused_by_caller
          es_exit_caused_by_user   = gw_exit_caused_by_user
        TABLES
          t_outtab                 = gi_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE s010 DISPLAY LIKE gc_e.
        LEAVE LIST-PROCESSING.
      ENDIF.

Maybe you are looking for

  • How can I restore my original files and settings?

    I had a computer crash and had to send my laptop in for service, in the process of it, I lost some files. All of my files are backed up on external hard drive, though, but I cannot get firefox to open the files now. I lost my custom preferences and s

  • Cheap Camera Won't Unmount!

    For my daughter's sixth birthday we bought her an inexpensive digital camera to introduce her to the world of photography. The instructions that came with the driver download noted that when connecting the camera to a computer running Mac OS X, one c

  • Dynamic Dimension members - Efficiency of BPC to handle such scenarios

    Hi, I am currently doing a fitment analysis for a client to understand if BPC 5.1 MS version, SQL Server 2005 (the client has this installed) can be used for their reporting requirements. The main requirement is that the client wants to drill down to

  • Adobe Reader could not open -.because it is not a supported file type

    I'm using Safari 6.1 and Adobe Reader 11.0.04. Since (I think) the last Safari update I have had "Adobe Reader blocked for this website" and "Adobe Reader could not open (file) because it is either not a supported file type or because the file has be

  • BSP F4 Help..

    Hi ,   i am facing a problem to use f4 help. the scenario is ,   i have a table called 'ZTABLE' which is having a field called 'Group', the value of this field is 'X' 'Y' 'Z'.   in my view i have an input field called 'Group_Id'. here is my proble be