<?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: layout variant not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504088#M1258969</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;Kindly make sure i_default = 'X' here the X must be in Capital.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just change it and check once again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Senthil kumar V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2009 11:53:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-17T11:53:42Z</dc:date>
    <item>
      <title>layout variant not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504086#M1258967</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 have executed a report . I hide one column and saved the layout. The layout name comes on to the selection screen parameter which i have defined on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_vari LIKE disvariant-variant. " ALV Variant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have made the i_save = 'A' and is_default = 'x'. and also used other function modules reg. Variants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if i select the layout variant in the selection screen and execute it is not working . the hidden column also coming on the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the select the layout variant on the output of the report from the icon select layout it is working fine. the column which i have hidden is not coming. it is perfect. why it is not working when i select the variant in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 11:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504086#M1258967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T11:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: layout variant not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504087#M1258968</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;Please try this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.

  w_variant-report = sy-repid.
* Function module to show the variant of a ALV report
  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
      is_variant = w_variant
      i_save     = 'A'
    IMPORTING
      es_variant = w_kvariant
    EXCEPTIONS
      not_found  = 2.
  IF sy-subrc = 2.
    MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
    p_vari = w_kvariant-variant.
  ENDIF.


END-OF-SELECTION.

 MOVE w_variant TO w_kvariant.
    MOVE p_vari TO w_kvariant-variant.
    MOVE sy-repid TO w_kvariant-report.
*   Function module to check the variant existence
    CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
      EXPORTING
        i_save     = w_save
      CHANGING
        cs_variant = w_kvariant.
    w_variant = w_kvariant.           

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program          = sy-repid
      i_callback_pf_status_set    = 'SET_PF_STATUS'
      i_callback_user_command     = 'USER_COMMAND'
      i_callback_html_top_of_page = 'HTML_HEADING'
      i_grid_title                = text-t06
      i_grid_settings             = wa_grid_set
      is_layout                   = wa_layout
      it_fieldcat                 = t_fieldcat
      i_save                      = 'X'
      is_variant                  = w_variant
      is_print                    = wa_print
    TABLES
      t_outtab                    = t_header
    EXCEPTIONS
      program_error               = 1
      OTHERS                      = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    CASE sy-subrc.
      WHEN 1. RAISE program_error.
      WHEN 2. RAISE others.
    ENDCASE.
  ENDIF.
       
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Krishna Gowrneni on Apr 17, 2009 5:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 11:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504087#M1258968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T11:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: layout variant not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504088#M1258969</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;Kindly make sure i_default = 'X' here the X must be in Capital.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just change it and check once again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Senthil kumar V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 11:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/layout-variant-not-working/m-p/5504088#M1258969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T11:53:42Z</dc:date>
    </item>
  </channel>
</rss>

