<?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: Variant on Selection screen for Oops ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850956#M1134460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;you can do the following which would enable you to create the variant : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 data:   h_layout type disvariant,
            gs_layout type lvc_s_layo.

 gs_layout-sel_mode = 'A'.
 h_layout-report = syst-cprog.
    h_layout-username = sy-uname.
    h_layout-handle = handle.
 
  call method g_alv_grid3-&amp;gt;set_table_for_first_display
      exporting
        is_layout                     = gs_layout
        is_variant                    = h_layout
        i_save                        = 'U'
 changing
        it_outtab                     =  itab
        it_fieldcatalog               = fieldcat
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the ALV grid toolbar you can see the layout button. you can use that to default any particular layouts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcelo Ramos on Jan 8, 2009 10:11 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Nov 2008 05:52:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-26T05:52:46Z</dc:date>
    <item>
      <title>Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850951#M1134455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to use a variant on selection, it should have the fuctionality like Get a default variant,Provide F4 help, existence check , save the variant in OOPs ALV .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to REUSE_ALV_VARIANT_DEFAULT_GET&lt;/P&gt;&lt;P&gt;               REUSE_ALV_VARIANT_F4&lt;/P&gt;&lt;P&gt;               REUSE_ALV_VARIANT_EXISTENCE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any classes which can do the similar funtionality.&lt;/P&gt;&lt;P&gt;Help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;Ravindar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 06:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850951#M1134455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-19T06:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850952#M1134456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not think that there are special classes around for this purpose (I checked the &lt;EM&gt;Where-Used-List&lt;/EM&gt; for structure DISVARIANT).&lt;/P&gt;&lt;P&gt;However, the corresponding fm's for OO-based ALV list layouts can be found in group &lt;STRONG&gt;SLVC&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LVC_VARIANT_DEFAULT_GET
LVC_VARIANT_EXISTENCE_CHECK
LVC_VARIANT_F4
LVC_VARIANT_SELECT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 07:08:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850952#M1134456</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-11-19T07:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850953#M1134457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this :&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="733537"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has lots of info about ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2008 16:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850953#M1134457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-19T16:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850954#M1134458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're using the CL_SALV* classes, class cl_salv_layout has methods to do what you're looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 20:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850954#M1134458</guid>
      <dc:creator>bryan_cain</dc:creator>
      <dc:date>2008-11-20T20:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850955#M1134459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;you can do the following which would enable you to create the variant : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 data:   h_layout type disvariant,
            gs_layout type lvc_s_layo.

 gs_layout-sel_mode = 'A'.
 h_layout-report = syst-cprog.
    h_layout-username = sy-uname.
    h_layout-handle = handle.
 
  call method g_alv_grid3-&amp;gt;set_table_for_first_display
      exporting
        is_layout                     = gs_layout
        is_variant                    = h_layout
        i_save                        = 'U'
 changing
        it_outtab                     =  itab
        it_fieldcatalog               = fieldcat
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcelo Ramos on Jan 8, 2009 10:10 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 05:38:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850955#M1134459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T05:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850956#M1134460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;you can do the following which would enable you to create the variant : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 data:   h_layout type disvariant,
            gs_layout type lvc_s_layo.

 gs_layout-sel_mode = 'A'.
 h_layout-report = syst-cprog.
    h_layout-username = sy-uname.
    h_layout-handle = handle.
 
  call method g_alv_grid3-&amp;gt;set_table_for_first_display
      exporting
        is_layout                     = gs_layout
        is_variant                    = h_layout
        i_save                        = 'U'
 changing
        it_outtab                     =  itab
        it_fieldcatalog               = fieldcat
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the ALV grid toolbar you can see the layout button. you can use that to default any particular layouts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcelo Ramos on Jan 8, 2009 10:11 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2008 05:52:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850956#M1134460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-26T05:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850957#M1134461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the posts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 10:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850957#M1134461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T10:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850958#M1134462</link>
      <description>&lt;P&gt;This is an almost ancient thread at this point, but if Google brought anyone here like it did for me, I was able to use ABAP Objects for the F4 help. To make life easier, there is a static method of class cl_salv_layout_service called f4_layouts.&lt;/P&gt;&lt;P&gt;Usage is like below, call this for ON VALUE-REQUEST of your variant (p_layout in below case).&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gs_layout TYPE slis_vari.

PARAMETERS: p_layout TYPE disvariant-variant.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_layout.
  PERFORM f4_layouts USING p_layout.

FORM f4_layouts USING p_layout TYPE disvariant-variant.
  DATA: ls_layout TYPE salv_s_layout_info,
        ls_key    TYPE salv_s_layout_key.

  ls_key-report = sy-repid.
  ls_layout = cl_salv_layout_service=&amp;gt;f4_layouts( 
      s_key = ls_key
      restrict = if_salv_c_layout=&amp;gt;restrict_none ).
  p_layout = ls_layout-layout.
  gs_layout = ls_layout-layout.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jun 2021 14:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850958#M1134462</guid>
      <dc:creator>dustinkredmond</dc:creator>
      <dc:date>2021-06-04T14:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variant on Selection screen for Oops ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850959#M1134463</link>
      <description>&lt;P&gt;Thanks Dustin, ancient or not, this was very helpful!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-on-selection-screen-for-oops-alv/m-p/4850959#M1134463</guid>
      <dc:creator>adityaw</dc:creator>
      <dc:date>2022-01-18T16:44:28Z</dc:date>
    </item>
  </channel>
</rss>

