<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hiding a column in ALV GRID function module if it doesnt have data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522067#M1655842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi madhukar shetty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using dynamic internal table with so many number of fields, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and  can u send me the syntax which you posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.ch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2012 07:21:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-10T07:21:41Z</dc:date>
    <item>
      <title>Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522062#M1655837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using alv grid function module, in output i dont want to display the fields which dont have data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 06:58:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522062#M1655837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T06:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522063#M1655838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would the empty fields/column change dynamically ? or is it a fixed column which has no data ? if so you could just remove it from the field catalog after checking if it is initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:05:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522063#M1655838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522064#M1655839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be done by &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the internal table from which u are displaying the ALV if find one row with valu in field then display tat column or remove from the fieldcatlog. Before displaying the ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:16:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522064#M1655839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522065#M1655840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we dont know which column has no data..... we have to do it dynamically&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522065#M1655840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522066#M1655841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we dont know which column has no data..... we have to do it dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code does that dynamically, Here the field2 &amp;amp; Fiels4 are not displayed.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPE-POOLS:slis,abap.

TYPES:BEGIN OF ty_stru,
      field1 TYPE c,field2 TYPE c,field3 TYPE c,field4 TYPE c,
      END OF ty_stru.

DATA:itab TYPE TABLE OF ty_stru,
     wa_stru TYPE ty_stru,
     lv_repid TYPE sy-repid,
     wa_fieldcat TYPE slis_fieldcat_alv,
     it_fieldcat TYPE TABLE OF slis_fieldcat_alv,
     it_details TYPE abap_compdescr_tab,
     wa_components TYPE abap_compdescr,
     lf_ref_descr TYPE REF TO cl_abap_structdescr,
     lv_field TYPE abap_compname.

FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE ANY,
              &amp;lt;fs1&amp;gt; TYPE ANY.

lf_ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( wa_stru ).
it_details[] = lf_ref_descr-&amp;gt;components[].

wa_stru-field1 = 'A'.wa_stru-field3 = 'C'.APPEND wa_stru TO itab.
wa_stru-field1 = 'X'.wa_stru-field3 = 'Y'.APPEND wa_stru TO itab.

IF NOT itab[] IS INITIAL.
  LOOP AT it_details INTO wa_components.
    ASSIGN wa_components-name TO &amp;lt;fs&amp;gt;.
    CHECK sy-subrc = 0.
    SORT itab BY (&amp;lt;fs&amp;gt;) DESCENDING.
    CONCATENATE 'WA_STRU' '-' &amp;lt;fs&amp;gt; INTO lv_field .
    ASSIGN (lv_field) TO &amp;lt;fs1&amp;gt;.
    CHECK sy-subrc = 0.
    READ TABLE itab INTO wa_stru INDEX 1 TRANSPORTING (&amp;lt;fs&amp;gt;).
    IF sy-subrc = 0 AND ( NOT &amp;lt;fs1&amp;gt; IS INITIAL ).
      wa_fieldcat-fieldname = wa_components-name.
      wa_fieldcat-seltext_m = wa_components-name.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDIF.
  ENDLOOP.

  lv_repid = sy-repid.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = lv_repid
            it_fieldcat        = it_fieldcat[]
       TABLES
            t_outtab           = itab[].
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522066#M1655841</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-10T07:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522067#M1655842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi madhukar shetty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using dynamic internal table with so many number of fields, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and  can u send me the syntax which you posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.ch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:21:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522067#M1655842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522068#M1655843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be a slightly complex requirement. You would need to then dynamically l read each field, set flags if even a single value is found for a particular field( flag unset for empty fields)  and then dynamical populate your field catalog accordingly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Symbols are your best bet when doing this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522068#M1655843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522069#M1655844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello venu,&lt;/P&gt;&lt;P&gt;         Find the column which is initial by checking the condition and then remove from field catalog table using no_out option of field catalog. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  i_catlog_line-fieldname = p_fieldname.            "p_fieldnae is column you want not to be displayed
* To hide extra fields in catalog
  i_catlog_line-no_out = 'X'.
* Reading table catlog for removing the fields which are not needed in grid
  read table i_catlog with key fieldname = p_fieldname
                      transporting no fields.
  if sy-subrc = 0.
* Modifying table catlog
    modify i_catlog from i_catlog_line
                    index sy-tabix
                    transporting  no_out.
  endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code is used if you want that field to be  in field catlog but not to be displayed in ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Supriya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522069#M1655844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522070#M1655845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using a dynamic internal table then before the line of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lf_ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( wa_stru ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
