<?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/2524719#M571802</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;alv reports using variants can any give me r explane me with program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jul 2007 10:57:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-07T10:57:23Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524719#M571802</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;alv reports using variants can any give me r explane me with program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 10:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524719#M571802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T10:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524720#M571803</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;1)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;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
EXPORTING 
I_CALLBACK_PROGRAM = 'Prog.name' 
I_STRUCTURE_NAME = 'I_ITAB' 
I_DEFAULT = 'X' 
I_SAVE = 'A' 
TABLES 
T_OUTTAB = I_ITAB. 
IF SY-SUBRC &amp;lt;&amp;gt; 0. 
WRITE: 'SY-SUBRC: ', SY-SUBRC . 
ENDIF. 
ENDFORM. " GET_FINAL_DATA&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;To Create a default variant&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Create a new input parameter p_disvar like disvariant-variant. &lt;/P&gt;&lt;P&gt;In selection screen output set the default variant using &lt;/P&gt;&lt;P&gt;REUSE_ALV_VARIANT_DEFAULT_GET &lt;/P&gt;&lt;P&gt;Provide value request help using REUSE_ALV_VARIANT_F4 &lt;/P&gt;&lt;P&gt;Set the display variant before calling ALV display using &lt;/P&gt;&lt;P&gt;REUSE_ALV_VARIANT_SELECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the user can select the ALV variant on the selection screen. They can &lt;/P&gt;&lt;P&gt;create new variants and save it. Next time they use the report, the can &lt;/P&gt;&lt;P&gt;select the variant before executing the report, or in the report variant for &lt;/P&gt;&lt;P&gt;background execution&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;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&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>Sat, 07 Jul 2007 11:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524720#M571803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T11:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524721#M571804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer to this related thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1779621"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 11:02:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2524721#M571804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T11:02:52Z</dc:date>
    </item>
  </channel>
</rss>

