<?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 variants in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634410#M605991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;How can I save the alv test data?&lt;/P&gt;&lt;P&gt;To save it as a variant, what is the whole procedure?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2007 06:25:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-06T06:25:22Z</dc:date>
    <item>
      <title>variants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634410#M605991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;How can I save the alv test data?&lt;/P&gt;&lt;P&gt;To save it as a variant, what is the whole procedure?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 06:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634410#M605991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T06:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: variants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634411#M605992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean search test data.&lt;/P&gt;&lt;P&gt;When we enter some values into parameters os select-options, the same selection criteria would be applied times by times.&lt;/P&gt;&lt;P&gt;I need this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 06:26:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634411#M605992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T06:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: variants</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634412#M605993</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;variants is a concept in SAP used for saving data and can be used for no. of times.&lt;/P&gt;&lt;P&gt;for ex : if we want to check our program with sam data for no. of times then variants are very useful for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create a variant first give the input to your prgm and click on save button then system creates a variant and give desc and name for that variant.then for next times on wards u no need to giv sam data just click on variant then it will automatically giv es data to required fields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variants r useful in alv also.some of FM's in alv r&lt;/P&gt;&lt;P&gt;1. REUSE_ALV_F4_VARIANTS.&lt;/P&gt;&lt;P&gt;2. REUSE_ALV_VARIANTS_GET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_vari.&lt;/P&gt;&lt;P&gt;**-- Display all existing variants&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_VARIANT_F4'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;is_variant = g_variant&lt;/P&gt;&lt;P&gt;i_save = g_save&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;e_exit = g_exit&lt;/P&gt;&lt;P&gt;es_variant = gx_variant&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;not_found = 2.&lt;/P&gt;&lt;P&gt;if sy-subrc = 2.&lt;/P&gt;&lt;P&gt;message id sy-msgid type 'S' number sy-msgno&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;if g_exit = space.&lt;/P&gt;&lt;P&gt;p_vari = gx_variant-variant.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants are used to save the data and retrieve the same when required. This is an option used in ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP provides standard interfaces for initializing and retrieving the display variant information. This includes three function modules and four subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. REUSE_ALV_VARIANT_DEFAULT_GET.&lt;/P&gt;&lt;P&gt;This FM is used to get the default variant for the report if it has been set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_SAVE : Controls the storage mode. Allowed values are :&lt;/P&gt;&lt;P&gt;&amp;#145;A&amp;#145; : Standard and user specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;U&amp;#146; : User specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;X&amp;#146; : Standard Variants&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;CS_VARIANT : Gets the default variant in a structure like DISVARIANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. REUSE_ALV_VARIANT_F4&lt;/P&gt;&lt;P&gt;This FM is used to get the possible values of the variants on the selection screen.&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS_VARIANT : Structure of this parameter is like DISVARIANT. Pass the program name through this.&lt;/P&gt;&lt;P&gt;I_SAVE : Controls type of variant to be displayed in value help. Allowed values are&lt;/P&gt;&lt;P&gt;&amp;#145;A&amp;#145; Standard and user specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;U&amp;#146; User specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;X&amp;#146; Standard Variants&lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;E_EXIT : If this parameter is blank then user has selected some variant.&lt;/P&gt;&lt;P&gt;ES_VARIANT :&lt;/P&gt;&lt;P&gt;Selected variant is populated in this work area. It&amp;#146;s of structure like DISVARIANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.REUSE_ALV_VARIANT_EXISTENCE&lt;/P&gt;&lt;P&gt;This FM is used to check existence of a &lt;/P&gt;&lt;P&gt;display variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_SAVE : Type of variant. Allowed values are&lt;/P&gt;&lt;P&gt;&amp;#145;A&amp;#145; Standard and user specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;U&amp;#146; User specific variants&lt;/P&gt;&lt;P&gt;&amp;#145;X&amp;#146; Standard Variants&lt;/P&gt;&lt;P&gt;CHANGING &lt;/P&gt;&lt;P&gt;CS_VARIANT : Pass on variant details. The structure of this field is like DISVARIANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#61607; DATA AREAS TO BE DECLARED FOR VARIANTS :&lt;/P&gt;&lt;P&gt;Data, which will be, used by the standard function modules in ALV for variants. A sample data deceleration is as mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WS_X_VARIANT LIKE DISVARIANT,&lt;/P&gt;&lt;P&gt;WS_VARIANT LIKE DISVARIANT,&lt;/P&gt;&lt;P&gt;WS_SAVE TYPE C,&lt;/P&gt;&lt;P&gt;WS_EXIT TYPE C,&lt;/P&gt;&lt;P&gt;WS_REPID LIKE SY-REPID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out these sample program for illustration of above FM&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/alv-reporting-z-list-materials.htm" target="test_blank"&gt;http://www.sap-img.com/abap/alv-reporting-z-list-materials.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-alv-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-alv-programming.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2007 06:31:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variants/m-p/2634412#M605993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-06T06:31:01Z</dc:date>
    </item>
  </channel>
</rss>

