<?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 Creating variant dynamically with free selections in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545386#M1562871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to create a variant dynamically from the program . i know that we can use FM RS_CREATE_VARIANT to create  a variant. but my problem is i am unable to create variant with free selections . can any one help me out how to create a variant with free selections dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;sreehari.p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Dec 2010 06:15:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-23T06:15:38Z</dc:date>
    <item>
      <title>Creating variant dynamically with free selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545386#M1562871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to create a variant dynamically from the program . i know that we can use FM RS_CREATE_VARIANT to create  a variant. but my problem is i am unable to create variant with free selections . can any one help me out how to create a variant with free selections dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;sreehari.p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 06:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545386#M1562871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-23T06:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variant dynamically with free selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545387#M1562872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;function RS_VARIANT_ATTR_SAVE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see input parameter P_VARIDYN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 10:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545387#M1562872</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2010-12-28T10:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variant dynamically with free selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545388#M1562873</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 this way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First try to create a test variant for all selections and next call fm 'RS_VARIANT_VALUES_TECH_DATA' and modify the existing variant with your selection and use in the run time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In variant you can specify dates dynamically.&lt;/P&gt;&lt;P&gt;When you save a variant, system ask you enter variant name and Meaning. On the same screen you can specify these dynamic values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the parameter/select-option where you want to specify dynamic value, press F4 on 'Selection Variable' column.&lt;/P&gt;&lt;P&gt;Choose type of variable as 'D' (Dynamic date calculation).&lt;/P&gt;&lt;P&gt;Press F4 on 'Name of Variable(Input only using F4) column and select 'Current date +/- ??? days' on next screen.&lt;/P&gt;&lt;P&gt;On input screen enter -1.&lt;/P&gt;&lt;P&gt;Repeat same for To Date' field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT ztest.

TABLES: rsvar.

DATA: t_irsparams TYPE STANDARD TABLE OF rsparams WITH HEADER LINE,
t_varid TYPE varid.

rsvar-report = 'RKAEP000'.
rsvar-variant = 'ZTEST'.

CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
EXPORTING
report = rsvar-report
variant = rsvar-variant
IMPORTING
techn_data = t_varid
TABLES
variant_values = t_irsparams
EXCEPTIONS
variant_non_existent = 1
variant_obsolete = 2
OTHERS = 3.

*** perform any changes, add new records etc ...

CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
curr_report = rsvar-report
curr_variant = rsvar-variant
vari_desc = t_varid
TABLES
vari_contents = t_irsparams
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_doesnt_exist = 7
variant_locked = 8
selections_no_match = 9
OTHERS = 10.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 11:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545388#M1562873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-28T11:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variant dynamically with free selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545389#M1562874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sreehari, have you managed to solve this problem? Or anybody else?&lt;/P&gt;&lt;P&gt;With RS_CREATE_VARIANT, you can create variants for fields on the selection screen, but you can't use dynamic selections with it. I have tried so hard but couldn't find a way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 16:02:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545389#M1562874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-06T16:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variant dynamically with free selections</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545390#M1562875</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;FM to create new dynamic variant?&amp;nbsp; &lt;/P&gt;&lt;P&gt;i tried RS_CREATE_VARIANT for creating varint..for new variant creation its working but i need to assign the attributes from TVARV table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:13:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-variant-dynamically-with-free-selections/m-p/7545390#M1562875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T08:13:46Z</dc:date>
    </item>
  </channel>
</rss>

