<?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: Modifying an Existing Variant Programatically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186367#M1823604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GET is found during debugging at PBO of selection screen.Since its a selection screen i can not add my code tehre.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 12:09:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-04-04T12:09:06Z</dc:date>
    <item>
      <title>Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186356#M1823593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a zreport for which one variant TEST123 is already created.&lt;/P&gt;&lt;P&gt;I will have to modify some of the field values of this variant programatically inside the report.&lt;/P&gt;&lt;P&gt;I have the code to modify the contents of this variant and the code is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this section of code for modifying the variant to get trigerred after user clicks on the variant icon of the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I put the code under &lt;STRONG&gt;At Selection screen output&lt;/STRONG&gt; Event, the code for modifying the variant triggers before the selection screen gets displayed. I dont want that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At runtime i checked that the function code when I click on the variant icon on the selection screen is &lt;STRONG&gt;GET&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since its a selection screen I can not put the code under PBO of the selection screen either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question is, in the report under which event i should put the code for modifying the variant so that it gets trigerred only when user clicks on the variant icon on selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to put a sy-ucomm check under AT USER-COMMAND event in the report but its not working at that point of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I executed the report--&amp;gt;On the Sel screen I put &lt;STRONG&gt;/h&lt;/STRONG&gt; ---&amp;gt; clicked on the variant icon---&amp;gt; It goes to PBO of selection screen and sy-ucomm is 'GET' at this point but when the flow comes to &lt;STRONG&gt;AT USER_COMMAND&lt;/STRONG&gt; of the zreport the SY-UCOM value clears out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I capture the function code value of the variant icon in the report?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:13:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186356#M1823593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-25T14:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186357#M1823594</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;You can try with the particular event when you can see GET as sy-ucomm in debugging.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186357#M1823594</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2014-03-25T14:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186358#M1823595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the first question is - what exactly and why do you want to do something like this? You want to change the existing variant once the user is trying to pick one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 14:48:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186358#M1823595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-25T14:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186359#M1823596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rakhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with AT SELECTION SCREEN event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the selection screen is displayed and any action is done then this event is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to the below link for the hierarchy of the events triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm" title="https://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm"&gt;https://help.sap.com/saphelp_nw04/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;TP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 17:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186359#M1823596</guid>
      <dc:creator>ThangaPrakash</dc:creator>
      <dc:date>2014-03-25T17:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186360#M1823597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes thats the requirement. I want to change a particular field in the variant while user picks it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 12:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186360#M1823597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-03T12:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186361#M1823598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rakhi you can use AT selection screen output event for the same. Now in order to prevent the code from being triggered during the first time you can set a flag in Load-of-Prorgram event set FLAG as 'X'.&lt;/P&gt;&lt;P&gt;Then in AT SELECTION SCREEN OUTPUT check if flag ne X then do your work else clear the flag so that now your logic shall work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 13:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186361#M1823598</guid>
      <dc:creator>nabheetscn</dc:creator>
      <dc:date>2014-04-03T13:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186362#M1823599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In AT SELECTION-SCREEN OUTPUT block, check if user has selected a new variant comparing current value of sy-slset and previous variant saved in a global variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If value was changed (user selected a new variant or saved current selection to a new variant) then change variant values programmatically (RS_VARIANT_VALUES_TECH_DATA + RS_CHANGE_CREATED_VARIANT and DB_COMMIT) then call RS_SUPPORT_SELECTIONS to use new values. Now save the current variant name to the variable used to detect any change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NB: Would be easier is to change current parameters and use RS_VARIANT_SAVE_FROM_SELSCREEN to save it (if actually required)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 13:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186362#M1823599</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-04-03T13:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186363#M1823600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well you still did not answer the WHY question. Why would you do this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 15:28:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186363#M1823600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-03T15:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186364#M1823601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since business asked it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 11:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186364#M1823601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-04T11:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186365#M1823602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much the check with sy-slset in At Selection screen output event solved my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 11:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186365#M1823602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-04T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186366#M1823603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;LOAD-OF-PROGRAM.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp; w_load &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;c_x&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;AT SELECTION-SCREEN OUTPUT. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;w_load &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IS INITIAL&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CHECK &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;sy&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;slset &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;w_variant&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;*change the variant ESSBASE_EXTCT&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;PERFORM &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;change_variant &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;USING &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;w_repid w_variant&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;CLEAR &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;w_load&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:07:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186366#M1823603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-04T12:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an Existing Variant Programatically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186367#M1823604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GET is found during debugging at PBO of selection screen.Since its a selection screen i can not add my code tehre.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 12:09:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-existing-variant-programatically/m-p/10186367#M1823604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-04T12:09:06Z</dc:date>
    </item>
  </channel>
</rss>

