<?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: ALV  variant in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410058#M197579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;not able to get your points to solve the problem.&lt;/P&gt;&lt;P&gt;Could you pls. send code if you have,&lt;/P&gt;&lt;P&gt;like I am using FM's &lt;/P&gt;&lt;P&gt;1)  'REUSE_ALV_VARIANT_DEFAULT_GET'&lt;/P&gt;&lt;P&gt;  MOVE sy-repid TO  l_pgm.             "report name (id)&lt;/P&gt;&lt;P&gt;  MOVE 'A' TO l_variant_save.   "'A' = standard and user-specific saving&lt;/P&gt;&lt;P&gt;  CLEAR l_varianttab.&lt;/P&gt;&lt;P&gt;  MOVE l_pgm TO l_varianttab-report.&lt;/P&gt;&lt;P&gt;  l_varianttab-handle = 'ZF1K'.&lt;/P&gt;&lt;P&gt;  l_varianttab-log_group = 6.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_VARIANT_DEFAULT_GET'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_save        = l_variant_save&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            cs_variant    = l_varianttab&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            wrong_input   = 1&lt;/P&gt;&lt;P&gt;            not_found     = 2&lt;/P&gt;&lt;P&gt;            program_error = 3&lt;/P&gt;&lt;P&gt;            OTHERS        = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)  MOVE 'A' TO l_variant_save.          "A = save&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display variant selection popup&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_VARIANT_F4'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_variant = l_varianttab&lt;/P&gt;&lt;P&gt;            i_save     = l_variant_save&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            e_exit     = l_exit&lt;/P&gt;&lt;P&gt;            es_variant = l_variantback&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found  = 2.&lt;/P&gt;&lt;P&gt;      p_vari = l_variantback-variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_HIERSEQ_LIST_DISPLAY'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program       = l_pgm&lt;/P&gt;&lt;P&gt;            i_callback_pf_status_set = 'PF_STATUS'&lt;/P&gt;&lt;P&gt;            i_callback_user_command  = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;            is_layout                = layout&lt;/P&gt;&lt;P&gt;            it_fieldcat              = fieldcat[]&lt;/P&gt;&lt;P&gt;            it_sort                  = sortcat[]&lt;/P&gt;&lt;P&gt;            i_default                = 'X'&lt;/P&gt;&lt;P&gt;            i_save                   = gv_save&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;            is_variant               = l_variantback&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;            it_events                = eventcat[]&lt;/P&gt;&lt;P&gt;            i_tabname_header         = 'ALV_HDRTAB'&lt;/P&gt;&lt;P&gt;            i_tabname_item           = 'ALV_ITMTAB'&lt;/P&gt;&lt;P&gt;            is_keyinfo               = is_key&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab_header          = alv_hdrtab&lt;/P&gt;&lt;P&gt;            t_outtab_item            = alv_itmtab&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error            = 1&lt;/P&gt;&lt;P&gt;            OTHERS                   = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using above FM's how to resolve the problem of saving ALV variants using handle and log_group properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you understood the problem. Pls. write to me incase if you need anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sreedevi P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2006 04:51:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-20T04:51:55Z</dc:date>
    <item>
      <title>ALV  variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410055#M197576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;generally we will pass program name to alvvariant-report while getting F4 functionality and saving.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to use variant-handle and variant-log_group incase if we have 2 variants on selection screen and 2 layouts we are handling in the same program using application toolbar button to toggle from one layout to another layout?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreedevi P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 09:52:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410055#M197576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T09:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: ALV  variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410056#M197577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;refer..&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 09:55:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410056#M197577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T09:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: ALV  variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410057#M197578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you can do is to pass a unique string (Say the Grid name) to the handle parameter. So, that way you can manage the variants for each of these grids indepentely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means wherever you are trying to fetch the layout of a specific grid you need to pass the grid name also to the handle. You need to pass these valies to the I_VARIANT so that while saving the layout the standard code also considers the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is for the same grid you can leave it blank and save multiple layouts with different names. Once that is done, you can dynamically set the layout using the SET_FRONTEND_LAYOUT method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers and close the thread if the issue is resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravikumar Allampallam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2006 09:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410057#M197578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-19T09:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: ALV  variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410058#M197579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;not able to get your points to solve the problem.&lt;/P&gt;&lt;P&gt;Could you pls. send code if you have,&lt;/P&gt;&lt;P&gt;like I am using FM's &lt;/P&gt;&lt;P&gt;1)  'REUSE_ALV_VARIANT_DEFAULT_GET'&lt;/P&gt;&lt;P&gt;  MOVE sy-repid TO  l_pgm.             "report name (id)&lt;/P&gt;&lt;P&gt;  MOVE 'A' TO l_variant_save.   "'A' = standard and user-specific saving&lt;/P&gt;&lt;P&gt;  CLEAR l_varianttab.&lt;/P&gt;&lt;P&gt;  MOVE l_pgm TO l_varianttab-report.&lt;/P&gt;&lt;P&gt;  l_varianttab-handle = 'ZF1K'.&lt;/P&gt;&lt;P&gt;  l_varianttab-log_group = 6.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_VARIANT_DEFAULT_GET'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_save        = l_variant_save&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            cs_variant    = l_varianttab&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            wrong_input   = 1&lt;/P&gt;&lt;P&gt;            not_found     = 2&lt;/P&gt;&lt;P&gt;            program_error = 3&lt;/P&gt;&lt;P&gt;            OTHERS        = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)  MOVE 'A' TO l_variant_save.          "A = save&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display variant selection popup&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_VARIANT_F4'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_variant = l_varianttab&lt;/P&gt;&lt;P&gt;            i_save     = l_variant_save&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            e_exit     = l_exit&lt;/P&gt;&lt;P&gt;            es_variant = l_variantback&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found  = 2.&lt;/P&gt;&lt;P&gt;      p_vari = l_variantback-variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)  CALL FUNCTION &amp;lt;b&amp;gt;'REUSE_ALV_HIERSEQ_LIST_DISPLAY'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_callback_program       = l_pgm&lt;/P&gt;&lt;P&gt;            i_callback_pf_status_set = 'PF_STATUS'&lt;/P&gt;&lt;P&gt;            i_callback_user_command  = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;            is_layout                = layout&lt;/P&gt;&lt;P&gt;            it_fieldcat              = fieldcat[]&lt;/P&gt;&lt;P&gt;            it_sort                  = sortcat[]&lt;/P&gt;&lt;P&gt;            i_default                = 'X'&lt;/P&gt;&lt;P&gt;            i_save                   = gv_save&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;            is_variant               = l_variantback&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;            it_events                = eventcat[]&lt;/P&gt;&lt;P&gt;            i_tabname_header         = 'ALV_HDRTAB'&lt;/P&gt;&lt;P&gt;            i_tabname_item           = 'ALV_ITMTAB'&lt;/P&gt;&lt;P&gt;            is_keyinfo               = is_key&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab_header          = alv_hdrtab&lt;/P&gt;&lt;P&gt;            t_outtab_item            = alv_itmtab&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            program_error            = 1&lt;/P&gt;&lt;P&gt;            OTHERS                   = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using above FM's how to resolve the problem of saving ALV variants using handle and log_group properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you understood the problem. Pls. write to me incase if you need anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sreedevi P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 04:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410058#M197579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T04:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: ALV  variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410059#M197580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sreedevi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what you need to do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : WA_VARIANT LIKE DISVARIANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_VARIANT-REPORT = SY-REPID&lt;/P&gt;&lt;P&gt;WA_VARIANT-HANDLE = 'GRID1'&lt;/P&gt;&lt;P&gt;WA_VARIANT-USERNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now pass the WA_VARIANT for the REUSE_ALV_HIERSEQ_LIST_DISPLAY function and when the layout is saved the handle also gets saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, now when you use REUSE_ALV_VARIANT_DEFAULT_GET / REUSE_ALV_VARIANT_F4, you need to pass the handle name also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers and close the thread if the issue is resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 05:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-variant/m-p/1410059#M197580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-20T05:04:14Z</dc:date>
    </item>
  </channel>
</rss>

