<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770986#M645644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;ABAP List Viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). &lt;/P&gt;&lt;P&gt;This helps us to implement all the features mentioned very effectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using ALV, We can have three types of reports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Simple Report&lt;/P&gt;&lt;P&gt;2. Block Report&lt;/P&gt;&lt;P&gt;3. Hierarchical Sequential Report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some function modules which will enable to produce the above reports without much effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SIMPLE REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important function modules are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Reuse_alv_list_display&lt;/P&gt;&lt;P&gt;b. Reuse_alv_fieldcatalog_merge&lt;/P&gt;&lt;P&gt;c. Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;d. Reuse_alv_commentary_write&lt;/P&gt;&lt;P&gt;e. Reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important parameters are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. I_callback_program : report id&lt;/P&gt;&lt;P&gt;ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status&lt;/P&gt;&lt;P&gt;iii. I_callback_user_command : routine where the function codes are handled&lt;/P&gt;&lt;P&gt;iv. I_structure name : name of the dictionary table &lt;/P&gt;&lt;P&gt;v. Is_layout : structure to set the layout of the report&lt;/P&gt;&lt;P&gt;vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with the data to be output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to &lt;/P&gt;&lt;P&gt;populate a fieldcatalog which is essential to display the data in ALV.&lt;/P&gt;&lt;P&gt; If the output data is from a single dictionary table and all the &lt;/P&gt;&lt;P&gt;columns are selected, then we need not exclusively create the field cat&lt;/P&gt;&lt;P&gt;alog. Its enough to mention the table name as a parameter&lt;/P&gt;&lt;P&gt;(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases &lt;/P&gt;&lt;P&gt;we need to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Important Parameters are :&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;i. I_program_name : report id&lt;/P&gt;&lt;P&gt;ii. I_internal_tabname : the internal output table&lt;/P&gt;&lt;P&gt;iii. I_inclname : include or the report name where all the dynamic forms are handled.&lt;/P&gt;&lt;P&gt;II Changing&lt;/P&gt;&lt;P&gt;ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is &lt;/P&gt;&lt;P&gt;declared in the type pool SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;I. Import :&lt;/P&gt;&lt;P&gt;Et_Events : The event table is returned with all possible CALLBACK events &lt;/P&gt;&lt;P&gt;for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV. &lt;/P&gt;&lt;P&gt;II. Export :&lt;/P&gt;&lt;P&gt;I_List_type : &lt;/P&gt;&lt;P&gt;0 = simple list REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND &lt;/P&gt;&lt;P&gt;3 = hierarchical-sequential block list &lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. it_list_commentary : internal table with the headings of the type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table has three fields :&lt;/P&gt;&lt;P&gt;Typ : &amp;#145;H&amp;#146; &amp;#150; header, &amp;#145;S&amp;#146; &amp;#150; selection , &amp;#145;A&amp;#146; - action&lt;/P&gt;&lt;P&gt;Key : only when typ is &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;Info : the text to be printed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : same as reuse_alv_list_display&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 is an example for simple list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. BLOCK REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to have multiple lists continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important functions used in this report are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY&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;A. REUSE_ALV_BLOCK_LIST_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;II. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;III. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used to set the default gui status etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export : &lt;/P&gt;&lt;P&gt;I. is_layout : layout settings for block &lt;/P&gt;&lt;P&gt;II. it_fieldcat : field catalog &lt;/P&gt;&lt;P&gt;III. i_tabname : internal table name with output data &lt;/P&gt;&lt;P&gt;IV. it_events : internal table with all possible events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with output data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module adds the data to the block. &lt;/P&gt;&lt;P&gt;Repeat this function for all the different blocks to be displayed one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used for hierarchical sequential blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : All the parameters are optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module display the list with data appended by the above function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Hierarchical reports : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchical sequential list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. Export: &lt;/P&gt;&lt;P&gt;i. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;ii. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;iii. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;iv. IS_LAYOUT &lt;/P&gt;&lt;P&gt;v. IT_FIELDCAT &lt;/P&gt;&lt;P&gt;vi. IT_EVENTS &lt;/P&gt;&lt;P&gt;vii. i_tabname_header : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the highest hierarchy level.&lt;/P&gt;&lt;P&gt;viii. i_tabname_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level.&lt;/P&gt;&lt;P&gt;ix. is_keyinfo : This structure contains the header and item table field &lt;/P&gt;&lt;P&gt;names which link the two tables (shared key). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables&lt;/P&gt;&lt;P&gt;i. t_outtab_header : Header table with data to be output&lt;/P&gt;&lt;P&gt;ii. t_outtab_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level. &lt;/P&gt;&lt;P&gt;slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using &amp;#145;REUSE_ALV_FIELDCATALOG_MERGE&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Attributes :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. col_pos : position of the column&lt;/P&gt;&lt;P&gt;B. fieldname : internal fieldname&lt;/P&gt;&lt;P&gt;C. tabname : internal table name&lt;/P&gt;&lt;P&gt;D. ref_fieldname : fieldname (dictionary)&lt;/P&gt;&lt;P&gt;E. ref_tabname : table (dictionary)&lt;/P&gt;&lt;P&gt;F. key(1) : column with key-color&lt;/P&gt;&lt;P&gt;G. icon(1) : icon&lt;/P&gt;&lt;P&gt;H. symbol(1) : symbol&lt;/P&gt;&lt;P&gt;I. checkbox(1) : checkbox&lt;/P&gt;&lt;P&gt;J. just(1) : (R)ight (L)eft (C)ent.&lt;/P&gt;&lt;P&gt;K. do_sum(1) : sum up&lt;/P&gt;&lt;P&gt;L. no_out(1) : (O)blig.(X)no out&lt;/P&gt;&lt;P&gt;M. outputlen : output length&lt;/P&gt;&lt;P&gt;N. seltext_l : long key word&lt;/P&gt;&lt;P&gt;O. seltext_m : middle key word&lt;/P&gt;&lt;P&gt;P. seltext_s : short key word&lt;/P&gt;&lt;P&gt;Q. reptext_ddic : heading (ddic)&lt;/P&gt;&lt;P&gt;R. ddictxt(1) : (S)hort (M)iddle (L)ong&lt;/P&gt;&lt;P&gt;S. datatype : datatype&lt;/P&gt;&lt;P&gt;T. hotspot(1) : hotspot &lt;/P&gt;&lt;P&gt;**********************************************************************************************&lt;/P&gt;&lt;P&gt;some theory regarding alv:&lt;/P&gt;&lt;P&gt;This table tells ALV which events are processed by the caller by CALLBACK.&lt;/P&gt;&lt;P&gt;The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.&lt;/P&gt;&lt;P&gt;You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.&lt;/P&gt;&lt;P&gt;The table structure contains the fields:&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-NAME&lt;/P&gt;&lt;P&gt;Name of the Callback event. &lt;/P&gt;&lt;P&gt;Possible Callback events:&lt;/P&gt;&lt;P&gt;&amp;#149; Action&lt;/P&gt;&lt;P&gt;USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD&lt;/P&gt;&lt;P&gt;Process actions on the list&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND. &lt;/P&gt;&lt;P&gt;PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB&lt;/P&gt;&lt;P&gt;If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).&lt;/P&gt;&lt;P&gt;The STANDARD status of the function group SALV should be used as a template for a user-specific status.&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET. &lt;/P&gt;&lt;P&gt;ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C&lt;/P&gt;&lt;P&gt;Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.&lt;/P&gt;&lt;P&gt;Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.&lt;/P&gt;&lt;P&gt;RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.&lt;/P&gt;&lt;P&gt;RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.&lt;/P&gt;&lt;P&gt;CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.&lt;/P&gt;&lt;P&gt;&amp;#149; List processing events&lt;/P&gt;&lt;P&gt;IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.&lt;/P&gt;&lt;P&gt;TOP_OF_LIST no USING parameter. Information output at the start of the list&lt;/P&gt;&lt;P&gt;END_OF_LIST no USING parameter. Information output at the end of the list&lt;/P&gt;&lt;P&gt;TOP_OF_PAGE no USING parameter &lt;/P&gt;&lt;P&gt;Equivalent to the list processing TOP-OF-PAGE event&lt;/P&gt;&lt;P&gt;END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Information output at the end of a page. This is only called for printing.&lt;/P&gt;&lt;P&gt;TOP_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_COVERPAGE&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_SELINFOS&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_LISTINFOS&lt;/P&gt;&lt;P&gt;IS_LAYOUT-GET_SELINFOS&lt;/P&gt;&lt;P&gt;The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event. &lt;/P&gt;&lt;P&gt;END_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.&lt;/P&gt;&lt;P&gt;FOREIGN_TOP_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;FOREIGN_END_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information before each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information after each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;&amp;#149; Internal use only&lt;/P&gt;&lt;P&gt;LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME&lt;/P&gt;&lt;P&gt;R_INDEX LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_ITEM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_SUM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-FORM&lt;/P&gt;&lt;P&gt;Name of the form routine which should be called in the calling program at the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field_catalog:&lt;/P&gt;&lt;P&gt;Field catalog with field descriptions&lt;/P&gt;&lt;P&gt;2.7.1. Description&lt;/P&gt;&lt;P&gt;Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.&lt;/P&gt;&lt;P&gt;The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module&lt;/P&gt;&lt;P&gt;See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.&lt;/P&gt;&lt;P&gt;A field catalog need not be built-up and passed explicitly only under the following conditions:&lt;/P&gt;&lt;P&gt;&amp;#149; The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.&lt;/P&gt;&lt;P&gt;&amp;#149; all fields in this structure are to be output&lt;/P&gt;&lt;P&gt;&amp;#149; the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Positioning&lt;/P&gt;&lt;P&gt;&amp;#149; row_pos (row position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 3&lt;/P&gt;&lt;P&gt;Only relevant if the list output is to be multi-line (two or three lines) by default.&lt;/P&gt;&lt;P&gt;A multi-line list can also be defined by the user interactively if the default list is one-line.&lt;/P&gt;&lt;P&gt;The parameter specifies the relative output line of the column in a multi-line list.&lt;/P&gt;&lt;P&gt;&amp;#149; col_pos (column position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 60&lt;/P&gt;&lt;P&gt;only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Identification&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname (field name)&lt;/P&gt;&lt;P&gt;value set: internal output table field name (required parameter)&lt;/P&gt;&lt;P&gt;Name of the internal output table field which is described by this field catalog entry&lt;/P&gt;&lt;P&gt;&amp;#149; tabname (internal output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, internal output table name&lt;/P&gt;&lt;P&gt;This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Name of the internal output table which contains the field FIELDCAT-FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Dictionary reference&lt;/P&gt;&lt;P&gt;&amp;#149; ref_fieldname (reference field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary field name&lt;/P&gt;&lt;P&gt;Name of the Data Dictionary field referred to.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname (reference table/structure field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, name of a Data Dictionary structure or table &lt;/P&gt;&lt;P&gt;Structure or table name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference to fields with currency/measurement unit&lt;/P&gt;&lt;P&gt;Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:&lt;/P&gt;&lt;P&gt;&amp;#149; the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)&lt;/P&gt;&lt;P&gt;&amp;#149; There is a field in the internal output table which contains the associated unit.&lt;/P&gt;&lt;P&gt;&amp;#149; There is also an entry in the field catalog for the unit field.&lt;/P&gt;&lt;P&gt;(If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.&lt;/P&gt;&lt;P&gt;The association of a value field to a unit affects the output as follows:&lt;/P&gt;&lt;P&gt;&amp;#149; appropriate decimal places display for the unit&lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous. &lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.&lt;/P&gt;&lt;P&gt;&amp;#149; When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to currency unit&lt;/P&gt;&lt;P&gt;&amp;#149; cfieldname (currency unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;Only relevant for amount columns with associated unit.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; ctabname (internal currency unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-CFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to measurement unit&lt;/P&gt;&lt;P&gt;&amp;#149; qfieldname (measurement unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for quantity columns with unit link.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME. &lt;/P&gt;&lt;P&gt;The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; qtabname (internal measurement unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-QFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column output options&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen (column width)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;For fields with a Data Dictionary link this parameter can be left initial.&lt;/P&gt;&lt;P&gt;For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).&lt;/P&gt;&lt;P&gt;initial = column width is the output length of the referred Data Dictionary field (domain).&lt;/P&gt;&lt;P&gt;n = column width is n characters&lt;/P&gt;&lt;P&gt;&amp;#149; key (key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = kex field (key field output in color)&lt;/P&gt;&lt;P&gt;Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.&lt;/P&gt;&lt;P&gt;For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.&lt;/P&gt;&lt;P&gt;&amp;#149; key_sel (hideable key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;only relevant when FIELDCAT-KEY = 'X'&lt;/P&gt;&lt;P&gt;Key field which can be hidden interactively.&lt;/P&gt;&lt;P&gt;The key column sequence cannot be changed interactively by the user.&lt;/P&gt;&lt;P&gt;The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.&lt;/P&gt;&lt;P&gt;&amp;#149; no_out (field in field list)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = field is not displayed in the current list.&lt;/P&gt;&lt;P&gt;The user can interactively choose the field for output from the field list.&lt;/P&gt;&lt;P&gt;The user can display the contents of these fields at line level using the 'Detail' function.&lt;/P&gt;&lt;P&gt;See also the 'Detail screen' documentation of the parameter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; tech (technical field)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = technical field&lt;/P&gt;&lt;P&gt;Field cannot be output in the list and cannot be displayed interactively.&lt;/P&gt;&lt;P&gt;Field can only be used in the field catalog (not in IT_SORT, ...).&lt;/P&gt;&lt;P&gt;&amp;#149; emphasize (highlight columns in color)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)&lt;/P&gt;&lt;P&gt;'X' = column is colored with the default column highlight color.&lt;/P&gt;&lt;P&gt;'Cxyz' = column is colored with a coded color:&lt;/P&gt;&lt;P&gt;&amp;#149; C: Color (coding must begin with C)&lt;/P&gt;&lt;P&gt;&amp;#149; x: color number&lt;/P&gt;&lt;P&gt;&amp;#149; y: bold&lt;/P&gt;&lt;P&gt;&amp;#149; z: inverse&lt;/P&gt;&lt;P&gt;&amp;#149; hotspot (column as hotspot)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;'X' = column cells are output as hotspots&lt;/P&gt;&lt;P&gt;&amp;#149; fix_column (fix column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Not relevant for block lists (output of several lists consecutively)&lt;/P&gt;&lt;P&gt;'X' = column fixed (does not scroll horizontally)&lt;/P&gt;&lt;P&gt;All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter&lt;/P&gt;&lt;P&gt;IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; do_sum (sum over column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.&lt;/P&gt;&lt;P&gt;This function can also be called by the user interactively.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sum (sums forbidden)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.&lt;/P&gt;&lt;P&gt;&amp;#149; input (column ready for input)&lt;/P&gt;&lt;P&gt;Function not available&lt;/P&gt;&lt;P&gt;Format column contents&lt;/P&gt;&lt;P&gt;&amp;#149; icon&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents to be output as an icon.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of icons.&lt;/P&gt;&lt;P&gt;&amp;#149; symbol&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.&lt;/P&gt;&lt;P&gt;The internal output table column must be a valid symbol character.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of symbols.&lt;/P&gt;&lt;P&gt;Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.&lt;/P&gt;&lt;P&gt;&amp;#149; just (justification)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'R', 'L', 'C'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type CHAR or NUMC&lt;/P&gt;&lt;P&gt;' ' = default justification for this data type&lt;/P&gt;&lt;P&gt;'R' = right-justified output&lt;/P&gt;&lt;P&gt;'L' = left-justified output&lt;/P&gt;&lt;P&gt;'C' = centered output&lt;/P&gt;&lt;P&gt;The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.&lt;/P&gt;&lt;P&gt;&amp;#149; lzero (leading zeros)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type NUMC&lt;/P&gt;&lt;P&gt;ALV outputs NUMC fields right-justified without leading zeros by default.&lt;/P&gt;&lt;P&gt;'X' = output with leading zeros&lt;/P&gt;&lt;P&gt;Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sign (no +/- sign) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = value output without +/ sign&lt;/P&gt;&lt;P&gt;&amp;#149; no_zero (suppress zeros) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = suppress zeros&lt;/P&gt;&lt;P&gt;&amp;#149; edit_mask (field formatting)&lt;/P&gt;&lt;P&gt;value set: SPACE, template&lt;/P&gt;&lt;P&gt;template = see documentation of WRITE formatting option USING EDIT MASK template&lt;/P&gt;&lt;P&gt;The output conversion conv can be made by template = '== conv'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Texts&lt;/P&gt;&lt;P&gt;The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.&lt;/P&gt;&lt;P&gt;The 'long field label' is also used in display variant definition, sort, etc. popups.&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l (long field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m (medium field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s (short field label)&lt;/P&gt;&lt;P&gt;&amp;#149; reptext_ddic (header)&lt;/P&gt;&lt;P&gt;analogous to the Data element maintenance 'Header'&lt;/P&gt;&lt;P&gt;The specified text is not necessarily output in the list, an optimum among all texts is sought.&lt;/P&gt;&lt;P&gt;&amp;#149; ddictxt (specify text)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'L', 'M', 'S'&lt;/P&gt;&lt;P&gt;You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters for program fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;see also 'Text' parameters&lt;/P&gt;&lt;P&gt;&amp;#149; datatype (data type)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;Program field data type&lt;/P&gt;&lt;P&gt;&amp;#149; ddic_outputlen (external output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-INTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-INTLEN&lt;/P&gt;&lt;P&gt;n = external format field output length&lt;/P&gt;&lt;P&gt;The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).&lt;/P&gt;&lt;P&gt;&amp;#149; intlen (internal output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-DDIC_OUTPUTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;n = internal format field output length&lt;/P&gt;&lt;P&gt;&amp;#149; rollname (data element)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data element name&lt;/P&gt;&lt;P&gt;F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.&lt;/P&gt;&lt;P&gt;When F1 help is called for this field, the documentation of the specified data element is displayed.&lt;/P&gt;&lt;P&gt;If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Others&lt;/P&gt;&lt;P&gt;&amp;#149; sp_group (field group key)&lt;/P&gt;&lt;P&gt;value set: SPACE, CHAR(1)&lt;/P&gt;&lt;P&gt;Field group key.&lt;/P&gt;&lt;P&gt;Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).&lt;/P&gt;&lt;P&gt;When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.&lt;/P&gt;&lt;P&gt;&amp;#149; reprep (Report/Report interface selection criterion)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; The system contains the Report/Report interface (function group RSTI, table TRSTI)&lt;/P&gt;&lt;P&gt;&amp;#149; Parameter LAYOUT-REPREP = 'X'&lt;/P&gt;&lt;P&gt;(see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )&lt;/P&gt;&lt;P&gt;'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.&lt;/P&gt;&lt;P&gt;2.7.2. Default&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;ALV gets the remaining information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.&lt;/P&gt;&lt;P&gt;REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;Priority rule:&lt;/P&gt;&lt;P&gt;Entries in the field catalog have priority over differing entries in the Data Dictionary.&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen&lt;/P&gt;&lt;P&gt;&amp;#149; datatype&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.&lt;/P&gt;&lt;P&gt;If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sites :&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Check out these links : top one is on slis specifcally,&lt;/P&gt;&lt;P&gt;&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="2240494"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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="1509398"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV reporting - Step by step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through with these links :&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Abap_programs.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Abap_programs.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Group Heading&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu037.htm" target="test_blank"&gt;http://www.sap-img.com/fu037.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALVGRID with refresh&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm" target="test_blank"&gt;http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;download the PDF from following link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.abap4.it/download/ALV.pdf" target="test_blank"&gt;www.abap4.it/download/ALV.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OOPS ALV tutorial.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample programs:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alvhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get all demo programs for ALV:&lt;/P&gt;&lt;P&gt;Go to se38 and type BCALV* and press F4 for all demo porgrams.&lt;/P&gt;&lt;P&gt;Check out these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-alv-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-alv-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/an-interactive-alv-report.htm" target="test_blank"&gt;http://www.sap-img.com/abap/an-interactive-alv-report.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 05:41:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T05:41:53Z</dc:date>
    <item>
      <title>alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770983#M645641</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;&lt;/P&gt;&lt;P&gt;can u tell me &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;advantages , disadvantages, features of alv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770983#M645641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770984#M645642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srini,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ALV - ABAP List Viewer&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). &lt;/P&gt;&lt;P&gt;This helps us to implement all the features mentioned very effectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Advantages&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Collapse multiple reports into one, drastically cutting down your report development time &lt;/P&gt;&lt;P&gt;Save many hours using built-in ALV sorting, subtotaling and filtering capabilities &lt;/P&gt;&lt;P&gt;Add conditional structures into your ALV report: No programming required! &lt;/P&gt;&lt;P&gt;Combine ALV with display variants to meet a wide range of reporting requirements more easily &lt;/P&gt;&lt;P&gt;Dynamically reorder column layouts and add/subtract fields &lt;/P&gt;&lt;P&gt;Enable users and analysts to save their own personalized variants &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Disadvantage&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;page X of y is not possible in case of ALV in top of page &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using ALV, We can have three types of reports:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;1. Simple Report&lt;/P&gt;&lt;P&gt;2. Block Report&lt;/P&gt;&lt;P&gt;3. Hierarchical Sequential Report&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some function modules which will enable to produce the above reports without much effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1. SIMPLE REPORT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important function modules are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Reuse_alv_list_display&lt;/P&gt;&lt;P&gt;b. Reuse_alv_fieldcatalog_merge&lt;/P&gt;&lt;P&gt;c. Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;d. Reuse_alv_commentary_write&lt;/P&gt;&lt;P&gt;e. Reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important parameters are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. I_callback_program : report id&lt;/P&gt;&lt;P&gt;ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status&lt;/P&gt;&lt;P&gt;iii. I_callback_user_command : routine where the function codes are handled&lt;/P&gt;&lt;P&gt;iv. I_structure name : name of the dictionary table &lt;/P&gt;&lt;P&gt;v. Is_layout : structure to set the layout of the report&lt;/P&gt;&lt;P&gt;vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with the data to be output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Important Parameters are :&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;i. I_program_name : report id&lt;/P&gt;&lt;P&gt;ii. I_internal_tabname : the internal output table&lt;/P&gt;&lt;P&gt;iii. I_inclname : include or the report name where all the dynamic forms are handled.&lt;/P&gt;&lt;P&gt;II Changing&lt;/P&gt;&lt;P&gt;ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is &lt;/P&gt;&lt;P&gt;declared in the type pool SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;I. Import :&lt;/P&gt;&lt;P&gt;Et_Events : The event table is returned with all possible CALLBACK events &lt;/P&gt;&lt;P&gt;for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV. &lt;/P&gt;&lt;P&gt;II. Export :&lt;/P&gt;&lt;P&gt;I_List_type : &lt;/P&gt;&lt;P&gt;0 = simple list REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND &lt;/P&gt;&lt;P&gt;3 = hierarchical-sequential block list &lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. it_list_commentary : internal table with the headings of the type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table has three fields :&lt;/P&gt;&lt;P&gt;Typ : &amp;#145;H&amp;#146; &amp;#150; header, &amp;#145;S&amp;#146; &amp;#150; selection , &amp;#145;A&amp;#146; - action&lt;/P&gt;&lt;P&gt;Key : only when typ is &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;Info : the text to be printed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : same as reuse_alv_list_display&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 is an example for simple list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2. BLOCK REPORT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to have multiple lists continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important functions used in this report are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY&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;A. REUSE_ALV_BLOCK_LIST_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;II. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;III. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used to set the default gui status etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export : &lt;/P&gt;&lt;P&gt;I. is_layout : layout settings for block &lt;/P&gt;&lt;P&gt;II. it_fieldcat : field catalog &lt;/P&gt;&lt;P&gt;III. i_tabname : internal table name with output data &lt;/P&gt;&lt;P&gt;IV. it_events : internal table with all possible events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with output data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module adds the data to the block. &lt;/P&gt;&lt;P&gt;Repeat this function for all the different blocks to be displayed one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used for hierarchical sequential blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : All the parameters are optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module display the list with data appended by the above function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;3. Hierarchical reports :&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchical sequential list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. Export: &lt;/P&gt;&lt;P&gt;i. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;ii. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;iii. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;iv. IS_LAYOUT &lt;/P&gt;&lt;P&gt;v. IT_FIELDCAT &lt;/P&gt;&lt;P&gt;vi. IT_EVENTS &lt;/P&gt;&lt;P&gt;vii. i_tabname_header : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the highest hierarchy level.&lt;/P&gt;&lt;P&gt;viii. i_tabname_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level.&lt;/P&gt;&lt;P&gt;ix. is_keyinfo : This structure contains the header and item table field &lt;/P&gt;&lt;P&gt;names which link the two tables (shared key). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables&lt;/P&gt;&lt;P&gt;i. t_outtab_header : Header table with data to be output&lt;/P&gt;&lt;P&gt;ii. t_outtab_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level. &lt;/P&gt;&lt;P&gt;slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using &amp;#145;REUSE_ALV_FIELDCATALOG_MERGE&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Attributes :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. col_pos : position of the column&lt;/P&gt;&lt;P&gt;B. fieldname : internal fieldname&lt;/P&gt;&lt;P&gt;C. tabname : internal table name&lt;/P&gt;&lt;P&gt;D. ref_fieldname : fieldname (dictionary)&lt;/P&gt;&lt;P&gt;E. ref_tabname : table (dictionary)&lt;/P&gt;&lt;P&gt;F. key(1) : column with key-color&lt;/P&gt;&lt;P&gt;G. icon(1) : icon&lt;/P&gt;&lt;P&gt;H. symbol(1) : symbol&lt;/P&gt;&lt;P&gt;I. checkbox(1) : checkbox&lt;/P&gt;&lt;P&gt;J. just(1) : (R)ight (L)eft (C)ent.&lt;/P&gt;&lt;P&gt;K. do_sum(1) : sum up&lt;/P&gt;&lt;P&gt;L. no_out(1) : (O)blig.(X)no out&lt;/P&gt;&lt;P&gt;M. outputlen : output length&lt;/P&gt;&lt;P&gt;N. seltext_l : long key word&lt;/P&gt;&lt;P&gt;O. seltext_m : middle key word&lt;/P&gt;&lt;P&gt;P. seltext_s : short key word&lt;/P&gt;&lt;P&gt;Q. reptext_ddic : heading (ddic)&lt;/P&gt;&lt;P&gt;R. ddictxt(1) : (S)hort (M)iddle (L)ong&lt;/P&gt;&lt;P&gt;S. datatype : datatype&lt;/P&gt;&lt;P&gt;T. hotspot(1) : hotspot &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the sample report&lt;/P&gt;&lt;P&gt;report ZRGRIRNA no standard page heading&lt;/P&gt;&lt;P&gt;line-count 65&lt;/P&gt;&lt;P&gt;line-size 255&lt;/P&gt;&lt;P&gt;message-id mm.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GR IR Detail Report *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : The output has to be displayed&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;in the ALV Grid format with the Selection *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;screen appearing on the output. In The Output *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subtotals for Vendor, Plant, Period, Material,*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Valuation Class, Purchase Order,Cost Center, *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Cost Element and Receipt Date are displayed *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;after sorting the data by same fields. *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declaration for Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: t001, " Company Codes&lt;/P&gt;&lt;P&gt;t001w, " Plants/Branches&lt;/P&gt;&lt;P&gt;lfa1, " Vendor Master&lt;/P&gt;&lt;P&gt;ska1, " GL Account Master&lt;/P&gt;&lt;P&gt;mara, " Material Master&lt;/P&gt;&lt;P&gt;mbew, " Material Valuation&lt;/P&gt;&lt;P&gt;ekko, " PO Header Data&lt;/P&gt;&lt;P&gt;cska, " Cost Elements&lt;/P&gt;&lt;P&gt;csks, " Cost Centers&lt;/P&gt;&lt;P&gt;bsis, " GL Accounts: Open Items Data&lt;/P&gt;&lt;P&gt;bkpf. " Accounting Doc: Header Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type-pools&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type pools for ALV display&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;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global variables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: g_repid like sy-repid,&lt;/P&gt;&lt;P&gt;g_exit type c,&lt;/P&gt;&lt;P&gt;g_events type slis_t_event,&lt;/P&gt;&lt;P&gt;g_list_top_of_page type slis_t_listheader,&lt;/P&gt;&lt;P&gt;g_exit_caused_by_caller,&lt;/P&gt;&lt;P&gt;g_exit_caused_by_user type slis_exit_by_user,&lt;/P&gt;&lt;P&gt;g_top_of_page type slis_formname value 'TOP_OF_PAGE',&lt;/P&gt;&lt;P&gt;g_variant like disvariant,&lt;/P&gt;&lt;P&gt;g_save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declaration for Constants&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants : c_x type c value 'X', " Flag&lt;/P&gt;&lt;P&gt;c_c type c value 'C', " Flag&lt;/P&gt;&lt;P&gt;c_l type c value 'L', " Flag&lt;/P&gt;&lt;P&gt;c_a type c value 'A', " Line Type&lt;/P&gt;&lt;P&gt;c_h type c value 'H', " Dr/Cr&lt;/P&gt;&lt;P&gt;c_s type c value 'S', " Line Type&lt;/P&gt;&lt;P&gt;c_mkpf(4) type c value 'MKPF'. " Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declaration of Internal Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for BSIS Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_bsis occurs 0,&lt;/P&gt;&lt;P&gt;bukrs like bsis-bukrs, " Company Code&lt;/P&gt;&lt;P&gt;hkont like bsis-hkont, " GR IR Account&lt;/P&gt;&lt;P&gt;gjahr like bsis-gjahr, " Fiscal Year&lt;/P&gt;&lt;P&gt;belnr like bsis-belnr, " Acc Document&lt;/P&gt;&lt;P&gt;buzei like bsis-buzei, " Item No&lt;/P&gt;&lt;P&gt;budat like bsis-budat, " Receipt Date(Posting)&lt;/P&gt;&lt;P&gt;monat like bsis-monat, " Period&lt;/P&gt;&lt;P&gt;end of i_bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for BSEG Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_bseg occurs 0,&lt;/P&gt;&lt;P&gt;bukrs like bsis-bukrs, " Company Code&lt;/P&gt;&lt;P&gt;belnr like bsis-belnr, " Acc Document&lt;/P&gt;&lt;P&gt;buzei like bsis-buzei, " Item No&lt;/P&gt;&lt;P&gt;gjahr like bsis-gjahr, " Fiscal Year&lt;/P&gt;&lt;P&gt;shkzg like bseg-shkzg, " Dr/Cr Indicator&lt;/P&gt;&lt;P&gt;lifnr like bseg-lifnr, " Vendor Code&lt;/P&gt;&lt;P&gt;matnr like bseg-matnr, " Material No&lt;/P&gt;&lt;P&gt;ebeln like bseg-ebeln, " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp like bseg-ebelp, " PO Item&lt;/P&gt;&lt;P&gt;werks like bseg-werks, " Plant&lt;/P&gt;&lt;P&gt;menge like bseg-menge, " PO Quantity&lt;/P&gt;&lt;P&gt;meins like bseg-meins, " UOM&lt;/P&gt;&lt;P&gt;dmbtr like bseg-dmbtr, " Amount in Local Currency&lt;/P&gt;&lt;P&gt;wrbtr like bseg-wrbtr, " Amount in Trans.Currency&lt;/P&gt;&lt;P&gt;end of i_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for BKPF Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_bkpf occurs 0,&lt;/P&gt;&lt;P&gt;bukrs like bkpf-bukrs, " Company Code&lt;/P&gt;&lt;P&gt;belnr like bkpf-belnr, " Acc Document&lt;/P&gt;&lt;P&gt;gjahr like bkpf-gjahr, " Fiscal Year&lt;/P&gt;&lt;P&gt;waers like bkpf-waers, " Trans. Currency&lt;/P&gt;&lt;P&gt;awkey like bkpf-awkey, " Object Key&lt;/P&gt;&lt;P&gt;awtyp like bkpf-awtyp, " Reference Procedure&lt;/P&gt;&lt;P&gt;end of i_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for MSEG Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_mseg occurs 0,&lt;/P&gt;&lt;P&gt;mblnr like mseg-mblnr, " Material Document&lt;/P&gt;&lt;P&gt;mjahr like mseg-mjahr, " Fiscal Year&lt;/P&gt;&lt;P&gt;bwart like mseg-bwart, " Movement Type&lt;/P&gt;&lt;P&gt;matnr like mseg-matnr, " Material No&lt;/P&gt;&lt;P&gt;menge like mseg-menge, " PO Quantity&lt;/P&gt;&lt;P&gt;meins like mseg-meins, " UOM&lt;/P&gt;&lt;P&gt;end of i_mseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for MBEW Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_mbew occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mbew-matnr, " Material No&lt;/P&gt;&lt;P&gt;werks like mbew-bwkey, " Plant&lt;/P&gt;&lt;P&gt;bklas like mbew-bklas, " Valuation Class&lt;/P&gt;&lt;P&gt;end of i_mbew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for EKPO Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_ekpo occurs 0,&lt;/P&gt;&lt;P&gt;ebeln like ekpo-ebeln, " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp like ekpo-ebelp, " PO Item&lt;/P&gt;&lt;P&gt;matnr like ekpo-matnr, " Material No&lt;/P&gt;&lt;P&gt;txz01 like ekpo-txz01, " Material Text&lt;/P&gt;&lt;P&gt;end of i_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for EKKN Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_ekkn occurs 0,&lt;/P&gt;&lt;P&gt;ebeln like ekkn-ebeln, " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp like ekkn-ebelp, " PO Item&lt;/P&gt;&lt;P&gt;kostl like ekkn-kostl, " Cost Center&lt;/P&gt;&lt;P&gt;sakto like ekkn-sakto, " Cost Element&lt;/P&gt;&lt;P&gt;end of i_ekkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table for LFA1 Table data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr, " Vendor&lt;/P&gt;&lt;P&gt;name1 like lfa1-name1, " Name&lt;/P&gt;&lt;P&gt;end of i_lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declaration of Output Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of i_final occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr, " Vendor&lt;/P&gt;&lt;P&gt;werks like bseg-werks, " Plant&lt;/P&gt;&lt;P&gt;monat like bsis-monat, " Period&lt;/P&gt;&lt;P&gt;matnr like mara-matnr, " Material Number&lt;/P&gt;&lt;P&gt;bklas like mbew-bklas, " Val Class&lt;/P&gt;&lt;P&gt;ebeln like bseg-ebeln, " PO&lt;/P&gt;&lt;P&gt;kostl like ekkn-kostl, " Cost Center&lt;/P&gt;&lt;P&gt;sakto like ekkn-sakto, " Cost Element&lt;/P&gt;&lt;P&gt;budat like bsis-budat, " Rec. Date&lt;/P&gt;&lt;P&gt;name1 like lfa1-name1, " Vendor Name&lt;/P&gt;&lt;P&gt;belnr like bsis-belnr, " FI Document&lt;/P&gt;&lt;P&gt;bwart like mseg-bwart, " Movement Type&lt;/P&gt;&lt;P&gt;txz01 like ekpo-txz01, " Material Text&lt;/P&gt;&lt;P&gt;menge like bseg-menge, " Quantity&lt;/P&gt;&lt;P&gt;meins like bseg-meins, " UOM&lt;/P&gt;&lt;P&gt;dmbtr like bseg-dmbtr, " Local Amount&lt;/P&gt;&lt;P&gt;wrbtr like bseg-wrbtr, " Tran.Amount&lt;/P&gt;&lt;P&gt;waers like bkpf-waers, " Tran.Currency&lt;/P&gt;&lt;P&gt;status type c, " Material Status&lt;/P&gt;&lt;P&gt;end of i_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold field catgory data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: i_fldcat type slis_t_fieldcat_alv. " Table - field catgory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold Sort/Subtotals criteria data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: i_sort type slis_t_sortinfo_alv. " Table - sort/Subtotals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: x_layout type slis_layout_alv, " Structure-layout&lt;/P&gt;&lt;P&gt;x_fldcat like line of i_fldcat, " Structure-field catagory&lt;/P&gt;&lt;P&gt;x_sort like line of i_sort. " Structure-Sort/Subtotals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen : begin of block b1 with frame title text-000.&lt;/P&gt;&lt;P&gt;parameters:&lt;/P&gt;&lt;P&gt;p_bukrs like t001-bukrs obligatory, " Company Code&lt;/P&gt;&lt;P&gt;p_grira like ska1-saknr default '0241101000' obligatory. " Account&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;s_budat for bkpf-budat, " Posting Date&lt;/P&gt;&lt;P&gt;s_werks for t001w-werks, " Plant&lt;/P&gt;&lt;P&gt;s_lifnr for lfa1-lifnr, " Vendor&lt;/P&gt;&lt;P&gt;s_matnr for mara-matnr, " Material Number&lt;/P&gt;&lt;P&gt;s_kostl for csks-kostl, " Cost Center&lt;/P&gt;&lt;P&gt;s_kstar for cska-kstar, " Cost Element&lt;/P&gt;&lt;P&gt;s_ebeln for ekko-ebeln, " Purchase Order&lt;/P&gt;&lt;P&gt;s_monat for bsis-monat. " Period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen skip.&lt;/P&gt;&lt;P&gt;parameters:&lt;/P&gt;&lt;P&gt;p_incmt as checkbox default 'X',&lt;/P&gt;&lt;P&gt;p_incnm as checkbox default 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Initialization&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;g_repid = sy-repid.&lt;/P&gt;&lt;P&gt;perform layout_init using x_layout.&lt;/P&gt;&lt;P&gt;perform eventtab_build using g_events[].&lt;/P&gt;&lt;P&gt;g_variant-report = g_repid.&lt;/P&gt;&lt;P&gt;g_save = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At selection screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Selection Screen Fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform validate_screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start of selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read Data from Database Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform read_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;End of selection&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build layout report layout.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform populate_layout_stucture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Perform build_field_catalog and Sort Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform build_field_catalog.&lt;/P&gt;&lt;P&gt;perform build_sort_totals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;List Header for Top-Of-Page&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform comment_build using g_list_top_of_page[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call list viewer function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;perform call_list_viewer .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;STRONG&gt;Form - Routines&lt;/STRONG&gt;**************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : layout_init&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : Form to Build layout for list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form layout_init using rs_layout type slis_layout_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs_layout-detail_popup = c_x.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : Eventtab_build&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : Registration of events to happen during list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form eventtab_build using rt_events type slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Registration of events to happen during list display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: ls_event type slis_alv_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_EVENTS_GET'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_list_type = 0&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;et_events = rt_events.&lt;/P&gt;&lt;P&gt;read table rt_events with key name = slis_ev_top_of_page&lt;/P&gt;&lt;P&gt;into ls_event.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;move g_top_of_page to ls_event-form.&lt;/P&gt;&lt;P&gt;append ls_event to rt_events.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "eventtab_build&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : top_of_page&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form top_of_page.&lt;/P&gt;&lt;P&gt;call function 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_LOGO = 'ENJOYSAP_LOGO'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;it_list_commentary = g_list_top_of_page.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form validate_screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Selection Screen fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form validate_screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Company Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear t001.&lt;/P&gt;&lt;P&gt;if not p_bukrs is initial.&lt;/P&gt;&lt;P&gt;select single bukrs&lt;/P&gt;&lt;P&gt;into t001-bukrs&lt;/P&gt;&lt;P&gt;from t001&lt;/P&gt;&lt;P&gt;where bukrs eq p_bukrs.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Company Code'(012).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of GL Account (GR/IR)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear ska1.&lt;/P&gt;&lt;P&gt;if not p_grira is initial.&lt;/P&gt;&lt;P&gt;select saknr&lt;/P&gt;&lt;P&gt;into ska1-saknr&lt;/P&gt;&lt;P&gt;from ska1&lt;/P&gt;&lt;P&gt;up to 1 rows&lt;/P&gt;&lt;P&gt;where saknr eq p_grira.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid GR/IR Account'(013).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Vendor Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear lfa1.&lt;/P&gt;&lt;P&gt;if not s_lifnr[] is initial.&lt;/P&gt;&lt;P&gt;select single lifnr&lt;/P&gt;&lt;P&gt;into lfa1-lifnr&lt;/P&gt;&lt;P&gt;from lfa1&lt;/P&gt;&lt;P&gt;where lifnr in s_lifnr.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Vendor'(001).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Plant Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear t001w.&lt;/P&gt;&lt;P&gt;if not s_werks[] is initial.&lt;/P&gt;&lt;P&gt;select single werks&lt;/P&gt;&lt;P&gt;into t001w-werks&lt;/P&gt;&lt;P&gt;from t001w&lt;/P&gt;&lt;P&gt;where werks in s_werks.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Plant'(014).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Material Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear mara.&lt;/P&gt;&lt;P&gt;if not s_matnr[] is initial.&lt;/P&gt;&lt;P&gt;select single matnr&lt;/P&gt;&lt;P&gt;into mara-matnr&lt;/P&gt;&lt;P&gt;from mara&lt;/P&gt;&lt;P&gt;where matnr in s_matnr.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Material'(015).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Purchase Order&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear ekko.&lt;/P&gt;&lt;P&gt;if not s_ebeln[] is initial.&lt;/P&gt;&lt;P&gt;select single ebeln&lt;/P&gt;&lt;P&gt;into ekko-ebeln&lt;/P&gt;&lt;P&gt;from ekko&lt;/P&gt;&lt;P&gt;where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Purchase Order'(016).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Cost Center&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear csks.&lt;/P&gt;&lt;P&gt;if not s_kostl[] is initial.&lt;/P&gt;&lt;P&gt;select kostl&lt;/P&gt;&lt;P&gt;into csks-kostl&lt;/P&gt;&lt;P&gt;from csks&lt;/P&gt;&lt;P&gt;up to 1 rows&lt;/P&gt;&lt;P&gt;where kostl in s_kostl.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Cost Center'(017).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Validation of Cost Element&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear cska.&lt;/P&gt;&lt;P&gt;if not s_kstar[] is initial.&lt;/P&gt;&lt;P&gt;select kstar&lt;/P&gt;&lt;P&gt;into cska-kstar&lt;/P&gt;&lt;P&gt;from cska&lt;/P&gt;&lt;P&gt;up to 1 rows&lt;/P&gt;&lt;P&gt;where kstar in s_kstar.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e899 with 'Enter Valid Cost Element'(018).&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. "validate_screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form read_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Data from the database Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form read_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Accounting Documents for the GR/IR Account Entered on&lt;/P&gt;&lt;/LI&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;clear i_bsis.&lt;/P&gt;&lt;P&gt;refresh i_bsis.&lt;/P&gt;&lt;P&gt;select bukrs " Company Code&lt;/P&gt;&lt;P&gt;hkont " GR IR Account&lt;/P&gt;&lt;P&gt;gjahr " Fiscal Year&lt;/P&gt;&lt;P&gt;belnr " Acc Document&lt;/P&gt;&lt;P&gt;buzei " Item No&lt;/P&gt;&lt;P&gt;budat " Receipt Date(Posting)&lt;/P&gt;&lt;P&gt;monat " Period&lt;/P&gt;&lt;P&gt;into table i_bsis&lt;/P&gt;&lt;P&gt;from bsis&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and hkont = p_grira&lt;/P&gt;&lt;P&gt;and budat in s_budat&lt;/P&gt;&lt;P&gt;and monat in s_monat .&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 i899 with 'No data found'(043).&lt;/P&gt;&lt;P&gt;g_exit = c_x.&lt;/P&gt;&lt;P&gt;stop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_bsis by bukrs hkont gjahr belnr buzei.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Vendor,PO,Material,Qty details from BSEG Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not i_bsis[] is initial.&lt;/P&gt;&lt;P&gt;clear i_bseg.&lt;/P&gt;&lt;P&gt;refresh i_bseg.&lt;/P&gt;&lt;P&gt;select bukrs " Company Code&lt;/P&gt;&lt;P&gt;belnr " Acc Document&lt;/P&gt;&lt;P&gt;buzei " Item No&lt;/P&gt;&lt;P&gt;gjahr " Fiscal Year&lt;/P&gt;&lt;P&gt;shkzg " Dr/Cr Indicator&lt;/P&gt;&lt;P&gt;lifnr " Vendor Code&lt;/P&gt;&lt;P&gt;matnr " Material No&lt;/P&gt;&lt;P&gt;ebeln " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp " PO Item&lt;/P&gt;&lt;P&gt;werks " Plant&lt;/P&gt;&lt;P&gt;menge " PO Quantity&lt;/P&gt;&lt;P&gt;meins " UOM&lt;/P&gt;&lt;P&gt;dmbtr " Amount in Local Currency&lt;/P&gt;&lt;P&gt;wrbtr " Amount in Trans.Currency&lt;/P&gt;&lt;P&gt;into table i_bseg&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;for all entries in i_bsis&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and belnr = i_bsis-belnr&lt;/P&gt;&lt;P&gt;and gjahr = i_bsis-gjahr&lt;/P&gt;&lt;P&gt;and buzei = i_bsis-buzei&lt;/P&gt;&lt;P&gt;and lifnr in s_lifnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and matnr in s_matnr&lt;/P&gt;&lt;P&gt;and ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_bseg by bukrs belnr buzei gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select the Trans.Currency from BKPF Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear i_bkpf.&lt;/P&gt;&lt;P&gt;refresh i_bkpf.&lt;/P&gt;&lt;P&gt;select bukrs " Company Code&lt;/P&gt;&lt;P&gt;belnr " Acc Document&lt;/P&gt;&lt;P&gt;gjahr " Fiscal Year&lt;/P&gt;&lt;P&gt;waers " Trans. Currency&lt;/P&gt;&lt;P&gt;awkey " Object Key&lt;/P&gt;&lt;P&gt;awtyp " Reference Procedure&lt;/P&gt;&lt;P&gt;into table i_bkpf&lt;/P&gt;&lt;P&gt;from bkpf&lt;/P&gt;&lt;P&gt;for all entries in i_bsis&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and belnr = i_bsis-belnr&lt;/P&gt;&lt;P&gt;and gjahr = i_bsis-gjahr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;sort i_bkpf by bukrs belnr gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Quantity and UOM of Material from MSEG Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not i_bkpf[] is initial.&lt;/P&gt;&lt;P&gt;clear i_mseg.&lt;/P&gt;&lt;P&gt;refresh i_mseg.&lt;/P&gt;&lt;P&gt;select mblnr " Material Document&lt;/P&gt;&lt;P&gt;mjahr " Fiscal Year&lt;/P&gt;&lt;P&gt;bwart " Movement Type&lt;/P&gt;&lt;P&gt;matnr " Material No&lt;/P&gt;&lt;P&gt;menge " PO Quantity&lt;/P&gt;&lt;P&gt;meins " UOM&lt;/P&gt;&lt;P&gt;into table i_mseg&lt;/P&gt;&lt;P&gt;from mseg&lt;/P&gt;&lt;P&gt;for all entries in i_bkpf&lt;/P&gt;&lt;P&gt;where mblnr = i_bkpf-awkey(10).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;sort i_mseg by mblnr mjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Material And Description from EKPO Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_bseg[] is initial.&lt;/P&gt;&lt;P&gt;clear i_ekpo.&lt;/P&gt;&lt;P&gt;refresh i_ekpo.&lt;/P&gt;&lt;P&gt;select ebeln " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp " PO Item&lt;/P&gt;&lt;P&gt;matnr " Material No&lt;/P&gt;&lt;P&gt;txz01 " Material Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table i_ekpo&lt;/P&gt;&lt;P&gt;from ekpo&lt;/P&gt;&lt;P&gt;for all entries in i_bseg&lt;/P&gt;&lt;P&gt;where ebeln = i_bseg-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = i_bseg-ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_ekpo by ebeln ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Valuation Class from MBEW Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear i_mbew.&lt;/P&gt;&lt;P&gt;refresh i_mbew.&lt;/P&gt;&lt;P&gt;select matnr " Material No&lt;/P&gt;&lt;P&gt;bwkey " Plant&lt;/P&gt;&lt;P&gt;bklas " Valuation Class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table i_mbew&lt;/P&gt;&lt;P&gt;from mbew&lt;/P&gt;&lt;P&gt;for all entries in i_bseg&lt;/P&gt;&lt;P&gt;where matnr = i_bseg-matnr&lt;/P&gt;&lt;P&gt;and bwkey = i_bseg-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_mbew by matnr werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Cost Center and Cost Element of the PO from EKKN Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear i_ekkn.&lt;/P&gt;&lt;P&gt;refresh i_ekkn.&lt;/P&gt;&lt;P&gt;select ebeln " Purchase Order&lt;/P&gt;&lt;P&gt;ebelp " PO Item&lt;/P&gt;&lt;P&gt;kostl " Cost Center&lt;/P&gt;&lt;P&gt;sakto " Cost Element&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table i_ekkn&lt;/P&gt;&lt;P&gt;from ekkn&lt;/P&gt;&lt;P&gt;for all entries in i_bseg&lt;/P&gt;&lt;P&gt;where ebeln = i_bseg-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = i_bseg-ebelp&lt;/P&gt;&lt;P&gt;and kostl in s_kostl&lt;/P&gt;&lt;P&gt;and sakto in s_kstar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_ekkn by ebeln ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Vendor Name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear i_lfa1.&lt;/P&gt;&lt;P&gt;refresh i_lfa1.&lt;/P&gt;&lt;P&gt;select lifnr " Vendor&lt;/P&gt;&lt;P&gt;name1 " Name&lt;/P&gt;&lt;P&gt;into table i_lfa1&lt;/P&gt;&lt;P&gt;from lfa1&lt;/P&gt;&lt;P&gt;for all entries in i_bseg&lt;/P&gt;&lt;P&gt;where lifnr = i_bseg-lifnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;sort i_lfa1 by lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the data to Final Output Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at i_bsis.&lt;/P&gt;&lt;P&gt;i_final-belnr = i_bsis-belnr. " FI Document&lt;/P&gt;&lt;P&gt;i_final-monat = i_bsis-monat. " Period&lt;/P&gt;&lt;P&gt;i_final-budat = i_bsis-budat. " Rec. Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Transaction Currency from BKPF Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_bkpf with key bukrs = i_bsis-bukrs&lt;/P&gt;&lt;P&gt;belnr = i_bsis-belnr&lt;/P&gt;&lt;P&gt;gjahr = i_bsis-gjahr&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-waers = i_bkpf-waers. " Tran.Currency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Movement Type for all Material Related&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Documents from MSEG Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if i_bkpf-awtyp = c_mkpf.&lt;/P&gt;&lt;P&gt;read table i_mseg with key mblnr = i_bkpf-awkey(10)&lt;/P&gt;&lt;P&gt;mjahr = i_bkpf-awkey+10(4).&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-bwart = i_mseg-bwart. " Movement Type&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read Vendor, Plant, PO Document, Local And Trans.Amounts&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;from BSEG Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_bseg with key bukrs = i_bsis-bukrs&lt;/P&gt;&lt;P&gt;belnr = i_bsis-belnr&lt;/P&gt;&lt;P&gt;gjahr = i_bsis-gjahr&lt;/P&gt;&lt;P&gt;buzei = i_bsis-buzei&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-lifnr = i_bseg-lifnr. " Vendor&lt;/P&gt;&lt;P&gt;i_final-werks = i_bseg-werks. " Plant&lt;/P&gt;&lt;P&gt;i_final-ebeln = i_bseg-ebeln. " PO&lt;/P&gt;&lt;P&gt;i_final-dmbtr = i_bseg-dmbtr. " Local Amount&lt;/P&gt;&lt;P&gt;i_final-wrbtr = i_bseg-wrbtr. " Tran.Amount&lt;/P&gt;&lt;P&gt;i_final-menge = i_bseg-menge. " Quantity&lt;/P&gt;&lt;P&gt;i_final-meins = i_bseg-meins. " UOM&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;For Credit Indicator(SHKZG = H) amounts should be (-)ve&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if i_bseg-shkzg = c_h.&lt;/P&gt;&lt;P&gt;i_final-dmbtr = i_final-dmbtr * -1.&lt;/P&gt;&lt;P&gt;i_final-wrbtr = i_final-wrbtr * -1.&lt;/P&gt;&lt;P&gt;i_final-menge = i_final-menge * -1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Material and its Description from EKPO Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_ekpo with key ebeln = i_bseg-ebeln&lt;/P&gt;&lt;P&gt;ebelp = i_bseg-ebelp&lt;/P&gt;&lt;P&gt;matnr = i_bseg-matnr&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-matnr = i_ekpo-matnr. " Material Number&lt;/P&gt;&lt;P&gt;i_final-txz01 = i_ekpo-txz01. " Material Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the Material Status depending on the Input Checkbox&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;On Selection Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if not i_ekpo-matnr is initial.&lt;/P&gt;&lt;P&gt;i_final-status = c_x.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the PO related Cost Element and Cost Centers&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;from EKKN Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_ekkn with key ebeln = i_bseg-ebeln&lt;/P&gt;&lt;P&gt;ebelp = i_bseg-ebelp&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-kostl = i_ekkn-kostl. " Cost Center&lt;/P&gt;&lt;P&gt;i_final-sakto = i_ekkn-sakto. " Cost Element&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Valuation Class from MBEW Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_mbew with key matnr = i_bseg-matnr&lt;/P&gt;&lt;P&gt;werks = i_bseg-werks&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-bklas = i_mbew-bklas. " Val Class&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the Vendor Name from LFA1 Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;read table i_lfa1 with key lifnr = i_bseg-lifnr&lt;/P&gt;&lt;P&gt;binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;i_final-name1 = i_lfa1-name1. " Vendor Name&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append i_final.&lt;/P&gt;&lt;P&gt;clear i_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort i_final by lifnr werks monat matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Depending on the check Box Selected display the data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if p_incmt = c_x and p_incnm ne c_x.&lt;/P&gt;&lt;P&gt;delete i_final where matnr eq space.&lt;/P&gt;&lt;P&gt;elseif p_incnm = c_x and p_incmt ne c_x.&lt;/P&gt;&lt;P&gt;delete i_final where matnr ne space.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "Read Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : populate_layout_stucture&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : Populating the layout structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form populate_layout_stucture.&lt;/P&gt;&lt;P&gt;clear x_layout .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Layout properties&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;x_layout-zebra = c_x.&lt;/P&gt;&lt;P&gt;x_layout-detail_popup = c_x.&lt;/P&gt;&lt;P&gt;x_layout-detail_initial_lines = c_x.&lt;/P&gt;&lt;P&gt;x_layout-colwidth_optimize = c_x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " populate_layout_stucture&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : build_field_catalog&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : Building the field catalog data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&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;call function 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_program_name = g_repid&lt;/P&gt;&lt;P&gt;i_internal_tabname = 'I_FINAL'&lt;/P&gt;&lt;P&gt;i_inclname = g_repid&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;ct_fieldcat = i_fldcat&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;inconsistent_interface = 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 id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Getting the Header text for the coloums&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at i_fldcat into x_fldcat where fieldname = 'LIFNR' or&lt;/P&gt;&lt;P&gt;fieldname = 'NAME1' or&lt;/P&gt;&lt;P&gt;fieldname = 'WERKS' or&lt;/P&gt;&lt;P&gt;fieldname = 'MONAT' or&lt;/P&gt;&lt;P&gt;fieldname = 'MATNR' or&lt;/P&gt;&lt;P&gt;fieldname = 'BKLAS' or&lt;/P&gt;&lt;P&gt;fieldname = 'EBELN' or&lt;/P&gt;&lt;P&gt;fieldname = 'KOSTL' or&lt;/P&gt;&lt;P&gt;fieldname = 'SAKTO' or&lt;/P&gt;&lt;P&gt;fieldname = 'BUDAT' or&lt;/P&gt;&lt;P&gt;fieldname = 'BELNR' or&lt;/P&gt;&lt;P&gt;fieldname = 'BWART' or&lt;/P&gt;&lt;P&gt;fieldname = 'TXZ01' or&lt;/P&gt;&lt;P&gt;fieldname = 'MENGE' or&lt;/P&gt;&lt;P&gt;fieldname = 'MEINS' or&lt;/P&gt;&lt;P&gt;fieldname = 'DMBTR' or&lt;/P&gt;&lt;P&gt;fieldname = 'WRBTR' or&lt;/P&gt;&lt;P&gt;fieldname = 'WAERS' or&lt;/P&gt;&lt;P&gt;fieldname = 'STATUS'.&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'LIFNR'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Vendor'(003).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Vendor'(003).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Vendor'(003).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Vendor'(003).&lt;/P&gt;&lt;P&gt;x_fldcat-inttype = c_c.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'NAME1'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Vendor Name'(002).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Vendor Name'(002).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Vendor Name'(002).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Vendor Name'(002).&lt;/P&gt;&lt;P&gt;x_fldcat-inttype = c_c.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'WERKS'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Plant'(010).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Plant'(010).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Plant'(010).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Plant'(010).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'MONAT'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Period'(011).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Period'(011).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Period'(011).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Period'(011).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Material'(004).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Material'(004).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Material'(004).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Material'(004).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'BKLAS'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Valuation Class'(009).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Valuation Class'(009).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Valuation Class'(009).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Valuation Class'(009).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Purchase Order'(005).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Purchase Order'(005).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Purchase Order'(005).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Purchase Order'(005).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'KOSTL'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Cost Center'(006).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Cost Center'(006).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Cost Center'(006).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Cost Center'(006).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'SAKTO'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Cost Element'(007).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Cost Element'(007).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Cost Element'(007).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Cost Element'(007).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'BUDAT'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Receipt Date'(008).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Receipt Date'(008).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Receipt Date'(008).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Receipt Date'(008).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'BELNR'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Acc.Document'(100).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Acc.Document'(100).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Acc.Document'(100).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Acc.Document'(100).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'BWART'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Movement Type'(101).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Movement Type'(101).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Movement Type'(101).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Movement Type'(101).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'TXZ01'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Material Text'(102).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Material Text'(102).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Material Text'(102).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Material Text'(102).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'MENGE'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Quantity'(103).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Quantity'(103).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Quantity'(103).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Quantity'(103).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;x_fldcat-do_sum = c_x.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'MEINS'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'UOM'(104).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'UOM'(104).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'UOM'(104).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'UOM'(104).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'DMBTR'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Amount in Local Curr'(105).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Amount in Local Curr'(105).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Amount in Local Curr'(105).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Amount in Local Curr'(105).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;x_fldcat-do_sum = c_x.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'WRBTR'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Amount in Trans.Curr'(106).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Amount in Trans.Curr'(106).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Amount in Trans.Curr'(106).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Amount in Trans.Curr'(106).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;x_fldcat-do_sum = c_x.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'WAERS'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Trans.Currency'(107).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Trans.Currency'(107).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Trans.Currency'(107).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Trans.Currency'(107).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if x_fldcat-fieldname = 'STATUS'.&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_l = 'Material Status'(019).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_m = 'Material Status'(019).&lt;/P&gt;&lt;P&gt;x_fldcat-seltext_s = 'Material Status'(019).&lt;/P&gt;&lt;P&gt;x_fldcat-reptext_ddic = 'Material Status'(019).&lt;/P&gt;&lt;P&gt;x_fldcat-ddictxt = c_l.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify i_fldcat from x_fldcat index sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " build_field_catalog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : build_sort_totals&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : Building the Criteria for Sort/Subtotals&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_sort_totals.&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'LIFNR'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 1.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'WERKS'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 2.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'MONAT'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 3.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 4.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'BKLAS'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 5.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'EBELN'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 6.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'KOSTL'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 7.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'SAKTO'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 8.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x_sort-fieldname = 'BUDAT'.&lt;/P&gt;&lt;P&gt;x_sort-tabname = 'I_FINAL'.&lt;/P&gt;&lt;P&gt;x_sort-spos = 9.&lt;/P&gt;&lt;P&gt;x_sort-up = c_x.&lt;/P&gt;&lt;P&gt;x_sort-subtot = c_x.&lt;/P&gt;&lt;P&gt;append x_sort to i_sort.&lt;/P&gt;&lt;P&gt;clear x_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " build_sort_totals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : comment_build&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : This form is used to display the Report Header(ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form comment_build using lt_top_of_page type&lt;/P&gt;&lt;P&gt;slis_t_listheader.&lt;/P&gt;&lt;P&gt;data: l_line type slis_listheader,&lt;/P&gt;&lt;P&gt;l_heading1 like rs38m-repti,&lt;/P&gt;&lt;P&gt;l_date(10), l_time(8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear l_line.&lt;/P&gt;&lt;P&gt;l_heading1 = 'GR/IR DETAIL REPORT'(021).&lt;/P&gt;&lt;P&gt;g_repid = sy-repid.&lt;/P&gt;&lt;P&gt;write sy-uzeit to l_time.&lt;/P&gt;&lt;P&gt;write sy-datum to l_date.&lt;/P&gt;&lt;P&gt;l_line-typ = c_h.&lt;/P&gt;&lt;P&gt;move l_heading1 to l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear l_line.&lt;/P&gt;&lt;P&gt;l_line-typ = c_s.&lt;/P&gt;&lt;P&gt;concatenate 'System:'(023) sy-sysid&lt;/P&gt;&lt;P&gt;'Date:'(024) l_date&lt;/P&gt;&lt;P&gt;' Time:'(025)&lt;/P&gt;&lt;P&gt;l_time into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate 'Report:'(026) g_repid&lt;/P&gt;&lt;P&gt;' User:'(027) sy-uname into&lt;/P&gt;&lt;P&gt;l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;l_line-typ = c_a.&lt;/P&gt;&lt;P&gt;move 'SELECTION CRITERIA:'(028) to l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Company Code : '(029)&lt;/P&gt;&lt;P&gt;p_bukrs into l_line-info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' GR/IR Account: '(030)&lt;/P&gt;&lt;P&gt;p_grira into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Posting Date : '(032) s_budat-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_budat-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Plant : '(033) s_werks-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_werks-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ' Vendor: '(034) s_lifnr-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_lifnr-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ' Material: '(035) s_matnr-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_matnr-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Cost Center : '(036) s_kostl-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_kostl-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ' Cost Element: '(037) s_kstar-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_kstar-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ' Purchase Order: '(038) s_ebeln-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_ebeln-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Period : '(039) s_monat-low&lt;/P&gt;&lt;P&gt;' To: '(031) s_monat-high into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate ' Include Material Items: '(040)&lt;/P&gt;&lt;P&gt;p_incmt into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;concatenate ' Include Non-Material Items: '(041)&lt;/P&gt;&lt;P&gt;p_incnm into l_line-info.&lt;/P&gt;&lt;P&gt;append l_line to lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form : call_list_viewer&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description : This form is used to display the grid through ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form call_list_viewer.&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 = g_repid&lt;/P&gt;&lt;P&gt;is_layout = x_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = i_fldcat[]&lt;/P&gt;&lt;P&gt;i_default = c_x&lt;/P&gt;&lt;P&gt;it_sort = i_sort[]&lt;/P&gt;&lt;P&gt;i_save = g_save&lt;/P&gt;&lt;P&gt;is_variant = g_variant&lt;/P&gt;&lt;P&gt;it_events = g_events[]&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;e_exit_caused_by_caller = g_exit_caused_by_caller&lt;/P&gt;&lt;P&gt;es_exit_caused_by_user = g_exit_caused_by_user&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;t_outtab = i_final&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;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;write: / 'Problem in calling the ALV report'(042).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " call_list_viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward Points if Useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gokul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770984#M645642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770985#M645643</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;go thru this you will get an idea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV is ABAP LIST VIEWER.&lt;/P&gt;&lt;P&gt;To have more functionalities like totals, subtotals,logos,etc we choose ALVs compared to reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;P&gt;Documentation on alv:&lt;/P&gt;&lt;P&gt;you can check out:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/ALV/ALVMainPage.htm" target="test_blank"&gt;http://www.saptechnical.com/Tutorials/ALV/ALVMainPage.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf&lt;/A&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm&lt;/A&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;ABAP List Viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). &lt;/P&gt;&lt;P&gt;This helps us to implement all the features mentioned very effectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using ALV, We can have three types of reports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Simple Report&lt;/P&gt;&lt;P&gt;2. Block Report&lt;/P&gt;&lt;P&gt;3. Hierarchical Sequential Report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some function modules which will enable to produce the above reports without much effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SIMPLE REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important function modules are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Reuse_alv_list_display&lt;/P&gt;&lt;P&gt;b. Reuse_alv_fieldcatalog_merge&lt;/P&gt;&lt;P&gt;c. Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;d. Reuse_alv_commentary_write&lt;/P&gt;&lt;P&gt;e. Reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important parameters are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. I_callback_program : report id&lt;/P&gt;&lt;P&gt;ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status&lt;/P&gt;&lt;P&gt;iii. I_callback_user_command : routine where the function codes are handled&lt;/P&gt;&lt;P&gt;iv. I_structure name : name of the dictionary table &lt;/P&gt;&lt;P&gt;v. Is_layout : structure to set the layout of the report&lt;/P&gt;&lt;P&gt;vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with the data to be output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to &lt;/P&gt;&lt;P&gt;populate a fieldcatalog which is essential to display the data in ALV.&lt;/P&gt;&lt;P&gt;If the output data is from a single dictionary table and all the &lt;/P&gt;&lt;P&gt;columns are selected, then we need not exclusively create the field cat&lt;/P&gt;&lt;P&gt;alog. Its enough to mention the table name as a parameter&lt;/P&gt;&lt;P&gt;(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases &lt;/P&gt;&lt;P&gt;we need to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Important Parameters are :&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;i. I_program_name : report id&lt;/P&gt;&lt;P&gt;ii. I_internal_tabname : the internal output table&lt;/P&gt;&lt;P&gt;iii. I_inclname : include or the report name where all the dynamic forms are handled.&lt;/P&gt;&lt;P&gt;II Changing&lt;/P&gt;&lt;P&gt;ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is &lt;/P&gt;&lt;P&gt;declared in the type pool SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;I. Import :&lt;/P&gt;&lt;P&gt;Et_Events : The event table is returned with all possible CALLBACK events &lt;/P&gt;&lt;P&gt;for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV. &lt;/P&gt;&lt;P&gt;II. Export :&lt;/P&gt;&lt;P&gt;I_List_type : &lt;/P&gt;&lt;P&gt;0 = simple list REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND &lt;/P&gt;&lt;P&gt;3 = hierarchical-sequential block list &lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. it_list_commentary : internal table with the headings of the type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table has three fields :&lt;/P&gt;&lt;P&gt;Typ : &amp;#145;H&amp;#146; &amp;#150; header, &amp;#145;S&amp;#146; &amp;#150; selection , &amp;#145;A&amp;#146; - action&lt;/P&gt;&lt;P&gt;Key : only when typ is &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;Info : the text to be printed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : same as reuse_alv_list_display&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 is an example for simple list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. BLOCK REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to have multiple lists continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important functions used in this report are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY&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;A. REUSE_ALV_BLOCK_LIST_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;II. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;III. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used to set the default gui status etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export : &lt;/P&gt;&lt;P&gt;I. is_layout : layout settings for block &lt;/P&gt;&lt;P&gt;II. it_fieldcat : field catalog &lt;/P&gt;&lt;P&gt;III. i_tabname : internal table name with output data &lt;/P&gt;&lt;P&gt;IV. it_events : internal table with all possible events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with output data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module adds the data to the block. &lt;/P&gt;&lt;P&gt;Repeat this function for all the different blocks to be displayed one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used for hierarchical sequential blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : All the parameters are optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module display the list with data appended by the above function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Hierarchical reports : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchical sequential list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. Export: &lt;/P&gt;&lt;P&gt;i. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;ii. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;iii. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;iv. IS_LAYOUT &lt;/P&gt;&lt;P&gt;v. IT_FIELDCAT &lt;/P&gt;&lt;P&gt;vi. IT_EVENTS &lt;/P&gt;&lt;P&gt;vii. i_tabname_header : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the highest hierarchy level.&lt;/P&gt;&lt;P&gt;viii. i_tabname_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level.&lt;/P&gt;&lt;P&gt;ix. is_keyinfo : This structure contains the header and item table field &lt;/P&gt;&lt;P&gt;names which link the two tables (shared key). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables&lt;/P&gt;&lt;P&gt;i. t_outtab_header : Header table with data to be output&lt;/P&gt;&lt;P&gt;ii. t_outtab_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level. &lt;/P&gt;&lt;P&gt;slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using &amp;#145;REUSE_ALV_FIELDCATALOG_MERGE&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Attributes :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. col_pos : position of the column&lt;/P&gt;&lt;P&gt;B. fieldname : internal fieldname&lt;/P&gt;&lt;P&gt;C. tabname : internal table name&lt;/P&gt;&lt;P&gt;D. ref_fieldname : fieldname (dictionary)&lt;/P&gt;&lt;P&gt;E. ref_tabname : table (dictionary)&lt;/P&gt;&lt;P&gt;F. key(1) : column with key-color&lt;/P&gt;&lt;P&gt;G. icon(1) : icon&lt;/P&gt;&lt;P&gt;H. symbol(1) : symbol&lt;/P&gt;&lt;P&gt;I. checkbox(1) : checkbox&lt;/P&gt;&lt;P&gt;J. just(1) : (R)ight (L)eft (C)ent.&lt;/P&gt;&lt;P&gt;K. do_sum(1) : sum up&lt;/P&gt;&lt;P&gt;L. no_out(1) : (O)blig.(X)no out&lt;/P&gt;&lt;P&gt;M. outputlen : output length&lt;/P&gt;&lt;P&gt;N. seltext_l : long key word&lt;/P&gt;&lt;P&gt;O. seltext_m : middle key word&lt;/P&gt;&lt;P&gt;P. seltext_s : short key word&lt;/P&gt;&lt;P&gt;Q. reptext_ddic : heading (ddic)&lt;/P&gt;&lt;P&gt;R. ddictxt(1) : (S)hort (M)iddle (L)ong&lt;/P&gt;&lt;P&gt;S. datatype : datatype&lt;/P&gt;&lt;P&gt;T. hotspot(1) : hotspot &lt;/P&gt;&lt;P&gt;**********************************************************************************************&lt;/P&gt;&lt;P&gt;some theory regarding alv:&lt;/P&gt;&lt;P&gt;This table tells ALV which events are processed by the caller by CALLBACK.&lt;/P&gt;&lt;P&gt;The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.&lt;/P&gt;&lt;P&gt;You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.&lt;/P&gt;&lt;P&gt;The table structure contains the fields:&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-NAME&lt;/P&gt;&lt;P&gt;Name of the Callback event. &lt;/P&gt;&lt;P&gt;Possible Callback events:&lt;/P&gt;&lt;P&gt;&amp;#149; Action&lt;/P&gt;&lt;P&gt;USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD&lt;/P&gt;&lt;P&gt;Process actions on the list&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND. &lt;/P&gt;&lt;P&gt;PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB&lt;/P&gt;&lt;P&gt;If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).&lt;/P&gt;&lt;P&gt;The STANDARD status of the function group SALV should be used as a template for a user-specific status.&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET. &lt;/P&gt;&lt;P&gt;ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C&lt;/P&gt;&lt;P&gt;Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.&lt;/P&gt;&lt;P&gt;Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.&lt;/P&gt;&lt;P&gt;RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.&lt;/P&gt;&lt;P&gt;RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.&lt;/P&gt;&lt;P&gt;CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.&lt;/P&gt;&lt;P&gt;&amp;#149; List processing events&lt;/P&gt;&lt;P&gt;IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.&lt;/P&gt;&lt;P&gt;TOP_OF_LIST no USING parameter. Information output at the start of the list&lt;/P&gt;&lt;P&gt;END_OF_LIST no USING parameter. Information output at the end of the list&lt;/P&gt;&lt;P&gt;TOP_OF_PAGE no USING parameter &lt;/P&gt;&lt;P&gt;Equivalent to the list processing TOP-OF-PAGE event&lt;/P&gt;&lt;P&gt;END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Information output at the end of a page. This is only called for printing.&lt;/P&gt;&lt;P&gt;TOP_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_COVERPAGE&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_SELINFOS&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_LISTINFOS&lt;/P&gt;&lt;P&gt;IS_LAYOUT-GET_SELINFOS&lt;/P&gt;&lt;P&gt;The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event. &lt;/P&gt;&lt;P&gt;END_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.&lt;/P&gt;&lt;P&gt;FOREIGN_TOP_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;FOREIGN_END_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information before each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information after each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;&amp;#149; Internal use only&lt;/P&gt;&lt;P&gt;LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME&lt;/P&gt;&lt;P&gt;R_INDEX LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_ITEM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_SUM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-FORM&lt;/P&gt;&lt;P&gt;Name of the form routine which should be called in the calling program at the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field_catalog:&lt;/P&gt;&lt;P&gt;Field catalog with field descriptions&lt;/P&gt;&lt;P&gt;2.7.1. Description&lt;/P&gt;&lt;P&gt;Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.&lt;/P&gt;&lt;P&gt;The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module&lt;/P&gt;&lt;P&gt;See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.&lt;/P&gt;&lt;P&gt;A field catalog need not be built-up and passed explicitly only under the following conditions:&lt;/P&gt;&lt;P&gt;&amp;#149; The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.&lt;/P&gt;&lt;P&gt;&amp;#149; all fields in this structure are to be output&lt;/P&gt;&lt;P&gt;&amp;#149; the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Positioning&lt;/P&gt;&lt;P&gt;&amp;#149; row_pos (row position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 3&lt;/P&gt;&lt;P&gt;Only relevant if the list output is to be multi-line (two or three lines) by default.&lt;/P&gt;&lt;P&gt;A multi-line list can also be defined by the user interactively if the default list is one-line.&lt;/P&gt;&lt;P&gt;The parameter specifies the relative output line of the column in a multi-line list.&lt;/P&gt;&lt;P&gt;&amp;#149; col_pos (column position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 60&lt;/P&gt;&lt;P&gt;only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Identification&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname (field name)&lt;/P&gt;&lt;P&gt;value set: internal output table field name (required parameter)&lt;/P&gt;&lt;P&gt;Name of the internal output table field which is described by this field catalog entry&lt;/P&gt;&lt;P&gt;&amp;#149; tabname (internal output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, internal output table name&lt;/P&gt;&lt;P&gt;This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Name of the internal output table which contains the field FIELDCAT-FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Dictionary reference&lt;/P&gt;&lt;P&gt;&amp;#149; ref_fieldname (reference field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary field name&lt;/P&gt;&lt;P&gt;Name of the Data Dictionary field referred to.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname (reference table/structure field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, name of a Data Dictionary structure or table &lt;/P&gt;&lt;P&gt;Structure or table name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference to fields with currency/measurement unit&lt;/P&gt;&lt;P&gt;Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:&lt;/P&gt;&lt;P&gt;&amp;#149; the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)&lt;/P&gt;&lt;P&gt;&amp;#149; There is a field in the internal output table which contains the associated unit.&lt;/P&gt;&lt;P&gt;&amp;#149; There is also an entry in the field catalog for the unit field.&lt;/P&gt;&lt;P&gt;(If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.&lt;/P&gt;&lt;P&gt;The association of a value field to a unit affects the output as follows:&lt;/P&gt;&lt;P&gt;&amp;#149; appropriate decimal places display for the unit&lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous. &lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.&lt;/P&gt;&lt;P&gt;&amp;#149; When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to currency unit&lt;/P&gt;&lt;P&gt;&amp;#149; cfieldname (currency unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;Only relevant for amount columns with associated unit.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; ctabname (internal currency unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-CFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to measurement unit&lt;/P&gt;&lt;P&gt;&amp;#149; qfieldname (measurement unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for quantity columns with unit link.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME. &lt;/P&gt;&lt;P&gt;The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; qtabname (internal measurement unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-QFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column output options&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen (column width)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;For fields with a Data Dictionary link this parameter can be left initial.&lt;/P&gt;&lt;P&gt;For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).&lt;/P&gt;&lt;P&gt;initial = column width is the output length of the referred Data Dictionary field (domain).&lt;/P&gt;&lt;P&gt;n = column width is n characters&lt;/P&gt;&lt;P&gt;&amp;#149; key (key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = kex field (key field output in color)&lt;/P&gt;&lt;P&gt;Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.&lt;/P&gt;&lt;P&gt;For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.&lt;/P&gt;&lt;P&gt;&amp;#149; key_sel (hideable key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;only relevant when FIELDCAT-KEY = 'X'&lt;/P&gt;&lt;P&gt;Key field which can be hidden interactively.&lt;/P&gt;&lt;P&gt;The key column sequence cannot be changed interactively by the user.&lt;/P&gt;&lt;P&gt;The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.&lt;/P&gt;&lt;P&gt;&amp;#149; no_out (field in field list)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = field is not displayed in the current list.&lt;/P&gt;&lt;P&gt;The user can interactively choose the field for output from the field list.&lt;/P&gt;&lt;P&gt;The user can display the contents of these fields at line level using the 'Detail' function.&lt;/P&gt;&lt;P&gt;See also the 'Detail screen' documentation of the parameter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; tech (technical field)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = technical field&lt;/P&gt;&lt;P&gt;Field cannot be output in the list and cannot be displayed interactively.&lt;/P&gt;&lt;P&gt;Field can only be used in the field catalog (not in IT_SORT, ...).&lt;/P&gt;&lt;P&gt;&amp;#149; emphasize (highlight columns in color)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)&lt;/P&gt;&lt;P&gt;'X' = column is colored with the default column highlight color.&lt;/P&gt;&lt;P&gt;'Cxyz' = column is colored with a coded color:&lt;/P&gt;&lt;P&gt;&amp;#149; C: Color (coding must begin with C)&lt;/P&gt;&lt;P&gt;&amp;#149; x: color number&lt;/P&gt;&lt;P&gt;&amp;#149; y: bold&lt;/P&gt;&lt;P&gt;&amp;#149; z: inverse&lt;/P&gt;&lt;P&gt;&amp;#149; hotspot (column as hotspot)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;'X' = column cells are output as hotspots&lt;/P&gt;&lt;P&gt;&amp;#149; fix_column (fix column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Not relevant for block lists (output of several lists consecutively)&lt;/P&gt;&lt;P&gt;'X' = column fixed (does not scroll horizontally)&lt;/P&gt;&lt;P&gt;All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter&lt;/P&gt;&lt;P&gt;IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; do_sum (sum over column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.&lt;/P&gt;&lt;P&gt;This function can also be called by the user interactively.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sum (sums forbidden)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.&lt;/P&gt;&lt;P&gt;&amp;#149; input (column ready for input)&lt;/P&gt;&lt;P&gt;Function not available&lt;/P&gt;&lt;P&gt;Format column contents&lt;/P&gt;&lt;P&gt;&amp;#149; icon&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents to be output as an icon.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of icons.&lt;/P&gt;&lt;P&gt;&amp;#149; symbol&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.&lt;/P&gt;&lt;P&gt;The internal output table column must be a valid symbol character.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of symbols.&lt;/P&gt;&lt;P&gt;Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.&lt;/P&gt;&lt;P&gt;&amp;#149; just (justification)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'R', 'L', 'C'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type CHAR or NUMC&lt;/P&gt;&lt;P&gt;' ' = default justification for this data type&lt;/P&gt;&lt;P&gt;'R' = right-justified output&lt;/P&gt;&lt;P&gt;'L' = left-justified output&lt;/P&gt;&lt;P&gt;'C' = centered output&lt;/P&gt;&lt;P&gt;The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.&lt;/P&gt;&lt;P&gt;&amp;#149; lzero (leading zeros)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type NUMC&lt;/P&gt;&lt;P&gt;ALV outputs NUMC fields right-justified without leading zeros by default.&lt;/P&gt;&lt;P&gt;'X' = output with leading zeros&lt;/P&gt;&lt;P&gt;Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sign (no +/- sign) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = value output without +/ sign&lt;/P&gt;&lt;P&gt;&amp;#149; no_zero (suppress zeros) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = suppress zeros&lt;/P&gt;&lt;P&gt;&amp;#149; edit_mask (field formatting)&lt;/P&gt;&lt;P&gt;value set: SPACE, template&lt;/P&gt;&lt;P&gt;template = see documentation of WRITE formatting option USING EDIT MASK template&lt;/P&gt;&lt;P&gt;The output conversion conv can be made by template = '== conv'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Texts&lt;/P&gt;&lt;P&gt;The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.&lt;/P&gt;&lt;P&gt;The 'long field label' is also used in display variant definition, sort, etc. popups.&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l (long field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m (medium field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s (short field label)&lt;/P&gt;&lt;P&gt;&amp;#149; reptext_ddic (header)&lt;/P&gt;&lt;P&gt;analogous to the Data element maintenance 'Header'&lt;/P&gt;&lt;P&gt;The specified text is not necessarily output in the list, an optimum among all texts is sought.&lt;/P&gt;&lt;P&gt;&amp;#149; ddictxt (specify text)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'L', 'M', 'S'&lt;/P&gt;&lt;P&gt;You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters for program fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;see also 'Text' parameters&lt;/P&gt;&lt;P&gt;&amp;#149; datatype (data type)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;Program field data type&lt;/P&gt;&lt;P&gt;&amp;#149; ddic_outputlen (external output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-INTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-INTLEN&lt;/P&gt;&lt;P&gt;n = external format field output length&lt;/P&gt;&lt;P&gt;The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).&lt;/P&gt;&lt;P&gt;&amp;#149; intlen (internal output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-DDIC_OUTPUTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;n = internal format field output length&lt;/P&gt;&lt;P&gt;&amp;#149; rollname (data element)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data element name&lt;/P&gt;&lt;P&gt;F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.&lt;/P&gt;&lt;P&gt;When F1 help is called for this field, the documentation of the specified data element is displayed.&lt;/P&gt;&lt;P&gt;If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Others&lt;/P&gt;&lt;P&gt;&amp;#149; sp_group (field group key)&lt;/P&gt;&lt;P&gt;value set: SPACE, CHAR(1)&lt;/P&gt;&lt;P&gt;Field group key.&lt;/P&gt;&lt;P&gt;Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).&lt;/P&gt;&lt;P&gt;When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.&lt;/P&gt;&lt;P&gt;&amp;#149; reprep (Report/Report interface selection criterion)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; The system contains the Report/Report interface (function group RSTI, table TRSTI)&lt;/P&gt;&lt;P&gt;&amp;#149; Parameter LAYOUT-REPREP = 'X'&lt;/P&gt;&lt;P&gt;(see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )&lt;/P&gt;&lt;P&gt;'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.&lt;/P&gt;&lt;P&gt;2.7.2. Default&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;ALV gets the remaining information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.&lt;/P&gt;&lt;P&gt;REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;Priority rule:&lt;/P&gt;&lt;P&gt;Entries in the field catalog have priority over differing entries in the Data Dictionary.&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen&lt;/P&gt;&lt;P&gt;&amp;#149; datatype&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.&lt;/P&gt;&lt;P&gt;If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sites :&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Check out these links : top one is on slis specifcally,&lt;/P&gt;&lt;P&gt;&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="2240494"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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="1509398"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV reporting - Step by step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through with these links :&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Abap_programs.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Abap_programs.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Group Heading&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu037.htm" target="test_blank"&gt;http://www.sap-img.com/fu037.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALVGRID with refresh&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm" target="test_blank"&gt;http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;download the PDF from following link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.abap4.it/download/ALV.pdf" target="test_blank"&gt;www.abap4.it/download/ALV.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OOPS ALV tutorial.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample programs:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alvhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get all demo programs for ALV:&lt;/P&gt;&lt;P&gt;Go to se38 and type BCALV* and press F4 for all demo porgrams.&lt;/P&gt;&lt;P&gt;Check out these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-alv-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-alv-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/an-interactive-alv-report.htm" target="test_blank"&gt;http://www.sap-img.com/abap/an-interactive-alv-report.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628&lt;/A&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;Prabhu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if it is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770985#M645643</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770986#M645644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;ABAP List Viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV). &lt;/P&gt;&lt;P&gt;This helps us to implement all the features mentioned very effectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using ALV, We can have three types of reports:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Simple Report&lt;/P&gt;&lt;P&gt;2. Block Report&lt;/P&gt;&lt;P&gt;3. Hierarchical Sequential Report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some function modules which will enable to produce the above reports without much effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SIMPLE REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important function modules are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a. Reuse_alv_list_display&lt;/P&gt;&lt;P&gt;b. Reuse_alv_fieldcatalog_merge&lt;/P&gt;&lt;P&gt;c. Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;d. Reuse_alv_commentary_write&lt;/P&gt;&lt;P&gt;e. Reuse_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important parameters are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. I_callback_program : report id&lt;/P&gt;&lt;P&gt;ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status&lt;/P&gt;&lt;P&gt;iii. I_callback_user_command : routine where the function codes are handled&lt;/P&gt;&lt;P&gt;iv. I_structure name : name of the dictionary table &lt;/P&gt;&lt;P&gt;v. Is_layout : structure to set the layout of the report&lt;/P&gt;&lt;P&gt;vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with the data to be output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to &lt;/P&gt;&lt;P&gt;populate a fieldcatalog which is essential to display the data in ALV.&lt;/P&gt;&lt;P&gt; If the output data is from a single dictionary table and all the &lt;/P&gt;&lt;P&gt;columns are selected, then we need not exclusively create the field cat&lt;/P&gt;&lt;P&gt;alog. Its enough to mention the table name as a parameter&lt;/P&gt;&lt;P&gt;(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases &lt;/P&gt;&lt;P&gt;we need to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Important Parameters are :&lt;/P&gt;&lt;P&gt;I. Export :&lt;/P&gt;&lt;P&gt;i. I_program_name : report id&lt;/P&gt;&lt;P&gt;ii. I_internal_tabname : the internal output table&lt;/P&gt;&lt;P&gt;iii. I_inclname : include or the report name where all the dynamic forms are handled.&lt;/P&gt;&lt;P&gt;II Changing&lt;/P&gt;&lt;P&gt;ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is &lt;/P&gt;&lt;P&gt;declared in the type pool SLIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;I. Import :&lt;/P&gt;&lt;P&gt;Et_Events : The event table is returned with all possible CALLBACK events &lt;/P&gt;&lt;P&gt;for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV. &lt;/P&gt;&lt;P&gt;II. Export :&lt;/P&gt;&lt;P&gt;I_List_type : &lt;/P&gt;&lt;P&gt;0 = simple list REUSE_ALV_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND &lt;/P&gt;&lt;P&gt;3 = hierarchical-sequential block list &lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I. it_list_commentary : internal table with the headings of the type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table has three fields :&lt;/P&gt;&lt;P&gt;Typ : &amp;#145;H&amp;#146; &amp;#150; header, &amp;#145;S&amp;#146; &amp;#150; selection , &amp;#145;A&amp;#146; - action&lt;/P&gt;&lt;P&gt;Key : only when typ is &amp;#145;S&amp;#146;.&lt;/P&gt;&lt;P&gt;Info : the text to be printed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : same as reuse_alv_list_display&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 is an example for simple list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. BLOCK REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is used to have multiple lists continuously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important functions used in this report are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_BLOCK_LIST_INIT&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY&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;A. REUSE_ALV_BLOCK_LIST_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;II. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;III. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used to set the default gui status etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export : &lt;/P&gt;&lt;P&gt;I. is_layout : layout settings for block &lt;/P&gt;&lt;P&gt;II. it_fieldcat : field catalog &lt;/P&gt;&lt;P&gt;III. i_tabname : internal table name with output data &lt;/P&gt;&lt;P&gt;IV. it_events : internal table with all possible events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;i. t_outtab : internal table with output data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module adds the data to the block. &lt;/P&gt;&lt;P&gt;Repeat this function for all the different blocks to be displayed one after the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. REUSE_ALV_BLOCK_LIST_HS_APPEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is used for hierarchical sequential blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. REUSE_ALV_BLOCK_LIST_DISPLAY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters : All the parameters are optional. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module display the list with data appended by the above function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Hierarchical reports : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchical sequential list output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. REUSE_ALV_HIERSEQ_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters: &lt;/P&gt;&lt;P&gt;I. Export: &lt;/P&gt;&lt;P&gt;i. I_CALLBACK_PROGRAM &lt;/P&gt;&lt;P&gt;ii. I_CALLBACK_PF_STATUS_SET &lt;/P&gt;&lt;P&gt;iii. I_CALLBACK_USER_COMMAND &lt;/P&gt;&lt;P&gt;iv. IS_LAYOUT &lt;/P&gt;&lt;P&gt;v. IT_FIELDCAT &lt;/P&gt;&lt;P&gt;vi. IT_EVENTS &lt;/P&gt;&lt;P&gt;vii. i_tabname_header : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the highest hierarchy level.&lt;/P&gt;&lt;P&gt;viii. i_tabname_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level.&lt;/P&gt;&lt;P&gt;ix. is_keyinfo : This structure contains the header and item table field &lt;/P&gt;&lt;P&gt;names which link the two tables (shared key). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;II. Tables&lt;/P&gt;&lt;P&gt;i. t_outtab_header : Header table with data to be output&lt;/P&gt;&lt;P&gt;ii. t_outtab_item : Name of the internal table in the program containing the &lt;/P&gt;&lt;P&gt;output data of the lowest hierarchy level. &lt;/P&gt;&lt;P&gt;slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using &amp;#145;REUSE_ALV_FIELDCATALOG_MERGE&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important Attributes :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A. col_pos : position of the column&lt;/P&gt;&lt;P&gt;B. fieldname : internal fieldname&lt;/P&gt;&lt;P&gt;C. tabname : internal table name&lt;/P&gt;&lt;P&gt;D. ref_fieldname : fieldname (dictionary)&lt;/P&gt;&lt;P&gt;E. ref_tabname : table (dictionary)&lt;/P&gt;&lt;P&gt;F. key(1) : column with key-color&lt;/P&gt;&lt;P&gt;G. icon(1) : icon&lt;/P&gt;&lt;P&gt;H. symbol(1) : symbol&lt;/P&gt;&lt;P&gt;I. checkbox(1) : checkbox&lt;/P&gt;&lt;P&gt;J. just(1) : (R)ight (L)eft (C)ent.&lt;/P&gt;&lt;P&gt;K. do_sum(1) : sum up&lt;/P&gt;&lt;P&gt;L. no_out(1) : (O)blig.(X)no out&lt;/P&gt;&lt;P&gt;M. outputlen : output length&lt;/P&gt;&lt;P&gt;N. seltext_l : long key word&lt;/P&gt;&lt;P&gt;O. seltext_m : middle key word&lt;/P&gt;&lt;P&gt;P. seltext_s : short key word&lt;/P&gt;&lt;P&gt;Q. reptext_ddic : heading (ddic)&lt;/P&gt;&lt;P&gt;R. ddictxt(1) : (S)hort (M)iddle (L)ong&lt;/P&gt;&lt;P&gt;S. datatype : datatype&lt;/P&gt;&lt;P&gt;T. hotspot(1) : hotspot &lt;/P&gt;&lt;P&gt;**********************************************************************************************&lt;/P&gt;&lt;P&gt;some theory regarding alv:&lt;/P&gt;&lt;P&gt;This table tells ALV which events are processed by the caller by CALLBACK.&lt;/P&gt;&lt;P&gt;The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.&lt;/P&gt;&lt;P&gt;You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module&lt;/P&gt;&lt;P&gt;REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.&lt;/P&gt;&lt;P&gt;The table structure contains the fields:&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-NAME&lt;/P&gt;&lt;P&gt;Name of the Callback event. &lt;/P&gt;&lt;P&gt;Possible Callback events:&lt;/P&gt;&lt;P&gt;&amp;#149; Action&lt;/P&gt;&lt;P&gt;USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD&lt;/P&gt;&lt;P&gt;Process actions on the list&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND. &lt;/P&gt;&lt;P&gt;PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB&lt;/P&gt;&lt;P&gt;If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).&lt;/P&gt;&lt;P&gt;The STANDARD status of the function group SALV should be used as a template for a user-specific status.&lt;/P&gt;&lt;P&gt;As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET. &lt;/P&gt;&lt;P&gt;ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C&lt;/P&gt;&lt;P&gt;Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.&lt;/P&gt;&lt;P&gt;Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.&lt;/P&gt;&lt;P&gt;RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.&lt;/P&gt;&lt;P&gt;RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.&lt;/P&gt;&lt;P&gt;CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.&lt;/P&gt;&lt;P&gt;&amp;#149; List processing events&lt;/P&gt;&lt;P&gt;IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.&lt;/P&gt;&lt;P&gt;TOP_OF_LIST no USING parameter. Information output at the start of the list&lt;/P&gt;&lt;P&gt;END_OF_LIST no USING parameter. Information output at the end of the list&lt;/P&gt;&lt;P&gt;TOP_OF_PAGE no USING parameter &lt;/P&gt;&lt;P&gt;Equivalent to the list processing TOP-OF-PAGE event&lt;/P&gt;&lt;P&gt;END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Information output at the end of a page. This is only called for printing.&lt;/P&gt;&lt;P&gt;TOP_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_COVERPAGE&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_SELINFOS&lt;/P&gt;&lt;P&gt;IS_PRINT-NO_PRINT_LISTINFOS&lt;/P&gt;&lt;P&gt;IS_LAYOUT-GET_SELINFOS&lt;/P&gt;&lt;P&gt;The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event. &lt;/P&gt;&lt;P&gt;END_OF_COVERPAGE no USING parameter&lt;/P&gt;&lt;P&gt;Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.&lt;/P&gt;&lt;P&gt;FOREIGN_TOP_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;FOREIGN_END_OF_PAGE no USING parameter&lt;/P&gt;&lt;P&gt;The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).&lt;/P&gt;&lt;P&gt;In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.&lt;/P&gt;&lt;P&gt;BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information before each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO&lt;/P&gt;&lt;P&gt;Output information after each output line. Should only be used in justified cases because it costs a lot of performance. &lt;/P&gt;&lt;P&gt;&amp;#149; Internal use only&lt;/P&gt;&lt;P&gt;LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME&lt;/P&gt;&lt;P&gt;R_INDEX LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_ITEM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;R_INDEX_SUM LIKE SY-TABIX&lt;/P&gt;&lt;P&gt;&amp;#149; IT_EVENTS-FORM&lt;/P&gt;&lt;P&gt;Name of the form routine which should be called in the calling program at the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field_catalog:&lt;/P&gt;&lt;P&gt;Field catalog with field descriptions&lt;/P&gt;&lt;P&gt;2.7.1. Description&lt;/P&gt;&lt;P&gt;Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.&lt;/P&gt;&lt;P&gt;The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module&lt;/P&gt;&lt;P&gt;See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.&lt;/P&gt;&lt;P&gt;A field catalog need not be built-up and passed explicitly only under the following conditions:&lt;/P&gt;&lt;P&gt;&amp;#149; The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.&lt;/P&gt;&lt;P&gt;&amp;#149; all fields in this structure are to be output&lt;/P&gt;&lt;P&gt;&amp;#149; the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Positioning&lt;/P&gt;&lt;P&gt;&amp;#149; row_pos (row position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 3&lt;/P&gt;&lt;P&gt;Only relevant if the list output is to be multi-line (two or three lines) by default.&lt;/P&gt;&lt;P&gt;A multi-line list can also be defined by the user interactively if the default list is one-line.&lt;/P&gt;&lt;P&gt;The parameter specifies the relative output line of the column in a multi-line list.&lt;/P&gt;&lt;P&gt;&amp;#149; col_pos (column position)&lt;/P&gt;&lt;P&gt;value set: 0, 1 - 60&lt;/P&gt;&lt;P&gt;only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Identification&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname (field name)&lt;/P&gt;&lt;P&gt;value set: internal output table field name (required parameter)&lt;/P&gt;&lt;P&gt;Name of the internal output table field which is described by this field catalog entry&lt;/P&gt;&lt;P&gt;&amp;#149; tabname (internal output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, internal output table name&lt;/P&gt;&lt;P&gt;This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.&lt;/P&gt;&lt;P&gt;Name of the internal output table which contains the field FIELDCAT-FIELDNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Dictionary reference&lt;/P&gt;&lt;P&gt;&amp;#149; ref_fieldname (reference field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary field name&lt;/P&gt;&lt;P&gt;Name of the Data Dictionary field referred to.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname (reference table/structure field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, name of a Data Dictionary structure or table &lt;/P&gt;&lt;P&gt;Structure or table name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference to fields with currency/measurement unit&lt;/P&gt;&lt;P&gt;Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:&lt;/P&gt;&lt;P&gt;&amp;#149; the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)&lt;/P&gt;&lt;P&gt;&amp;#149; There is a field in the internal output table which contains the associated unit.&lt;/P&gt;&lt;P&gt;&amp;#149; There is also an entry in the field catalog for the unit field.&lt;/P&gt;&lt;P&gt;(If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.&lt;/P&gt;&lt;P&gt;The association of a value field to a unit affects the output as follows:&lt;/P&gt;&lt;P&gt;&amp;#149; appropriate decimal places display for the unit&lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous. &lt;/P&gt;&lt;P&gt;&amp;#149; an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.&lt;/P&gt;&lt;P&gt;&amp;#149; When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to currency unit&lt;/P&gt;&lt;P&gt;&amp;#149; cfieldname (currency unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;Only relevant for amount columns with associated unit.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; ctabname (internal currency unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-CFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to measurement unit&lt;/P&gt;&lt;P&gt;&amp;#149; qfieldname (measurement unit field name)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for quantity columns with unit link.&lt;/P&gt;&lt;P&gt;Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME. &lt;/P&gt;&lt;P&gt;The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.&lt;/P&gt;&lt;P&gt;&amp;#149; qtabname (internal measurement unit field output table)&lt;/P&gt;&lt;P&gt;value set: SPACE, output table field name&lt;/P&gt;&lt;P&gt;only relevant for hierarchical-sequential lists&lt;/P&gt;&lt;P&gt;Name of the internal output table containing the FIELDCAT-QFIELDNAME field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column output options&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen (column width)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;For fields with a Data Dictionary link this parameter can be left initial.&lt;/P&gt;&lt;P&gt;For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).&lt;/P&gt;&lt;P&gt;initial = column width is the output length of the referred Data Dictionary field (domain).&lt;/P&gt;&lt;P&gt;n = column width is n characters&lt;/P&gt;&lt;P&gt;&amp;#149; key (key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = kex field (key field output in color)&lt;/P&gt;&lt;P&gt;Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.&lt;/P&gt;&lt;P&gt;For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.&lt;/P&gt;&lt;P&gt;&amp;#149; key_sel (hideable key column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;only relevant when FIELDCAT-KEY = 'X'&lt;/P&gt;&lt;P&gt;Key field which can be hidden interactively.&lt;/P&gt;&lt;P&gt;The key column sequence cannot be changed interactively by the user.&lt;/P&gt;&lt;P&gt;The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.&lt;/P&gt;&lt;P&gt;&amp;#149; no_out (field in field list)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = field is not displayed in the current list.&lt;/P&gt;&lt;P&gt;The user can interactively choose the field for output from the field list.&lt;/P&gt;&lt;P&gt;The user can display the contents of these fields at line level using the 'Detail' function.&lt;/P&gt;&lt;P&gt;See also the 'Detail screen' documentation of the parameter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; tech (technical field)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = technical field&lt;/P&gt;&lt;P&gt;Field cannot be output in the list and cannot be displayed interactively.&lt;/P&gt;&lt;P&gt;Field can only be used in the field catalog (not in IT_SORT, ...).&lt;/P&gt;&lt;P&gt;&amp;#149; emphasize (highlight columns in color)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)&lt;/P&gt;&lt;P&gt;'X' = column is colored with the default column highlight color.&lt;/P&gt;&lt;P&gt;'Cxyz' = column is colored with a coded color:&lt;/P&gt;&lt;P&gt;&amp;#149; C: Color (coding must begin with C)&lt;/P&gt;&lt;P&gt;&amp;#149; x: color number&lt;/P&gt;&lt;P&gt;&amp;#149; y: bold&lt;/P&gt;&lt;P&gt;&amp;#149; z: inverse&lt;/P&gt;&lt;P&gt;&amp;#149; hotspot (column as hotspot)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;'X' = column cells are output as hotspots&lt;/P&gt;&lt;P&gt;&amp;#149; fix_column (fix column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Not relevant for block lists (output of several lists consecutively)&lt;/P&gt;&lt;P&gt;'X' = column fixed (does not scroll horizontally)&lt;/P&gt;&lt;P&gt;All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter&lt;/P&gt;&lt;P&gt;IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.&lt;/P&gt;&lt;P&gt;&amp;#149; do_sum (sum over column)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.&lt;/P&gt;&lt;P&gt;This function can also be called by the user interactively.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sum (sums forbidden)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.&lt;/P&gt;&lt;P&gt;&amp;#149; input (column ready for input)&lt;/P&gt;&lt;P&gt;Function not available&lt;/P&gt;&lt;P&gt;Format column contents&lt;/P&gt;&lt;P&gt;&amp;#149; icon&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents to be output as an icon.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of icons.&lt;/P&gt;&lt;P&gt;&amp;#149; symbol&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.&lt;/P&gt;&lt;P&gt;The internal output table column must be a valid symbol character.&lt;/P&gt;&lt;P&gt;The caller must consider the printability of symbols.&lt;/P&gt;&lt;P&gt;Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.&lt;/P&gt;&lt;P&gt;&amp;#149; just (justification)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'R', 'L', 'C'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type CHAR or NUMC&lt;/P&gt;&lt;P&gt;' ' = default justification for this data type&lt;/P&gt;&lt;P&gt;'R' = right-justified output&lt;/P&gt;&lt;P&gt;'L' = left-justified output&lt;/P&gt;&lt;P&gt;'C' = centered output&lt;/P&gt;&lt;P&gt;The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.&lt;/P&gt;&lt;P&gt;&amp;#149; lzero (leading zeros)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Only relevant for fields of data type NUMC&lt;/P&gt;&lt;P&gt;ALV outputs NUMC fields right-justified without leading zeros by default.&lt;/P&gt;&lt;P&gt;'X' = output with leading zeros&lt;/P&gt;&lt;P&gt;Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.&lt;/P&gt;&lt;P&gt;&amp;#149; no_sign (no +/- sign) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = value output without +/ sign&lt;/P&gt;&lt;P&gt;&amp;#149; no_zero (suppress zeros) Only relevant for value fields&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X' 'X' = suppress zeros&lt;/P&gt;&lt;P&gt;&amp;#149; edit_mask (field formatting)&lt;/P&gt;&lt;P&gt;value set: SPACE, template&lt;/P&gt;&lt;P&gt;template = see documentation of WRITE formatting option USING EDIT MASK template&lt;/P&gt;&lt;P&gt;The output conversion conv can be made by template = '== conv'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Texts&lt;/P&gt;&lt;P&gt;The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.&lt;/P&gt;&lt;P&gt;The 'long field label' is also used in display variant definition, sort, etc. popups.&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l (long field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m (medium field label)&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s (short field label)&lt;/P&gt;&lt;P&gt;&amp;#149; reptext_ddic (header)&lt;/P&gt;&lt;P&gt;analogous to the Data element maintenance 'Header'&lt;/P&gt;&lt;P&gt;The specified text is not necessarily output in the list, an optimum among all texts is sought.&lt;/P&gt;&lt;P&gt;&amp;#149; ddictxt (specify text)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'L', 'M', 'S'&lt;/P&gt;&lt;P&gt;You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters for program fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;see also 'Text' parameters&lt;/P&gt;&lt;P&gt;&amp;#149; datatype (data type)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference&lt;/P&gt;&lt;P&gt;Program field data type&lt;/P&gt;&lt;P&gt;&amp;#149; ddic_outputlen (external output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-INTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-INTLEN&lt;/P&gt;&lt;P&gt;n = external format field output length&lt;/P&gt;&lt;P&gt;The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).&lt;/P&gt;&lt;P&gt;&amp;#149; intlen (internal output length)&lt;/P&gt;&lt;P&gt;value set: 0 (initial), n&lt;/P&gt;&lt;P&gt;Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit. &lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-EDIT_MASK = '==conv'&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-EDIT_MASK&lt;/P&gt;&lt;P&gt;&amp;#149; FIELDCAT-DDIC_OUTPUTLEN = n&lt;/P&gt;&lt;P&gt;see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN&lt;/P&gt;&lt;P&gt;n = internal format field output length&lt;/P&gt;&lt;P&gt;&amp;#149; rollname (data element)&lt;/P&gt;&lt;P&gt;value set: SPACE, Data Dictionary data element name&lt;/P&gt;&lt;P&gt;F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.&lt;/P&gt;&lt;P&gt;When F1 help is called for this field, the documentation of the specified data element is displayed.&lt;/P&gt;&lt;P&gt;If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Others&lt;/P&gt;&lt;P&gt;&amp;#149; sp_group (field group key)&lt;/P&gt;&lt;P&gt;value set: SPACE, CHAR(1)&lt;/P&gt;&lt;P&gt;Field group key.&lt;/P&gt;&lt;P&gt;Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).&lt;/P&gt;&lt;P&gt;When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.&lt;/P&gt;&lt;P&gt;&amp;#149; reprep (Report/Report interface selection criterion)&lt;/P&gt;&lt;P&gt;value set: SPACE, 'X'&lt;/P&gt;&lt;P&gt;Prerequisites:&lt;/P&gt;&lt;P&gt;&amp;#149; The system contains the Report/Report interface (function group RSTI, table TRSTI)&lt;/P&gt;&lt;P&gt;&amp;#149; Parameter LAYOUT-REPREP = 'X'&lt;/P&gt;&lt;P&gt;(see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )&lt;/P&gt;&lt;P&gt;'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.&lt;/P&gt;&lt;P&gt;2.7.2. Default&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; ref_tabname&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;ALV gets the remaining information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.&lt;/P&gt;&lt;P&gt;REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.&lt;/P&gt;&lt;P&gt;Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.&lt;/P&gt;&lt;P&gt;Priority rule:&lt;/P&gt;&lt;P&gt;Entries in the field catalog have priority over differing entries in the Data Dictionary.&lt;/P&gt;&lt;P&gt;&amp;#149; The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):&lt;/P&gt;&lt;P&gt;&amp;#149; fieldname&lt;/P&gt;&lt;P&gt;&amp;#149; outputlen&lt;/P&gt;&lt;P&gt;&amp;#149; datatype&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_s&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_m&lt;/P&gt;&lt;P&gt;&amp;#149; seltext_l&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.&lt;/P&gt;&lt;P&gt;If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sites :&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Check out these links : top one is on slis specifcally,&lt;/P&gt;&lt;P&gt;&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="2240494"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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="1509398"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV reporting - Step by step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through with these links :&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Abap_programs.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Abap_programs.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV Group Heading&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/fu037.htm" target="test_blank"&gt;http://www.sap-img.com/fu037.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALVGRID with refresh&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm" target="test_blank"&gt;http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editable ALV&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;download the PDF from following link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.abap4.it/download/ALV.pdf" target="test_blank"&gt;www.abap4.it/download/ALV.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OOPS ALV tutorial.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample programs:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alvhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alvhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get all demo programs for ALV:&lt;/P&gt;&lt;P&gt;Go to se38 and type BCALV* and press F4 for all demo porgrams.&lt;/P&gt;&lt;P&gt;Check out these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-alv-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-alv-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/alv&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/an-interactive-alv-report.htm" target="test_blank"&gt;http://www.sap-img.com/abap/an-interactive-alv-report.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/user/view/cs_msg/18628&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 05:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2770986#M645644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T05:41:53Z</dc:date>
    </item>
  </channel>
</rss>

