<?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 function modules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702283#M1104955</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;try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-006.
PARAMETERS       : p_var  LIKE is_variant-variant.
SELECTION-SCREEN : END OF BLOCK b2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
END-OF-SELECTION.
  PERFORM sub_get_variant.
  PERFORM sub_display_alv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM sub_get_variant .
  IF is_variant-variant IS INITIAL.
    IF p_var IS NOT INITIAL.
      is_variant-report = sy-repid.
      is_variant-variant = p_var.
    ENDIF.
  ENDIF.
ENDFORM.                    " SUB_GET_VARIANT


FORM sub_display_alv .
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      is_layout          = is_layout
      it_fieldcat        = it_fieldcat
      it_sort            = it_sort
      i_default          = 'X'
      i_save             = 'A'      "This is very important
      is_variant         = is_variant
    TABLES
      t_outtab           = it_final
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE i398(00) WITH 'Error When Showing ALV'.
    LEAVE LIST-PROCESSING.
  ENDIF.
ENDFORM.                    " SUB_DISPLAY_ALV

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this way in the execution mode the layout you are saving..that will appear in front of you later when you will execute that program in future..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Nov 2008 10:43:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-04T10:43:14Z</dc:date>
    <item>
      <title>ALV function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702281#M1104953</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;     What exactly is the difference between 'selection-screen variant' and 'layout variant'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen variant means values we provide for parameters in selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layout variant means, that we get using the function module&lt;/P&gt;&lt;P&gt;'Reuse_alv_variant_default_get'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain with an example that  how can we set a layout variant ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;khadeer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 10:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702281#M1104953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T10:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: ALV function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702282#M1104954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Basha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many posts are there in SDN search you will get the answers in which one of them is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="683042"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;P&gt;VEnk@&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 10:26:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702282#M1104954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T10:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: ALV function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702283#M1104955</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;try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-006.
PARAMETERS       : p_var  LIKE is_variant-variant.
SELECTION-SCREEN : END OF BLOCK b2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
END-OF-SELECTION.
  PERFORM sub_get_variant.
  PERFORM sub_display_alv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM sub_get_variant .
  IF is_variant-variant IS INITIAL.
    IF p_var IS NOT INITIAL.
      is_variant-report = sy-repid.
      is_variant-variant = p_var.
    ENDIF.
  ENDIF.
ENDFORM.                    " SUB_GET_VARIANT


FORM sub_display_alv .
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      is_layout          = is_layout
      it_fieldcat        = it_fieldcat
      it_sort            = it_sort
      i_default          = 'X'
      i_save             = 'A'      "This is very important
      is_variant         = is_variant
    TABLES
      t_outtab           = it_final
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE i398(00) WITH 'Error When Showing ALV'.
    LEAVE LIST-PROCESSING.
  ENDIF.
ENDFORM.                    " SUB_DISPLAY_ALV

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this way in the execution mode the layout you are saving..that will appear in front of you later when you will execute that program in future..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 10:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702283#M1104955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T10:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702284#M1104956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Basha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you start a program for which selection screens have been defined, the system offers you input fields for database-specific and report-specific selections. To select a certain set of data, you have to enter appropriate values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you start a program regularly with identical selections, for example, to create monthly sales statistics, you certainly will not want to enter the same values for the selection criteria over and over again. You can therefore combine the values for all selection criteria in a selection set referred to as a variant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use selection variants to provide default values for selection criteria. You can change the ready for input status of fields, or hide entire fields.&lt;/P&gt;&lt;P&gt;Accessed from a reportu2019s selection screen Reporting (SA38)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ALV Grid Control displays only the layout icon () but no menu in the toolbar. By clicking this icon, users can change the current layout (basically, they can modify the selection and the order of the columns displayed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS_VARIANT = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_SAVE = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(default setting)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopes this is help for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pullaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2008 10:54:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-function-modules/m-p/4702284#M1104956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-04T10:54:59Z</dc:date>
    </item>
  </channel>
</rss>

