<?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: ALV - Column hiding error... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035998#M418195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Umesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way u r doing to hide the fields is correct &amp;lt;b&amp;gt;NO_OUT = 'X'&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the itab before u r passing to ALV FM whether u r filling data again to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise u can make the option of using the Display Variant so that the user can change the layout as if he wants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USe this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : g_r_disp_variant TYPE disvariant.





SELECTION-SCREEN BEGIN OF BLOCK variant WITH FRAME TITLE text-003.
PARAMETERS:  p_varian LIKE disvariant-variant DEFAULT '/STANDARD'.
SELECTION-SCREEN END OF BLOCK variant.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varian.
  PERFORM show_existing_display_variants.

*&amp;amp;---------------------------------------------------------------------
*
*&amp;amp;      Form  SHOW_EXISTING_DISPLAY_VARIANTS
*&amp;amp;---------------------------------------------------------------------
*
*       text
*----------------------------------------------------------------------
*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------
*
FORM show_existing_display_variants.

  g_r_disp_variant-report = sy-repid.

  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
       EXPORTING
            is_variant    = g_r_disp_variant
            i_save        = 'A'
       IMPORTING
            es_variant    = g_r_disp_variant
       EXCEPTIONS
            not_found     = 1
            program_error = 2
            OTHERS        = 3.
  IF sy-subrc = 0.
    p_varian = g_r_disp_variant-variant.
  ENDIF.


ENDFORM.                               " SHOW_EXISTING_DISPLAY_VARIANTS





*form get_output


  g_repid = sy-repid.
*  display variant
  g_r_disp_variant-report = sy-repid.
  IF NOT p_varian IS INITIAL.
    g_r_disp_variant-variant = p_varian.
  ENDIF.




*get_output



  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = g_repid
            i_grid_title       = 'PRICE COMPARISON REPORT:'
            is_layout          = it_layout
            it_fieldcat        = it_fldcat
            is_variant         = g_r_disp_variant
            i_default          = 'X'
            i_save             = 'A'
       TABLES
            t_outtab           = g_t_itab_alv
       EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 09:47:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T09:47:55Z</dc:date>
    <item>
      <title>ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035996#M418193</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;I m working on ALV. I have to show the few colums in first display, then the user will select the column from the list and then iwill display the other columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m using 'no_output' for hiding the few columns, but when user selects from the list then the values in those column is incorrect. In some cases it is repeating the earlier values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field sequence and the internal field table sequence is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in debugging I can see correct values in the all fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there any other way to hide and then display with correct content ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Umesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035996#M418193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035997#M418194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Umesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are usefule links which should your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/sapgenie/docs/Using%20ALV.pdf" target="test_blank"&gt;http://www.erpgenie.com/sapgenie/docs/Using%20ALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/17/102896f24311d2b487006094192fe3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/17/102896f24311d2b487006094192fe3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck and reward points for the same&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:46:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035997#M418194</guid>
      <dc:creator>ashok_kumar24116</dc:creator>
      <dc:date>2007-03-13T09:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035998#M418195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Umesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way u r doing to hide the fields is correct &amp;lt;b&amp;gt;NO_OUT = 'X'&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the itab before u r passing to ALV FM whether u r filling data again to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise u can make the option of using the Display Variant so that the user can change the layout as if he wants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USe this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : g_r_disp_variant TYPE disvariant.





SELECTION-SCREEN BEGIN OF BLOCK variant WITH FRAME TITLE text-003.
PARAMETERS:  p_varian LIKE disvariant-variant DEFAULT '/STANDARD'.
SELECTION-SCREEN END OF BLOCK variant.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varian.
  PERFORM show_existing_display_variants.

*&amp;amp;---------------------------------------------------------------------
*
*&amp;amp;      Form  SHOW_EXISTING_DISPLAY_VARIANTS
*&amp;amp;---------------------------------------------------------------------
*
*       text
*----------------------------------------------------------------------
*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------
*
FORM show_existing_display_variants.

  g_r_disp_variant-report = sy-repid.

  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
       EXPORTING
            is_variant    = g_r_disp_variant
            i_save        = 'A'
       IMPORTING
            es_variant    = g_r_disp_variant
       EXCEPTIONS
            not_found     = 1
            program_error = 2
            OTHERS        = 3.
  IF sy-subrc = 0.
    p_varian = g_r_disp_variant-variant.
  ENDIF.


ENDFORM.                               " SHOW_EXISTING_DISPLAY_VARIANTS





*form get_output


  g_repid = sy-repid.
*  display variant
  g_r_disp_variant-report = sy-repid.
  IF NOT p_varian IS INITIAL.
    g_r_disp_variant-variant = p_varian.
  ENDIF.




*get_output



  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = g_repid
            i_grid_title       = 'PRICE COMPARISON REPORT:'
            is_layout          = it_layout
            it_fieldcat        = it_fldcat
            is_variant         = g_r_disp_variant
            i_default          = 'X'
            i_save             = 'A'
       TABLES
            t_outtab           = g_t_itab_alv
       EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035998#M418195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035999#M418196</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;Thanks for the quick replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already used the display layout variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even in the internal table which is finally i m passing populated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;Umesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2035999#M418196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2036000#M418197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Umesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u paste the ur code...&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;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 10:03:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2036000#M418197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T10:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: ALV - Column hiding error...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2036001#M418198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Umesh Lohar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to remove the field permanently, even user should not be able to see while changing layout &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use tech field of fieldcatalog and it should be 'X' in order to not to display it to user even while changing layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kapadia&lt;/P&gt;&lt;P&gt;***&lt;STRONG&gt;Assigning points is the way to say thanks in SDN.&lt;/STRONG&gt;***&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 10:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-column-hiding-error/m-p/2036001#M418198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T10:09:46Z</dc:date>
    </item>
  </channel>
</rss>