field-symbols:&amp;lt;fs_line&amp;gt; type any.
data:wf_ref type ref to data.
create data wf_ref like line of &amp;lt;dyn_tab&amp;gt;.
assign wf_ref-&amp;gt;* to &amp;lt;fs_line&amp;gt;.
lf_ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;fs_line&amp;gt; ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab BY (&amp;lt;fs&amp;gt;) DESCENDING. as SORT &amp;lt;dyntab&amp;gt; BY (&amp;lt;fs&amp;gt;) DESCENDING&lt;/P&gt;&lt;P&gt;CONCATENATE 'WA_STRU' '-' &amp;lt;fs&amp;gt; INTO lv_field . as CONCATENATE '&amp;lt;FS_LINE&amp;gt;' '-' &amp;lt;fs&amp;gt; INTO lv_field .&lt;/P&gt;&lt;P&gt;READ TABLE itab INTO wa_stru as READ TABLE &amp;lt;dyntab&amp;gt; assigning &amp;lt;fs_line&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:28:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522070#M1655845</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-10T07:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522071#M1655846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok so you can do is during generation of data in the dynamic table based on the value create the fieldcatlog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly revert if you dont get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 07:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522071#M1655846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T07:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522072#M1655847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first i created fieldcatalog for the output table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next i created dynamci internal table based on fieldcatalog,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in output table some fields dont have data, so we dont want to display in the output,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am using some like this, is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fs_table&amp;gt; is output table, in where conditon wt we have to give?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here we have to check for the column which dont have data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_FCAT TRANSPORTING NO FIELDS WHERE COL_POS &amp;gt; 0.&lt;/P&gt;&lt;P&gt;  READ TABLE &amp;lt;FS_TABLE&amp;gt; INTO &amp;lt;FS_WA&amp;gt; INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    W_FCAT-NO_OUT = 'X'.&lt;/P&gt;&lt;P&gt;    MODIFY IT_FCAT FROM W_FCAT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.ch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 08:46:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522072#M1655847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T08:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522073#M1655848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can we know which column dont have data.....can you send me the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.ch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:07:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522073#M1655848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T09:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522074#M1655849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if this works&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT It_Fcat into wa_fcat.
lv_tabix = sy-tabix.
ASSIGN wa_fcat-fieldname TO &amp;lt;fs&amp;gt;.
CHECK sy-subrc = 0.
SORT &amp;lt;fs_table&amp;gt; BY (&amp;lt;fs&amp;gt;) DESCENDING.
CONCATENATE '&amp;lt;FS_WA&amp;gt;' '-' &amp;lt;fs&amp;gt; INTO lv_field .
ASSIGN (lv_field) TO &amp;lt;fs1&amp;gt;.
CHECK sy-subrc = 0.
READ TABLE &amp;lt;fs_table&amp;gt; assigning &amp;lt;fs_wa&amp;gt; INDEX 1 TRANSPORTING (&amp;lt;fs&amp;gt;).
IF sy-subrc = 0 AND &amp;lt;fs1&amp;gt; IS INITIAL.
wa_fcat-no_out = 'X'.
modify It_Fcat from wa_fcat index lv_tabix.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522074#M1655849</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-10T09:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522075#M1655850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imho this code is not fool-proof &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT itab BY (&amp;lt;fs&amp;gt;) DESCENDING.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're assuming none of the fields have negative values, i.e., 0.00 &amp;gt; 1.00- So your code will assume the field as INITIAL although it is not!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@OP: &lt;EM&gt;NO_OUT&lt;/EM&gt; will not hide the field from being displayed on the screen via layout management. If you want to stop this behaviour, mark the field as &lt;EM&gt;TECHNICAL&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Feb 10, 2012 2:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522075#M1655850</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-02-10T09:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522076#M1655851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; - Your analysis was really good &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can we check if the field has any contents in the row. Now ideas as of now &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; .. Any hints ? Without using a loop where not initial .&lt;/P&gt;&lt;P&gt;As  I am working in lower version its not accepting anything which was coded in ECC6.  Is read statement with not initial possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kesav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:18:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522076#M1655851</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-02-10T09:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522077#M1655852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_FCAT TRANSPORTING NO FIELDS WHERE COL_POS &amp;gt; 0.&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;FS_TABLE&amp;gt; INTO &amp;lt;FS_WA&amp;gt; INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;W_FCAT-NO_OUT = 'X'.&lt;/P&gt;&lt;P&gt;MODIFY IT_FCAT FROM W_FCAT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522077#M1655852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-10T09:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522078#M1655853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; So how can we check if the field has any contents in the row. Now ideas as of now &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; .. Any hints ? Without using a loop where not initial .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hint: You need to iterate on the table for every fieldcatalog field &amp;amp; check if the field is initial!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am on ABAP Release 702, so it's easy for me &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; I can use a dynamic delete to check for initial values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I don't have access to SAP at this moment, so can't post the code snippet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522078#M1655853</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-02-10T09:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding a column in ALV GRID function module if it doesnt have data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522079#M1655854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How you are hiding the Fields in the Layout...&lt;/P&gt;&lt;P&gt;If you are hiding with NO_OUT = 'X' and TECH = 'X' Then your requirement should work well.&lt;/P&gt;&lt;P&gt;Or else use SAP ALV standard Downloading process.&lt;/P&gt;&lt;P&gt;Also Please check the below code for Field Hiding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Cost&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Clear X_FCAT.&lt;/P&gt;&lt;P&gt;X_FCAT-COL_POS = '22'.&lt;/P&gt;&lt;P&gt;X_FCAT-OUTPUTLEN = '18'.&lt;/P&gt;&lt;P&gt;X_FCAT-FIELDNAME = 'COST'.&lt;/P&gt;&lt;P&gt;X_FCAT-TABNAME = 'TB_DISPLAY_WM'.&lt;/P&gt;&lt;P&gt;X_FCAT-SCRTEXT_S = 'Cost'(058).&lt;/P&gt;&lt;P&gt;If Not G_Y3P Is Initial.&lt;/P&gt;&lt;P&gt;X_FCAT-NO_OUT = 'X'.&lt;/P&gt;&lt;P&gt;X_FCAT-TECH = 'X'.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Append X_FCAT To P_TB_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if help full.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 10:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hiding-a-column-in-alv-grid-function-module-if-it-doesnt-have-data/m-p/8522079#M1655854</guid>
      <dc:creator>Sumeetpatil</dc:creator>
      <dc:date>2012-02-10T10:27:01Z</dc:date>
    </item>
  </channel>
</rss>

