<?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 Disable modify display variant in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757013#M1461013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question about the display variants. I am in charge of BC administration and my collegues from other modules ( PP, FL, SD etc..) have created transactions. They have created one display variant for each transaction which they have called /default&lt;/P&gt;&lt;P&gt;Simply users, when they launch the transaction, can select this variant, change the information and when they save, they modify this variant.&lt;/P&gt;&lt;P&gt;Is there a way to disable the possibility for users to modify this variant?  I only want my collegues (key users) to be able to modify this variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Mar 2010 15:27:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-25T15:27:52Z</dc:date>
    <item>
      <title>Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757013#M1461013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question about the display variants. I am in charge of BC administration and my collegues from other modules ( PP, FL, SD etc..) have created transactions. They have created one display variant for each transaction which they have called /default&lt;/P&gt;&lt;P&gt;Simply users, when they launch the transaction, can select this variant, change the information and when they save, they modify this variant.&lt;/P&gt;&lt;P&gt;Is there a way to disable the possibility for users to modify this variant?  I only want my collegues (key users) to be able to modify this variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 15:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757013#M1461013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T15:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757014#M1461014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When saving the variant check the field &lt;EM&gt;Protect variant&lt;/EM&gt; . Now only the user who created it will be able to amend it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 15:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757014#M1461014</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-25T15:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757015#M1461015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for your answer Marcin. I will told them to try this.&lt;/P&gt;&lt;P&gt;And another "last" question. &lt;/P&gt;&lt;P&gt;I have my variant /default and now I want users to create a new one but not to modify /default. When they save, a new one is created like /default2 for example.&lt;/P&gt;&lt;P&gt;Is there a way for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 15:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757015#M1461015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T15:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757016#M1461016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should be feasible. This blog might help you to achieve this [Save a variant from a Dynpro screen|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6618%3Fpage%3Dlast%26x-order%3Ddate%26x-maxdepth%3D0] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 15:47:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757016#M1461016</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-25T15:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757017#M1461017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many Thanks for everything Marcin. I am gonna check your link.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Mar 2010 15:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757017#M1461017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-25T15:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757018#M1461018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reopen this topic because what I said is wrong &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here is what I want to do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The Key user create a display variant (/ default).&lt;/P&gt;&lt;P&gt;- A user launch the transaction, and use the variant /default because It's the only one on the system. &lt;/P&gt;&lt;P&gt;He can create a new variant but can't save on the /default variant (I think we should use the option "protect variant" like Marcin says). &lt;/P&gt;&lt;P&gt;- When the user has saved his variant, this variant wo'nt be by default for the next connection. I want the default variant always be /default and not the one the user has created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 09:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757018#M1461018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-26T09:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757019#M1461019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to start the report each time with default variant &lt;STRONG&gt;/DEFALUT&lt;/STRONG&gt; you can:&lt;/P&gt;&lt;P&gt;- create another report (which will be starting point for this one)&lt;/P&gt;&lt;P&gt;- in this new report call your original report with the variant &lt;STRONG&gt;/DEFAULT&lt;/STRONG&gt; - so the user will automatically have it set when report will show the selection screen. If the user later want to change it (on the screen) - no problem, but the defualt which the program will be running with is &lt;STRONG&gt;/DEFAULT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply use below logic&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Report z_starting_point.
 SUBMIT 'Z_ORIGINAL' USING SELECTION-SET '/DEFAULT'. "start the original report with /DEFAULT variant
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this is what you need&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 10:21:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757019#M1461019</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-26T10:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757020#M1461020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks again Marcin. What you explain to me is perfect for selection screen variant. What I need is the same thing for ALV's layout.&lt;/P&gt;&lt;P&gt;Is there any parameters to initialize when calling MF REUSE_ALV_GRID_DISPLAY?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 10:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757020#M1461020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-26T10:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Disable modify display variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757021#M1461021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For classical ALV you are using I think you should:&lt;/P&gt;&lt;P&gt;- when saving variant you have the option &lt;EM&gt;default setting&lt;/EM&gt; for setting is as a default one&lt;/P&gt;&lt;P&gt;- get this default variant at the beginnign&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: GD_REPID     LIKE SY-REPID,
           G_SAVE TYPE C VALUE 'X',
          G_VARIANT TYPE DISVARIANT,
          GX_VARIANT TYPE DISVARIANT.

INITIALIZATION.
  GX_VARIANT-REPORT = SY-REPID.
  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
      I_SAVE     = G_SAVE
    CHANGING
      CS_VARIANT = GX_VARIANT
    EXCEPTIONS
      NOT_FOUND  = 2.
  IF SY-SUBRC = 0.
    G_VARIANT = GX_VARIANT-VARIANT.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;- later you set this one&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
GD_REPID = SY-REPID.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM      = GD_REPID
      I_SAVE                  = 'X'   
      IS_VARIANT              = G_VARIANT
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You migt however encounter some problems with using &lt;EM&gt;protection&lt;/EM&gt; on the variant in this way, what I told you before applies to selection screen variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Mar 2010 10:48:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/disable-modify-display-variant/m-p/6757021#M1461021</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-03-26T10:48:38Z</dc:date>
    </item>
  </channel>
</rss>

