Skip to Content
author's profile photo Former Member
Former Member

hiding option in ALV

Hi ,

Is there any option to hide columns in ALV?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 02, 2006 at 05:25 AM

    Hi,

    You need to create a filed catalog for this.

    there is one field in the field catalog structure NO_OUT you need to set this to 'X'.

    The structure for filed catalog is

    LVC_S_FCAT.

    you need to this.

    DATA: fcat type lvc_s_fcat,

    fcat_tab type lvc_t_fcat.

    fact-FIELDNAME = 'column name'.

    fact-no_out = 'X'.

    append fcat to fcat_tab.

    and pass thisfcat_tab to the ALV's SET_TABLE_FOR_FIRST_DISPLAY method.

    Regards,

    Sesh

    Message was edited by: Seshatalpasai Madala

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Anjana,

      you can definitely hide the column.

      data: gt_fieldcat_alv TYPE slis_t_fieldcat_alv,

      gs_fieldcat_alv TYPE slis_fieldcat_alv.

      you can either make the output length of the column zero

      by making the following entry

      gs_fieldcat_alv-col_pos = 2.

      gs_fieldcat_alv-fieldname = 'FIELD1'.

      gs_fieldcat_alv-ref_fieldname = 'FIELD'.

      <b>gs_fieldcat_alv-outputlenth = 0.</b>

      or marking the particular field in the field catalog as no_out

      eg: <b>gs_fieldcat_alv-no_out = 'X'.</b>

      APPEND gs_fieldcat_alv TO gt_fieldcat_alv.

      hope this helps.

      Regards,

      Kinshuk

  • author's profile photo Former Member
    Former Member
    Posted on Nov 02, 2006 at 09:21 AM

    Hi Anjana,

    If you are creating the Field catalog manually,

    then while creating the field catalog for the column which you want to hide write the following line:

    gs_fieldcat-fieldname = 'Column Name'.

    gs_fieldcat-no_out = 'X'.

    append gs_fieldcat to gt_fieldcat.

    If are using REUSE_ALV_FIELDCATALOG_MERGE for field catalog:

    loop at gt_fieldcat into gs_fieldcat.

    if gs_fieldcat-fieldname = 'Column name'.

    gs_fieldcat-no_out = 'X'.

    append gs_fieldcat to gt_fieldcat.

    endif.

    endloop.

    Regards,

    George

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 30, 2008 at 06:52 AM

    hi,

    Of cource! hiding option in ALV is possible

    while building field catalog

    d_fieldcat_wa-fieldname = 'MATNR'.

    d_fieldcat_wa-seltext_l = 'material number'.

    d_fieldcat_wa-no_out = 'X'. it will hide that particular field

    d_fieldcat_wa-col_pos = 1.

    Reward Points if Usefull

    Regards

    Fareedas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.