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

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Aug 08, 2005 at 07:00 AM

    Hi,

    In the field catalog set

    no_out = 'X'

    In PBO, modify field catalog

    Eg:

    FIELD-SYMBOLS : <lfs_fieldcat> TYPE lvc_s_fcat.
    
      LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.
    
        CASE <lfs_fieldcat>-fieldname.
          WHEN 'BUKRS'.
            <lfs_fieldcat>-coltext = text-003.
      <b>      <lfs_fieldcat>-no_out  = 'X'.</b>
         WHEN OTHERS.
        ENDCASE.
      ENDLOOP.

    Hope this helps u.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2005 at 07:00 AM

    Hi,

    The field is NO_OUT.

    Svetlin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 08, 2005 at 07:03 AM

    Hi,

    Here is the sample code.

    Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.

    LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.

    CASE <lfs_fieldcat>-fieldname.

    WHEN 'AUSCH'.

    <lfs_fieldcat>-coltext = text-011.

    <lfs_fieldcat>-no_out = 'X'.

    WHEN 'AUSCH_MEINS'.

    <lfs_fieldcat>-coltext = text-012.

    <lfs_fieldcat>-no_out = 'X'.

    ENDCASE.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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 ??

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 09:58 AM

    Hi

    Ensure that the Field catalog of that field has no_out = 'X'. This should work.

    Murli

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 10:09 AM

    I dont think it is required to be explicitly done. Just assign the Field catalog to the FM.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Do u guys think, that I have to define the column names in my field catalog, at this time I am using the structure, and FM SET_TABLE_FOR_FIRST_DISPLAY ??

      Thanks

      Okey Problem solved, 😊 thanks

      Message was edited by: Haider Syed

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.