Hide stmt in alv?

Hi
1.is it possible to write a hide stmt in alv?
2.how to write a interactive alv?
thanks,
sap-abap.

In ALV if u want to hide a particular column, use NO_OUT = 'X' in the field catalog for that field.
There are lot events which will control the interactive ALV.
      CLASS lcl_event DEFINITION
CLASS lcl_event DEFINITION.
  PUBLIC SECTION.
    METHODS handle_data_changed FOR EVENT data_changed
                                OF cl_gui_alv_grid
                                IMPORTING er_data_changed.
    METHODS handle_user_command FOR EVENT user_command
                                OF cl_gui_alv_grid
                                IMPORTING e_ucomm.
    METHODS handle_double_click FOR EVENT double_click
                                OF cl_gui_alv_grid
                                IMPORTING e_row e_column.
    METHODS handle_toolbar FOR  EVENT toolbar
                                OF cl_gui_alv_grid
                                IMPORTING e_object
                                          e_interactive.
    METHODS handle_on_f4        FOR EVENT onf4
                                OF cl_gui_alv_grid
                                IMPORTING sender
                                          e_fieldname
                                          e_fieldvalue
                                          es_row_no
                                          er_event_data
                                          et_bad_cells
                                          e_display.
ENDCLASS.                    "lcl_event DEFINITION
      CLASS lcl_event IMPLEMENTATION
CLASS lcl_event IMPLEMENTATION.
  METHOD handle_data_changed.
    PERFORM handle_data_changed USING er_data_changed.
  ENDMETHOD.                    "handle_data_changed
  METHOD handle_user_command.
    PERFORM handle_user_command USING e_ucomm.
  ENDMETHOD.                    "handle_user_command
  METHOD handle_toolbar.
    PERFORM handle_toolbar USING e_object e_interactive.
  ENDMETHOD.                    "handle_toolbar
  METHOD handle_double_click.
    READ TABLE i_final INDEX e_row-index INTO wa_final.
    IF e_column EQ text-016.     "ANLAGE
      CHECK sy-ucomm NE 'BACK'.
*-- Display Installation on Double click.
      PERFORM display_installation USING wa_final-anlage.
    ELSEIF e_column EQ text-023 OR
            e_column EQ text-024.
      PERFORM display_partner USING wa_final-contact_per.
    ENDIF.
  ENDMETHOD.                    "handle_double_click
Refer the programs BCALV_GRID_*.
Regards
Prakash,

