<?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 alv in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622903#M602465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi naresh,&lt;/P&gt;&lt;P&gt; then what is the use of alv variant?&lt;/P&gt;&lt;P&gt;we can direcly create the variant with calling funciton module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2007 12:06:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-08T12:06:00Z</dc:date>
    <item>
      <title>variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622897#M602459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have this program, i dont know how to do with variant, when i click in parameter variant i am not get anything , then what is the use of this variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ztest_0002&lt;/P&gt;&lt;P&gt;no standard page heading&lt;/P&gt;&lt;P&gt;message-id zmm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Tables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global ALV Data Declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fieldcat type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;data: variant type disvariant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-002 .&lt;/P&gt;&lt;P&gt;select-options: s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;parameters: p_var(30) type c.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variant-report = sy-repid.&lt;/P&gt;&lt;P&gt;variant-username = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_var.&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 = variant&lt;/P&gt;&lt;P&gt;i_save = 'U'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;es_variant = variant&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;not_found = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;others = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_var = variant-variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_data.&lt;/P&gt;&lt;P&gt;perform call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form GET_DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;form get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select mara&lt;SUB&gt;matnr makt&lt;/SUB&gt;maktx&lt;/P&gt;&lt;P&gt;into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;inner join makt&lt;/P&gt;&lt;P&gt;on mara&lt;SUB&gt;matnr = makt&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where mara~matnr in s_matnr&lt;/P&gt;&lt;P&gt;and makt~spras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL_ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;form call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP List Viewer (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_fieldcat = fieldcat&lt;/P&gt;&lt;P&gt;is_variant = variant&lt;/P&gt;&lt;P&gt;i_save = 'U'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BUILD_FIELD_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fc_tmp type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;data: label(30) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: fieldcat. refresh: fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform update_catalog using 'Material Number'&lt;/P&gt;&lt;P&gt;'ITAB'&lt;/P&gt;&lt;P&gt;'MATNR'&lt;/P&gt;&lt;P&gt;'18'&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform update_catalog using 'Material Description'&lt;/P&gt;&lt;P&gt;'ITAB'&lt;/P&gt;&lt;P&gt;'MAKTX'&lt;/P&gt;&lt;P&gt;'40'&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UPDATE_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form update_catalog using col_head&lt;/P&gt;&lt;P&gt;table&lt;/P&gt;&lt;P&gt;field&lt;/P&gt;&lt;P&gt;outputlen&lt;/P&gt;&lt;P&gt;do_sum&lt;/P&gt;&lt;P&gt;no_out&lt;/P&gt;&lt;P&gt;just.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: tmp_fc type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp_fc-reptext_ddic = col_head.&lt;/P&gt;&lt;P&gt;tmp_fc-fieldname = field.&lt;/P&gt;&lt;P&gt;tmp_fc-tabname = table.&lt;/P&gt;&lt;P&gt;tmp_fc-outputlen = outputlen.&lt;/P&gt;&lt;P&gt;tmp_fc-just = just.&lt;/P&gt;&lt;P&gt;tmp_fc-decimals_out = 0.&lt;/P&gt;&lt;P&gt;tmp_fc-do_sum = do_sum.&lt;/P&gt;&lt;P&gt;tmp_fc-no_out = no_out.&lt;/P&gt;&lt;P&gt;append tmp_fc to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:34:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622897#M602459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T11:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622898#M602460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i do it in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARIAN.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  DATA:       I_VARIANT  LIKE DISVARIANT.&lt;/P&gt;&lt;P&gt;  DATA:       E_VARIANT  LIKE DISVARIANT.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  I_VARIANT-REPORT = SY-REPID.&amp;lt;/b&amp;gt;&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    = I_VARIANT&lt;/P&gt;&lt;P&gt;      I_SAVE        = 'A'&lt;/P&gt;&lt;P&gt;    IMPORTING&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     = 1&lt;/P&gt;&lt;P&gt;      PROGRAM_ERROR = 2&lt;/P&gt;&lt;P&gt;      OTHERS        = 3.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE I010 WITH 'Es sind keine Varianten angelegt'.&lt;/P&gt;&lt;P&gt;    CLEAR: P_VARIAN.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    P_VARIAN = E_VARIANT-VARIANT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622898#M602460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T11:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622899#M602461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you create YOURSELF some variants, as the parameter &amp;lt;b&amp;gt;i_save&amp;lt;/b&amp;gt;  used in REUSE_ALV_GRID_DISPLAY and REUSE_ALV_VARIANT_F4 is set to '&amp;lt;b&amp;gt;U&amp;lt;/b&amp;gt;' as User, you can only see your own display variants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:48:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622899#M602461</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-08-08T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622900#M602462</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;The ALV Grid Control is a tool with which you can output non-hierarchical lists in a&lt;/P&gt;&lt;P&gt;standardized format. The list data is displayed as a table on the screen.&lt;/P&gt;&lt;P&gt;The ALV Grid Control offers a range of interactive standard list functions that users need&lt;/P&gt;&lt;P&gt;frequently (find, sort, filter, calculate totals and subtotals, print, print preview, send list,&lt;/P&gt;&lt;P&gt;export list (in different formats), and so on. These functions are implemented in the&lt;/P&gt;&lt;P&gt;proxy object class. You as the programmer have the possibility to turn off functions not&lt;/P&gt;&lt;P&gt;needed. In most cases the implementations of the standard functions provided by the&lt;/P&gt;&lt;P&gt;control are sufficient. However, if required, you can adjust these implementations to&lt;/P&gt;&lt;P&gt;meet application-specific needs.&lt;/P&gt;&lt;P&gt;You can add self-defined functions to the toolbar, if necessary.&lt;/P&gt;&lt;P&gt;The ALV Grid Control allows users to adjust the layout of lists to meet their individual&lt;/P&gt;&lt;P&gt;requirements (for example, they can swap columns, hide columns, set filters for the&lt;/P&gt;&lt;P&gt;data to be displayed, calculate totals, and so on). The settings (list customizing) made&lt;/P&gt;&lt;P&gt;by a specific user are called a display variant. Display variants can be saved on a userspecific&lt;/P&gt;&lt;P&gt;or on a global basis. If such display variants exist for a list, they can be offered&lt;/P&gt;&lt;P&gt;to the user for selection. If a display variant is set as the default variant, the associated&lt;/P&gt;&lt;P&gt;list is always displayed based on the settings of this variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. REUSE_ALV_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;REUSE_ALV_GRID_DISPLAY&lt;/P&gt;&lt;P&gt;REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;REUSE_ALV_COMMENTARY_WRITE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Use of Field Catalog is to determines the technical properties &amp;amp; add formating information of the column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. all the definition of internal table, structure, constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7.fieldcat-fieldname&lt;/P&gt;&lt;P&gt;fieldcat-ref_fieldname&lt;/P&gt;&lt;P&gt;fieldcat-tabname&lt;/P&gt;&lt;P&gt;fieldcat-seltext_m&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Form user_command using r_ucomm like sy-ucomm rs_selfield type slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report output can contain up to 90 columns in the display with the wide array of display options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The commonly used ALV functions used for this purpose are; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. REUSE_ALV_VARIANT_DEFAULT_GET &lt;/P&gt;&lt;P&gt;2. REUSE_ALV_VARIANT_F4 &lt;/P&gt;&lt;P&gt;3. REUSE_ALV_VARIANT_EXISTENCE &lt;/P&gt;&lt;P&gt;4. REUSE_ALV_EVENTS_GET &lt;/P&gt;&lt;P&gt;5. REUSE_ALV_COMMENTARY_WRITE &lt;/P&gt;&lt;P&gt;6. REUSE_ALV_FIELDCATALOG_MERGE &lt;/P&gt;&lt;P&gt;7. REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;8. REUSE_ALV_GRID_DISPLAY &lt;/P&gt;&lt;P&gt;9. REUSE_ALV_POPUP_TO_SELECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Purpose of the above Functions are differ not all the functions are required in all the ALV Report. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But either no.7 or No.8 is there in the Program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How you call this function in your report? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After completion of all the data fetching from the database and append this data into an Internal Table. say I_ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use follwing function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' &lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;I_CALLBACK_PROGRAM = 'Prog.name' &lt;/P&gt;&lt;P&gt;I_STRUCTURE_NAME = 'I_ITAB' &lt;/P&gt;&lt;P&gt;I_DEFAULT = 'X' &lt;/P&gt;&lt;P&gt;I_SAVE = 'A' &lt;/P&gt;&lt;P&gt;TABLES &lt;/P&gt;&lt;P&gt;T_OUTTAB = I_ITAB. &lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;WRITE: 'SY-SUBRC: ', SY-SUBRC . &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;ENDFORM. " GET_FINAL_DATA&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The object F_IT_ALV has a field, the activity ACTVT, which can &lt;/P&gt;&lt;P&gt;contain four permitted values: 01, 02, 03 and 70. Each of the &lt;/P&gt;&lt;P&gt;activities 01, 02 and 70 controls the availability of particular &lt;/P&gt;&lt;P&gt;functions (in the menu and the toolbar) of the ALV line item list: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) 01: "Settings -&amp;gt; Display variant -&amp;gt; Save..." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) 02: "Settings -&amp;gt; Display variant -&amp;gt; Current..." and &lt;/P&gt;&lt;P&gt;"Settings -&amp;gt; Display variant -&amp;gt; Current header rows " &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) 70: "Settings -&amp;gt; Display variant -&amp;gt; Administration..." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activity 03 corresponds to the minimum authorization, which is the &lt;/P&gt;&lt;P&gt;most restricted one: The user can only select layouts which have &lt;/P&gt;&lt;P&gt;been configured already. In particular, all of the other functions &lt;/P&gt;&lt;P&gt;named above are inactive with activity 03. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you want to permit a user to change the column selection and &lt;/P&gt;&lt;P&gt;the headers as well as to save the layout thus created, for example, &lt;/P&gt;&lt;P&gt;but if you do not want to permit the user to administrate the &lt;/P&gt;&lt;P&gt;layouts, you grant him or her the authorization for activities 01 &lt;/P&gt;&lt;P&gt;and 02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link it will be mosty usefull for u &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu017.htm" target="test_blank"&gt;http://www.sap-img.com/fu017.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: VARIANT TYPE  DISVARIANT.
 
  VARIANT-REPORT = SY-REPID.
  VARIANT-USERNAME = SY-UNAME.
 
  CALL METHOD ALV_GRID-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
           IS_VARIANT             = VARIANT
           I_SAVE                 = 'A'
      CHANGING
           IT_OUTTAB       = IALV[]
           IT_FIELDCATALOG = FIELDCAT[].
 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:49:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622900#M602462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T11:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622901#M602463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PLEASE HOW TO CREATE THAT VARIANT?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 11:56:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622901#M602463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T11:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622902#M602464</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;variant means its a constant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after clicking the execute button , enter some values in the selection screen and click on save button it will ask for variant name so enter any name and save &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;come back from next time on words when u execute the program that variant will exist there by clicking that variant name , what ever the values in that that will display &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can maintain any number of variants &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;beside execute button on the selection screen the variant option will exist &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewrad if usefull&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622902#M602464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622903#M602465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi naresh,&lt;/P&gt;&lt;P&gt; then what is the use of alv variant?&lt;/P&gt;&lt;P&gt;we can direcly create the variant with calling funciton module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622903#M602465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622904#M602466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls check this code, here variant is not working ,pls tell me how to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Tables.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global ALV Data Declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;matnr type mara-matnr,&lt;/P&gt;&lt;P&gt;maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fieldcat type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;data: variant type disvariant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-002 .&lt;/P&gt;&lt;P&gt;select-options: s_matnr for mara-matnr.&lt;/P&gt;&lt;P&gt;parameters: p_var(30) type c.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variant-report = sy-repid.&lt;/P&gt;&lt;P&gt;variant-username = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_var.&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 = variant&lt;/P&gt;&lt;P&gt;i_save = 'A'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;es_variant = variant&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;not_found = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;others = 3.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE i000(AT) with 'error'..&lt;/P&gt;&lt;P&gt;CLEAR: P_VAR.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_var = variant-variant..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*p_var = variant-variant.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_data.&lt;/P&gt;&lt;P&gt;perform call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form GET_DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;form get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select mara&lt;SUB&gt;matnr makt&lt;/SUB&gt;maktx&lt;/P&gt;&lt;P&gt;into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;inner join makt&lt;/P&gt;&lt;P&gt;on mara&lt;SUB&gt;matnr = makt&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where mara~matnr in s_matnr&lt;/P&gt;&lt;P&gt;and makt~spras = sy-langu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL_ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;form call_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call ABAP List Viewer (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;it_fieldcat = fieldcat&lt;/P&gt;&lt;P&gt;is_variant = variant&lt;/P&gt;&lt;P&gt;i_save = 'U'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BUILD_FIELD_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_field_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fc_tmp type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;data: label(30) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: fieldcat. refresh: fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform update_catalog using 'Material Number'&lt;/P&gt;&lt;P&gt;'ITAB'&lt;/P&gt;&lt;P&gt;'MATNR'&lt;/P&gt;&lt;P&gt;'18'&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform update_catalog using 'Material Description'&lt;/P&gt;&lt;P&gt;'ITAB'&lt;/P&gt;&lt;P&gt;'MAKTX'&lt;/P&gt;&lt;P&gt;'40'&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;space&lt;/P&gt;&lt;P&gt;'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UPDATE_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form update_catalog using col_head&lt;/P&gt;&lt;P&gt;table&lt;/P&gt;&lt;P&gt;field&lt;/P&gt;&lt;P&gt;outputlen&lt;/P&gt;&lt;P&gt;do_sum&lt;/P&gt;&lt;P&gt;no_out&lt;/P&gt;&lt;P&gt;just.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: tmp_fc type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp_fc-reptext_ddic = col_head.&lt;/P&gt;&lt;P&gt;tmp_fc-fieldname = field.&lt;/P&gt;&lt;P&gt;tmp_fc-tabname = table.&lt;/P&gt;&lt;P&gt;tmp_fc-outputlen = outputlen.&lt;/P&gt;&lt;P&gt;tmp_fc-just = just.&lt;/P&gt;&lt;P&gt;tmp_fc-decimals_out = 0.&lt;/P&gt;&lt;P&gt;tmp_fc-do_sum = do_sum.&lt;/P&gt;&lt;P&gt;tmp_fc-no_out = no_out.&lt;/P&gt;&lt;P&gt;append tmp_fc to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622904#M602466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622905#M602467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamshad &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz Read out my answer where u can get all details of variant using in report and variant used manually &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:26:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622905#M602467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T12:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: variant alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622906#M602468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Execute the program and then go to Menu Settings / Layout / change or click on change or Save layout Icons &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; There a popup appears where you can manage your display variants (fields, sort, etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your program (with "U") you will notice that the User-specific box is checked and the system don't propose a "/"  to begin the variant name as it does with public variants. (replace "U" with "A" to see the difference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 12:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variant-alv/m-p/2622906#M602468</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-08-08T12:32:25Z</dc:date>
    </item>
  </channel>
</rss>

