<?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: creating varient through ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276607#M1387524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;CLICK ON SAVE&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2009 09:16:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-28T09:16:31Z</dc:date>
    <item>
      <title>creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276605#M1387522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am giving selection screen to users &amp;amp; after giving input screen values, I want to create a varient out of that input using ABAP.&lt;/P&gt;&lt;P&gt;How to create the varient this way?&lt;/P&gt;&lt;P&gt;Krutika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 09:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276605#M1387522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T09:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276606#M1387523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What have you tried yourself so far in order to find out?&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 09:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276606#M1387523</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-10-28T09:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276607#M1387524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;CLICK ON SAVE&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 09:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276607#M1387524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T09:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276608#M1387525</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;Use this FM if you want to create variant through ABAP---&amp;gt; RS_CREATE_VARIANT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;lakshman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 09:27:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276608#M1387525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T09:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276609#M1387526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want the varient name in export  when i give selection screen input parameters as import.&lt;/P&gt;&lt;P&gt;Is there any FM for that?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krutika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 10:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276609#M1387526</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T10:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276610#M1387527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass program name to &lt;STRONG&gt;RS_ALL_VARIANTS_4_1_REPORT_WAO&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;check the export parameters for list of variants&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more function modules goto se37 - &amp;gt; search with pattern RS&lt;STRONG&gt;VARIANT&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 10:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276610#M1387527</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-10-28T10:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276611#M1387528</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;In ALV you can create variant like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA : s_variant TYPE disvariant.

PARAMETER  : s_var TYPE disvariant-variant.

INITIALIZATION.

  s_variant-report = sy-repid.

  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
      i_save        = 'A'
    CHANGING
      cs_variant    = s_variant
    EXCEPTIONS
      wrong_input   = 1
      not_found     = 2
      program_error = 3
      OTHERS        = 4.
  IF sy-subrc = 0.              " IF DEFAULT VARIANT FOUND

    s_var = s_variant-variant.  " PASS THE DEFAULT VARIANT RECEIVED TO THE SELECTION SCREEN FIELD
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_var.

  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
      is_variant                = s_variant
*   I_TABNAME_HEADER          =
*   I_TABNAME_ITEM            =
*   IT_DEFAULT_FIELDCAT       =
     i_save                    = 'A'
*   I_DISPLAY_VIA_GRID        = ' '
   IMPORTING
*   E_EXIT                    =
     es_variant                = s_variant
   EXCEPTIONS
     not_found                 = 1
     program_error             = 2
     OTHERS                    = 3.
*********TO GET THE SELECTED VARIANT FROM THE LIST IN THE SELECTION FIELD********************            .
  IF sy-subrc = 0.
    s_var = s_variant-variant.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

AT SELECTION-SCREEN.
  s_variant-variant = s_var.
  CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
    EXPORTING
      i_save        = 'A'
    CHANGING
      cs_variant    = s_variant
    EXCEPTIONS
      wrong_input   = 1
      not_found     = 2
      program_error = 3
      OTHERS        = 4.
  IF sy-subrc &amp;lt;&amp;gt; 0.

    MESSAGE w000(zgg_msg).
    CLEAR s_variant.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 11:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276611#M1387528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T11:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276612#M1387529</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;After giving values on selection screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the menu bar follow the below path ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GOTO-&amp;gt;Variants-&amp;gt; Save as variant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will ask for varinat name then save it ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 11:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276612#M1387529</guid>
      <dc:creator>kamesh_g</dc:creator>
      <dc:date>2009-10-28T11:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276613#M1387530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use search pattern: RS&lt;STRONG&gt;VARIANT&lt;/STRONG&gt; in SE37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get a relevant function module for your requirement.&lt;/P&gt;&lt;P&gt;Sometimes FMs differs from system to system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 11:46:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276613#M1387530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T11:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: creating varient through ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276614#M1387531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use function module RS_CHANGE_CREATED_VARIANT as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      curr_report                     = cs_report_name&lt;/P&gt;&lt;P&gt;      curr_variant                    = cs_variant_name&lt;/P&gt;&lt;P&gt;      vari_desc                       = wa_varid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ONLY_CONTENTS                   = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      vari_contents                   = it_valutab[]&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     VARI_TEXT                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     VARI_SEL_DESC                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     OBJECTS                         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      illegal_report_or_variant       = 1&lt;/P&gt;&lt;P&gt;      illegal_variantname             = 2&lt;/P&gt;&lt;P&gt;      not_authorized                  = 3&lt;/P&gt;&lt;P&gt;      not_executed                    = 4&lt;/P&gt;&lt;P&gt;      report_not_existent             = 5&lt;/P&gt;&lt;P&gt;      report_not_supplied             = 6&lt;/P&gt;&lt;P&gt;      variant_doesnt_exist            = 7&lt;/P&gt;&lt;P&gt;      variant_locked                  = 8&lt;/P&gt;&lt;P&gt;      selections_no_match             = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to fill the valuetab follow below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    rs_table_valutab-selname  = 'S_DATE'.                      " Name of SELECT-OPTION / PARAMETER&lt;/P&gt;&lt;P&gt;    rs_table_valutab-kind     = cs_kind_selection.           " Type of selection 'S' for selectio-option&lt;/P&gt;&lt;P&gt;    rs_table_valutab-sign     = cs_sign_i.                        " this will be the sign&lt;/P&gt;&lt;P&gt;    rs_table_valutab-option   = cs_option_eq.                 " this will be the option&lt;/P&gt;&lt;P&gt;    rs_table_valutab-low      = S_DATE-low.                  " this will be the value   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   Save details to Internal Table IT_VALUTAB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    APPEND rs_table_valutab TO it_valutab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 12:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-varient-through-abap/m-p/6276614#M1387531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T12:10:19Z</dc:date>
    </item>
  </channel>
</rss>