Similar Messages

  • Hide cell in alv-grid on certain rows

    Hi all,
    I wonder if it is possible to hide certain cells in an ALV-grid ?
    e.g the data in cell1 row1 is visible, but the data in cell1 on row2 has to be invisible...

    Hi
    I don't believe it can do it for only certain cells and I don't believe it's possible to hide anything in alv-grid.
    Your program decides what  can be displayed so if something data doesn't has to be shown it shouldn't be loaded in output table.
    Max

  • Hide decimals in ALV

    I want to hide decimals in ALV report. I have written next code.
    WHEN 'EXI_PP'.
            t_alv_fieldcat-col_pos   = 5.
           t_alv_fieldcat-datatype  = 'QUAN'.
            t_alv_fieldcat-decimals_out = 0.
            t_alv_fieldcat-reptext_ddic = 'Exis. GT'.
            t_alv_fieldcat-do_sum       = 'X'. "Realizar suma
          WHEN 'EXI_CUA'.
            t_alv_fieldcat-col_pos   = 6.
            t_alv_fieldcat-decimals_out = 0.
            t_alv_fieldcat-reptext_ddic = 'Exis. ZF'.
            t_alv_fieldcat-do_sum       = 'X'. "Realizar suma
             MODIFY t_alv_fieldcat .
    But report still showing decimals . some body could  help me please?????

    Hi,
    Try this way
    t_alv_fieldcat-datatype = 'QUAN'.
    t_alv_fieldcat-decimals_out = 0'.

  • How to Hide rows in ALV without affecting total sum at the end of table?

    Hi,
    I need some help in hiding particular rows in an ALV Grid without affecting the total sum at the end of the table. I am trying to hide the rows that have negative quantities, but I still need those values so that the user can still compute for the total sums. Can anyone help? Thanks.
    Joseph

    Hi,
    Hopw this way you can hide the rows in the GRID.
    DATA:
      ld_column      TYPE lvc_fname,
      ld_hide          TYPE abap_bool.
    FIELD-SYMBOLS:
      <ls_entry>     TYPE any,
      <ld_fld>         TYPE any.
      ld_column = 'COL_1'.  " column which you want to suppress if everything is zero
      ld_hide     = abap_true.  " = 'X';  default hide column
      LOOP at <gt_outtab> ASSIGNING <ls_entry>.
        ASSIGN COMPONENT (ld_column) OF STRUCTURE <ls_entry> TO <ld_fld>.
        IF ( <ld_fld>   > 0 ).
          ld_hide = abap_false.  " display column because at least single value > 0
          EXIT.  " leave LOOP
        ENDIF.
      ENDLOOP.
      READ TABLE gt_fcat INTO ls_fcat
                           WITH KEY fieldname = ld_column.
      IF ( syst-subrc = 0 ).
        ls_fcat-no_out = ld_hide.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDIF.
    hop you will get the total with for those columns too.
    Regards,
    Madhavi

  • How to hide columns in ALV? (via cl_salv_table)

    Dear forumers,
    Is there a way for me to hide a few columns (or data fields) from being displayed in the ALV table, using the cl_salv_table method?
    FORM display_data_alv .
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = o_table
            CHANGING
              t_table      = i_ro_assets.
        CATCH cx_salv_msg.
      ENDTRY.
      o_functions = o_table->get_functions( ).
      o_functions->set_all( abap_true ).
      o_columns = o_table->get_columns( ).
      o_columns->set_optimize( abap_true ).
      PERFORM set_columns.
      o_events = o_table->get_event( ).
      CREATE OBJECT o_handle_events.
      SET HANDLER o_handle_events->on_double_click FOR o_events.
      o_table->display( ).
    ENDFORM.                    " DISPLAY_DATA_ALV
    FORM set_columns .
      TRY.
          o_column ?= o_columns->get_column( 'BUKRS' ).
          o_column->set_long_text( text-008 ).
        CATCH cx_salv_not_found.
      ENDTRY.
      TRY.
          o_column ?= o_columns->get_column( 'ANLN1' ).
          o_column->set_long_text( text-009 ).
        CATCH cx_salv_not_found.
      ENDTRY.
    ENDFORM.                    " SET_COLUMNS
    I have also tried to exclude some columns from the subroutine SET_COLUMNS, but they are still showing in the resulting ALV table. What can I do here next?
    Appreciate any help here.
    Thanks very much.

    You can use the method SET_COLUMN_TECHNICAL of the class CL_SALV_COLUMN  to hide the Column.
    data:
      ir_columns type ref to cl_salv_columns_table,
      lr_column type ref to cl_salv_column.
      try.
          lr_column = ir_columns->get_column( 'MANDT' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    Check the report SALV_DEMO_TABLE_COLUMNS to know more about the Column processing in SALV model.
    Regards,
    Naimesh Patel

  • Which do we achieve Hide functionality in ALV's.

    Hello Friends,
    In ALV's How do we get Hide Functionaly. we use selfield in form definition. but In function module, which parameter acts as a HIDE.
    Thanks & Regards
    Sathish Kumar.

    Hi satish,
       YOu have to pass a name of a form where you can define the logic for handling user commands:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_CALLBACK_PROGRAM                = W_REPID
        I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'
        I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
    FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                            P_SELFLD TYPE SLIS_SELFIELD.
    *The field p_selfld will have the clicked row's contents.
    ENDFORM.
    Regards,
    Ravi

  • Hide columns for ALV list output in SAP Query SQ01/SQ02

    Hi All,
    I have a requirement to hide the columns which are empty in sap query SQ01 alv list output.
    Please let me know this functionality available in Query (SQ01) like normal reports
    Regards,
    Venkat

    Hi,
    We just can't make changes in this case as this are all system generated programs.
    WE have to write our own reports to make things flexible to match our requirements.
    Things you are asking is not possible.
    Regards,
    Suvendu

  • Hide columns in ALV

    Hello ,
    I have a problem in the ALV usage in abap webdrn pro.
    I have implemented the ALV by reusing the component SALV_WD_TABLE.
    In the interface controller usage, i mapped the DATA node to
    component context node, say, node1.
    Node1 is has a reference to a structure from data ditionary, say Struc1.
    and Stuc1 has some 20 elements.
    But in the Node1 i mapped only 10 elements of the structure Struc1 as its attributes.
    Now, when i map 'data' node to the Node1 from controller,
    My ALV shows all teh 20 columns.
    But i want only 10 of these columns to be displayed in the ALV.
    Please let me know if.
    I already know of referring to the ALV programmatically and hiding the columns.
    But my question is taht when the Node1 has only few elements, shouldnt the alv also display the same number of coloumns..
    Please let know if there is a way out here.
    regards,
    Kiran

    Hi,
    if you want to hide a column named OBJID and OBJTYP then implement following coding
    DATA:
    lr_comp_alv TYPE REF TO if_wd_component_usage,
    lr_comp_if_alv TYPE REF TO iwci_salv_wd_table,
    lr_config TYPE REF TO cl_salv_wd_config_table,
    lr_column TYPE REF TO cl_salv_wd_column,
    ls_column TYPE salv_wd_s_column_ref,
    lt_columns TYPE salv_wd_t_column_ref.
    data: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    *... ALV Component Usage
    lr_comp_alv = wd_this->wd_cpuse_alv( ).
    IF lr_comp_alv->has_active_component( ) IS INITIAL.
    lr_comp_alv->create_component( ).
    ENDIF.
    lr_comp_if_alv = wd_this->wd_cpifc_alv( ).
    *... Configure ALV
    lr_config = lr_comp_if_alv->get_model( ).
    lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
    lr_config->if_salv_wd_std_functions~set_edit_insert_row_allowed( ).
    lr_config->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).
    lr_config->if_salv_wd_std_functions~set_export_allowed( abap_true ).
    lt_columns = lr_config->if_salv_wd_column_settings~get_columns( ).
    lr_column = lr_config->if_salv_wd_column_settings~get_column('OBJID' ).
    *To hide particular coulmn
    LOOP AT lt_columns INTO ls_column.
    CASE ls_column-id.
    when 'OBJID'.
    ls_column-r_column->set_visible( value = '99' ).
    when 'OBJTP'.
    ls_column-r_column->set_visible( value = '99' ).
    ENDCASE.
    ENDLOOP.

  • Hide column in  alv

    how i can make column hide in alv report

    Set the NO_OUT parameter in the field catalog as X.
    no_out(1)      type c,        " (O)blig.(X)no out
    In the case it would not show the column in ALV list
    Message was edited by: Anurag Bankley

  • Hide column in alv grid

    Hi Everyone,
    I would like to know how to hide a column in alv grid. Is there any specific field to set in the field catalog.
    Thanks in advance,
    Prabs.

    Hello friends,
    I am using the following lines of code, but invisible of my column ( message ) is not working, would be nice if some one can give me any tip.
    Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
      LOOP AT pt_fieldcat ASSIGNING <lfs_fieldcat>.
        CASE <lfs_fieldcat>-fieldname.
          WHEN 'DUMMY'.
            <lfs_fieldcat>-coltext = 'Message'.
            <lfs_fieldcat>-no_out = 'X'.
        ENDCASE.
      ENDLOOP.
    I have also set the field catalog to no_out = 'X'.
    PS: Do I need to append the field catalog to internal table ??
    I am using the function
    CALL METHOD lalv->SET_TABLE_FOR_FIRST_DISPLAY
             EXPORTING I_STRUCTURE_NAME =  'abc'
                       IS_LAYOUT        = ps_layout
             CHANGING  IT_OUTTAB        = xyz.
    Do I have to implicit set the field catalog in ps_layout ??

  • Hide 'Settings' in ALV WD

    Hi,
    I would like to hide the the SETTINGS( That helps the user to personalize the columns that he/she wants to display ) in the Standard ALV in Webdynpro.
    Please help me if you have any inputs.
    Thanks & Regards,
    savitha

    Hi Savitha,
    Did you check with your administration team if it's possible by "SALV WD Administration Settings"?
    If what you need is a customization will be better served in a administration forum instead of a abap one, don't you think?
    If you solve your problem post the solution and close the thread.
    Kind regards,
    Charles

  • Hide columns in ALV grid?

    Hi all,
    I define a structure in the ABAP dictionary. I declare a table of that type in my program. I populate the table with records. I then display the table of data in an ALV grid. I hide three fields in the grid when I build the field catalog. When I run the program the fields are hidden. When my user runs the program the fields are not hidden...but are displayed on the end of the ALV grid. How do I correct? And why the difference in views?
    Mat

    I agree with Frisoni
    Also what you can do is , when you display your ALV, in the application tool bar of ALV you can see the option of
    Change Variant..
    check any existing variants are there or not..I am sure user might have created such varaint.
    if this is not the case , and there is no varaint , check with user whether he has created any variant..
    also check your filedcat and Layout.

  • Hide icons in ALV

    Hi,
      I am display the datas in the ALV format using Methods.But i found unwanted icons many displayed so what our users feel is to hide unwanted icons so that to avoid confusions.so how to avoid the icons in the ALV when i am using the class method.help me to give solutions for this issue.
    Thanks,
    Deesanth

    solved my self

  • Hide checkbox in alv for specfic row

    Hi all ,
    My requirement it to hide checkbox for some specfic entiers , so that user cant select that entries while list is displayed the alv
    can anybody give some suggestions its urgent.. and imp...
    Edited by: Akash Jain on Jul 31, 2008 10:04 AM

    hi do like this... give a condition for that ...and pass column for that in the internal table and modify the table by the condition value space or X ....fill it will space for the non-editable , and fill X for the editable values...
    it_fieldcat-edit = 'X' -
    can be editable
    it_fieldcat-edit= ' ' -
    cannot be edited

  • Hide  Checkbox from alv cell..?

    Hi All,
    I have a requirnment in which i need to show checkboxes at different cell of a avl column..
    I have created a new column in alv in which i set the visibility of the checkboxes shown in a alv column and here is the way i am binding it in WDDOMODIFY..
    IF ls_col-id CS 'BOX'.
          SPLIT ls_col-id AT 'BOX_' INTO lv_head lv_tail.
          CONCATENATE 'CHK_VISIBLE_' lv_tail INTO lv_temp.
          CONDENSE lv_temp NO-GAPS.
          lr_column = ls_col-r_column.
          CREATE OBJECT lr_checkbox
            EXPORTING
              checked_fieldname = ls_col-id.
          lr_checkbox->set_visible_fieldname( lv_temp ).
          lr_column->set_cell_editor( lr_checkbox ).
    ENDIF.
    But for some reason the checkbox visibility is not getting set as i have strored in column..
    Any Idea..??
    Thanks in advance
    Vishesh.

    Create one more attribute for visibility lv_visible as WDUI_VISIBILITY in the node to which ALV is bound.
    When you create that checkbox instance, there will be corresponding method for visibilty using fieldname like SET_VISIBLE_FIELD_NAME, then pass this feildname for visibiity.
    Then based on the check boxclick, you have to modify the internal table to update this attribute.
    Example code -
    loop at it_table into wa_table.
    if lv_check eq 'X".
    lv_visible = abap_false.
    else.
    lv_visible = abap_true.
    endif.
    modify it_table from wa_table transporting lv_visible.
    endloop

