<?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 ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848875#M667468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;           Plz tell me what is the use of REUSE_ALV_VARIANT_DEFAULT_GET function module in ALV. And please tell me one simple example with using this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Pradip Pawar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 08:29:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-19T08:29:34Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848875#M667468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;           Plz tell me what is the use of REUSE_ALV_VARIANT_DEFAULT_GET function module in ALV. And please tell me one simple example with using this function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Pradip Pawar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 08:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848875#M667468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T08:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848876#M667469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REUSE_ALV_VARIANT_DEFAULT_GET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Purpose: Provides the default variant for the list specified in the structure&lt;/P&gt;&lt;P&gt;parameter CS_VARIANT of a program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Call: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;I_SAVE = 'A'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;CS_VARIANT = I_VARIANT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters &lt;/P&gt;&lt;P&gt;I_SAVE : &lt;/P&gt;&lt;P&gt;Description : &lt;/P&gt;&lt;P&gt;Controls the storage mode &lt;/P&gt;&lt;P&gt;Prerequisite: &lt;/P&gt;&lt;P&gt;The IS_VARIANT parameter has the appropriate value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value range &lt;/P&gt;&lt;P&gt;' ' = display variants cannot be saved &lt;/P&gt;&lt;P&gt;Defined display variants (e.g. delivered display variants) can be &lt;/P&gt;&lt;P&gt;selected for presentation independently of this flag. &lt;/P&gt;&lt;P&gt;Changes cannot be saved. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' = standard save &lt;/P&gt;&lt;P&gt;Display variants can be saved as standard display variants. &lt;/P&gt;&lt;P&gt;User-specific saving is not possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'U' = only user-specific saving &lt;/P&gt;&lt;P&gt;The user can only save display variants user-specifically &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'A' = standard and user-specific saving &lt;/P&gt;&lt;P&gt;The user can save a display variant user-specifically and &lt;/P&gt;&lt;P&gt;as standard display variant. The user chooses in the display variant &lt;/P&gt;&lt;P&gt;save popup. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CS_VARIANT:&lt;/P&gt;&lt;P&gt;Internal table containing the program name (and the default variant---optional )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;Sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS: c_yes(1) TYPE c VALUE 'X'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;DATA: e_variant  TYPE disvariant.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PARAMETERS: p_vari LIKE disvariant-variant.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.&lt;/P&gt;&lt;P&gt;  CLEAR e_variant.&lt;/P&gt;&lt;P&gt;  e_variant-report   = sy-cprog.&lt;/P&gt;&lt;P&gt;  e_variant-username = sy-uname.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_save     = c_yes&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            cs_variant = e_variant&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found  = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    p_vari = e_variant-variant.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  PERFORM f4_for_variant.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM f4_for_variant.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  DATA: l_exit(1) TYPE c.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            is_variant          = e_variant&lt;/P&gt;&lt;P&gt;            i_tabname_header    = 'T_LISTADO'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          i_tabname_item      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          IT_DEFAULT_FIELDCAT =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            i_save              = 'A'&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          = e_variant&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found           = 2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  IF sy-subrc = 2.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    IF l_exit = space.&lt;/P&gt;&lt;P&gt;      p_vari = e_variant-variant.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f4_for_variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This allows you to enter a display variant BEFORE running your ALV report. Then, your call to the ALV should look a little bit like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;      is_variant                     = e_variant&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 08:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848876#M667469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T08:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848877#M667470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When we are creting variant functinality for ALV reports and if user not selected any variant to get output this FM will call the default variant and report will be get disply with this variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check for more details BCALV_GRID_09&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful.....................&lt;/P&gt;&lt;P&gt;Minal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 08:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848877#M667470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T08:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848878#M667471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pradip,&lt;/P&gt;&lt;P&gt;That function mod provides the default variant for the list specified in the structure parameter CS_VARIANT of a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: LV_VIEWNAME LIKE DD02L-TABNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LV_INDX_KEY = 'K'.&lt;/P&gt;&lt;P&gt;  LV_INDX_KEY+1 = 'V'.&lt;/P&gt;&lt;P&gt;  IMPORT LV_TRVOG LV_ANZGR LT_SELTAB LV_TXT_PARVW LV_MATNR&lt;/P&gt;&lt;P&gt;                               FROM MEMORY ID LV_INDX_KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF ( NOT LV_TRVOG IS INITIAL ).&lt;/P&gt;&lt;P&gt;    MOVE LV_TRVOG TO TRVOG.&lt;/P&gt;&lt;P&gt;    MOVE LV_ANZGR TO ANZGR.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM T180V&lt;/P&gt;&lt;P&gt;           WHERE RNAME = SY-REPID&lt;/P&gt;&lt;P&gt;           AND   TRVOG = TRVOG&lt;/P&gt;&lt;P&gt;           AND   ANZGR = ANZGR.&lt;/P&gt;&lt;P&gt;    ASSIGN SPACE TO &amp;lt;FELD1&amp;gt;.&lt;/P&gt;&lt;P&gt;    CHAR = 'POSTAB-'.&lt;/P&gt;&lt;P&gt;    IF NOT T180V-VSORT IS INITIAL.&lt;/P&gt;&lt;P&gt;      CHAR+7(10) = T180V-VSORT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      CHAR+7(10) = 'VBELN'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ASSIGN (CHAR) TO &amp;lt;FELD1&amp;gt;.&lt;/P&gt;&lt;P&gt;    CASE T180V-SORTA.&lt;/P&gt;&lt;P&gt;      WHEN 'A'.&lt;/P&gt;&lt;P&gt;      SORT POSTAB BY &amp;lt;FELD1&amp;gt; ASCENDING VBELN DESCENDING&lt;/P&gt;&lt;P&gt;                                       POSNR ASCENDING.&lt;/P&gt;&lt;P&gt;    WHEN 'D'.&lt;/P&gt;&lt;P&gt;      SORT POSTAB BY &amp;lt;FELD1&amp;gt; DESCENDING VBELN DESCENDING&lt;/P&gt;&lt;P&gt;                                        POSNR ASCENDING.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;    CLEAR CHAR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM REUSE_ALV_VARIANT_FILL USING SY-REPID&lt;/P&gt;&lt;P&gt;                                       TRVOG&lt;/P&gt;&lt;P&gt;                                       SPACE&lt;/P&gt;&lt;P&gt;                                       SY-UNAME&lt;/P&gt;&lt;P&gt;                                       GS_SD_ALV-VARIANT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LV_VIEWNAME = VIEWNAME.&lt;/P&gt;&lt;P&gt;  PERFORM REUSE_ALV_FIELDCATALOG_MERGE USING GS_SD_ALV-FIELDCAT[]&lt;/P&gt;&lt;P&gt;                                             LV_VIEWNAME&lt;/P&gt;&lt;P&gt;                                             SPACE&lt;/P&gt;&lt;P&gt;                                             SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM REUSE_ALV_VARIANT_DEFAULT USING GS_SD_ALV.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 08:35:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848878#M667471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T08:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848879#M667472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Menal ,&lt;/P&gt;&lt;P&gt;           Plz tell me what is the exactuse REUSE_ALV_VARIANT_DEFAULT_GET &lt;/P&gt;&lt;P&gt;In ALV. I do not understand its use. Actually I did this in my report by SDN help. I unable to execute it but not understand why we do this. Just I understand is that if I press F4 button it is showing whole output from database. And I saw one sample program by using this FM. In this FM the fieldcatalog is filled before the selection of data......how is it.&lt;/P&gt;&lt;P&gt;           Willl you plz explain it in more detail........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks .&lt;/P&gt;&lt;P&gt;Pradip Pawar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        PRADIP PAWAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 10:53:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2848879#M667472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T10:53:56Z</dc:date>
    </item>
  </channel>
</rss>