Maybe you are looking for

  • Importing and Using Video from Sony DVD Camcorders

    I have a Sony DVD Camcorder (DCR-DVD 92) and I have recently shot a lot of footage which is now on my computer. The file extensions are .BUP, .IFO, and .VOB. I am able to import some of the files into final cut but they are shortened to only a few se

  • Create Object and Subject for Application Log

    Hello Experts, Could anyone tell me how to create the Z Object and subobject for the Application Log. ie) <b>BALOBJ_D & BALSUBOBJ</b> Could you please tell me the Tcode for that. Since I have to save the application in the new object so that it can b

  • Where do I go to find which JVMs are still supported?

    We're using some pretty old JVMs at my company. I fear they are so old they are unsupported by Sun. To get modernized, I need to let someone know this. If someone could direct me to a resource where I could determine this I'd appreciate it.

  • ITunes slow

    I know this is a big topic for discussion, and have reviewed hundreds of posts with solutions ranging from apple/microsoft conspiracy theories to programmer incompetence. The bottom line is I have iTunes running on a dell desktop with XP-Pros SP3 wit

  • Installation Error: Exit Code 7 on macOS10.6.8

    I downloaded Adobe Premiere Elements from the online store today, and cannot install the software on my mac os 10.6.8 I get the following errors: Exit Code: 7 -------------------------------------- Summary -------------------------------------- - 0 f