You are on page 1of 29

ALV REPORTS: Which is used to displayed the output with predefined functionality such as 1.

Sort list in ascending order 2.Sort list descending order 3. Toatals 4.Filtering 5.Down the list 6.Change the layout 7.Send as attachment 8.word processing 9.Excel sheet 10.Print preview 11.Graphics Function modules that are used in ALV reports: 1.REUSE_ALV_LIST_DISPLAY 2.REUSE_ALV_GRID_DISPLAY 3.REUSE_ALV_EVENT_GET 4.REUSE_ALV_COMMENTRY_WRITE 5.REUSE_ALV_FIELDCATALOG_MERGE 6.REUSE_ALV_VARIANT_DEFAULT_GET 7.REUSE_ALV_VARIANT_F4 8.REUSE_ALV_VARIANT_EXISTENCE 9.REUSE_ALV_POPUP_TO_SELECT 10.REUSE_ALV_BLOCK_LIST_INIT 11.REUSE_ALV_BLOCK_LIST_APPEND 12.REUSE_ALV_BLOCK_LIST_DISPLAY

13.REUSE_ALV_HIERSEQ_LIST_DISPLAY

Field Catalog: is a structure for populate the fieldnames in ALV report we are using the field catalog structure Here we need to fill the field catalog Some of the fields of fieldcatalog: 1.Fieldname – field name 2.col_pos 3. Seltext_l Seltext_s 4.Emphasize – color 5.Edit – changeable mode 6. Hotspot – Handle symbol 7.No_sign – Remove the leading sign 8.No_zero – Remove the leading zero’s 9.No_output – Hide the field 10.Outputlen – Length of the displayed field 11.Tabname – Internal table name - column position column heading

Detail description of REUSE_ALV_LIST_DISPLAY and REUSE_ALV_GRID_DISPLAY:

<!--[if !supportLists]-->1. <!--[if !supportLists]-->2.

<!--[endif]-->REUSE_ALV_LIST_DISPLAY <!--[endif]-->REUSE_ALV_GRID_DISPLAY

The other function module is used to display the internal output table with the contents FUNCTION reuse_alv_list_display. *"----------------------------------------------------------------------

*"*"Lokale Schnittstelle: *” IMPORTING *" *" *" *" *" *" *" *" *" *" *" *" *" *" *" *" " " " " " " " " VALUE(I_INTERFACE_CHECK) DEFAULT SPACE VALUE(I_CALLBACK_PROGRAM) LIKE SY-REPID DEFAULT SPACE VALUE(I_CALLBACK_PF_STATUS_SET) TYPE SLIS_FORMNAME DEFAULT SPACE VALUE(I_CALLBACK_USER_COMMAND) TYPE SLIS_FORMNAME DEFAULT SPACE VALUE(I_STRUCTURE_NAME) LIKE DD02L-TABNAME OPTIONAL VALUE(IS_LAYOUT) TYPE SLIS_LAYOUT_ALV OPTIONAL VALUE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV OPTIONAL VALUE(IT_EXCLUDING) TYPE SLIS_T_EXTAB OPTIONAL VALUE(IT_SPECIAL_GROUPS) TYPE SLIS_T_SP_GROUP_ALV OPTIONAL VALUE(IT_SORT) TYPE SLIS_T_SORTINFO_ALV OPTIONAL VALUE(IT_FILTER) TYPE SLIS_T_FILTER_ALV OPTIONAL VALUE(IS_SEL_HIDE) TYPE SLIS_SEL_HIDE_ALV OPTIONAL VALUE(I_DEFAULT) DEFAULT 'X' VALUE(I_SAVE) DEFAULT SPACE VALUE(IS_VARIANT) LIKE DISVARIANT STRUCTURE DISVARIANT DEFAULT SPACE VALUE(IT_EVENTS) TYPE SLIS_T_EVENT OPTIONAL VALUE(IT_EVENT_EXIT) TYPE SLIS_T_EVENT_EXIT OPTIONAL VALUE(IS_PRINT) TYPE SLIS_PRINT_ALV OPTIONAL VALUE(IS_REPREP_ID) TYPE SLIS_REPREP_ID OPTIONAL VALUE(I_SCREEN_START_COLUMN) DEFAULT 0 .

I_CALLBACK_USER_COMMAND: EXIT routine for command handling I_STRUCTURE_NAME: Internal output table structure name IS_LAYOUT: List layout specifications IT_FIELDCAT: Field catalog with field descriptions IT_EXCLUDING: Table of inactive function codes IT_SPECIAL_GROUPS: Grouping fields for column selection IT_SORT: Sort criteria for first list display IT_FILTER: Filter criteria for first list output IS_SEL_HIDE I_DEFAULT: : Selection information modification Initial variant active/inactive logic I_SAVE: Variants can be saved ." " " " " " " " " " VALUE(I_SCREEN_START_LINE) DEFAULT 0 VALUE(I_SCREEN_END_COLUMN) DEFAULT 0 VALUE(I_SCREEN_END_LINE) DEFAULT 0 EXPORTING VALUE(E_EXIT_CAUSED_BY_CALLER) VALUE(ES_EXIT_CAUSED_BY_USER) TYPE SLIS_EXIT_BY_USER TABLES T_OUTTAB EXCEPTIONS PROGRAM_ERROR Import parameters I_INTERFACE_CHECK: Interface consistency check log output. I_CALLBACK_PROGRAM: Name of the calling program I_CALLBACK_PF_STATUS_SET: Set EXIT routine to status.

IS_VARIANT : Variant information IT_EVENTS: Table of events to perform IT_EVENT_EXIT : Standard fcode exit requests table IS_PRINT: Print information IS_REPREP_ID: Initialization keys for Re/Re interface I_SCREEN_START_COLUMN: Coordinates for list in dialog box I_SCREEN_START_LINE: Coordinates for list in dialog box I_SCREEN_END_COLUMN: Coordinates for list in dialog box I_SCREEN_END_LINE: Coordinates for list in dialog box IT_EVENT_EXIT: Standard fcode exit requests table IS_PRINT: Print information IS_REPREP_ID: Initialization keys for Re/Re interface I_SCREEN_START_COLUMN: Coordinates for list in dialog box I_SCREEN_START_LINE: Coordinates for list in dialog box I_SCREEN_END_COLUMN: Coordinates for list in dialog box I_SCREEN_END_LINE: Coordinates for list in dialog box Export parameters E_EXIT_CAUSED_BY_CALLER: Delete list in CALLBACK_USER_COMMAND ES_EXIT_CAUSED_BY_USER: How the user left the list Tables T_OUTTAB: Table with data to be displayed ---mandatory Documentation on function module: REUSE_ALV_GRID_DISPLAY The function module outputs an internal table with whatever structure in the form of a formatted single.or multi-line list.Passing an internal table with the set of information to be output 2. Process: 1.Passing a structure with general layout specifications for list layout .

also involves a resorting of the internal output table passed (since it was passed by reference).All interactions performed on the list refer directly to the internal output table. Notes: 1.An important factor determining the usability of the tool or of various generic functions (totals.3. 2. Sorting the list. subtotals) is the expected amount of data to be displayed. Parameters : I_INTERFACE_CHECK I_BYPASSING_BUFFER I_BUFFER_ACTIVE I_CALLBACK_PROGRAM I_CALLBACK_PF_STATUS_SET I_CALLBACK_USER_COMMAND I_CALLBACK_TOP_OF_PAGE I_CALLBACK_HTML_TOP_OF_PAGE I_CALLBACK_HTML_END_OF_LIST I_STRUCTURE_NAME I_BACKGROUND_ID I_GRID_TITLE I_GRID_SETTINGS IS_LAYOUT IT_FIELDCAT IT_EXCLUDING . for example.Passing a field catalog in the form of an internal table The field catalog describes the fields to be output in the list.

function group. you must absolutely assign this name to an auxiliary variable and pass this variable to the interface. If field SY-REPID contains the desired program name.IT_SPECIAL_GROUPS IT_SORT IT_FILTER IS_SEL_HIDE I_DEFAULT I_SAVE IS_VARIANT IT_EVENTS IT_EVENT_EXIT IS_PRINT IS_REPREP_ID I_SCREEN_START_COLUMN I_SCREEN_START_LINE I_SCREEN_END_COLUMN I_SCREEN_END_LINE IT_ALV_GRAPHICS IT_ADD_FIELDCAT IT_HYPERLINK E_EXIT_CAUSED_BY_CALLER ES_EXIT_CAUSED_BY_USER I_CALLBACK_PROGRAM:Name of the calling program Program from which the function module is called and that contains the exit routines. . module pool or form routine pool (it should not be an include). The program should always be a report. Caution: Never pass SY-REPID directly at the interface.

The interface of the form routine specified must be defined as follows: FORM set_pf_status USING rt_extab TYPE slis_t_extab Table RT_EXTAB contains the function codes that would be hidden on the standard user interface. we recommend that you copy standard status STANDARD from function group SALV and modify it accordingly. The routine is called whenever the standard user interface would be set with SET PFSTATUS. See also the documentation on parameter I_CALLBACK_USER_COMMAND. If a self-defined user interface is used that includes function codes of the standard user interface. ALV standard function codes always start with '&'. If the caller wants to use a self-defined user interface (for example. Default If no EXIT routine is specified. This means that the user status should generally be set as follows: SET PF-STATUS user status EXCLUDING rt_extab. I_CALLBACK_USER_COMMAND EXIT routine for command handling Description . the function codes of the excluding table passed should be taken into account. in order to provide additional list functions or use existing functions).I_CALLBACK_PF_STATUS_SET: Set EXIT runtime to status Passing an EXIT routine indicates to the ALV that the caller wants to set a selfdefined user status. the ALV sets a status that corresponds to status STANDARD of function group SALV. Application functions can be added to excluding table rt_extab if they are to be disabled. As a result. the default status of the ALV is not set.

Passing an EXIT routine indicates to the ALV that the application wants to respond to certain function codes. before list ignore_multi sel_tab_field : Internal use : Internal use The EXIT routine is called whenever a function unknown to the ALV is triggered or if the routine call before/after the execution of a standard function code has been defined by interface parameter IT_EVENT_EXIT. Generally. The interface of the form routine specified must be defined as follows: FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield. the cursor is located on a subtotals line : Value of the field on the list : (Exporting) List should be set up again : (Exporting) Keep column position when list is set up again row_stable : (Exporting) Keep row position when list is set up again exit before_action : (Exporting) Exit list (and ALV) : Call before standard action execution setup after_action : Call after standard action execution. Parameter R_UCOMM contains the function code triggered. See also the documentation on parameter I_CALLBACK_PF_STATUS_SET. . are not standard ALV functions) and that were defined and set by a user status. Structure RS_SELFIELD contains the following information: tabname tabindex fieldname endsum sumindex value refresh col_stable : Name of the internal output table : Index of the internal output table : Field name : Cursor is located on the totals line : If >0. these are function codes that are unknown to the ALV (that is.

this routine must have the FORM top_of_page.See also the documentation on parameter IT_EVENT_EXIT. If module REUSE_ALV_COMMENTARY_WRITE cannot be used. The form should then have the following format: form top_of_page using cl_dd type ref to cl_dd_document. the output table field designated as the checkbox contains the current state of the checkbox in the list. is passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE. you must use two parameters instead. In I_CALLBACK_TOP_OF_PAGE you pass the form routine that is responsible for normal formatting in batch mode or in the print preview mode. The form routine that is responsible for online formatting. In the print preview or in batch mode. The function code and the current cursor position are then passed on to the calling program through the EXIT routine. the text passed is then output in the normal format. If the user has selected multiple rows by selecting checkboxes. top-ofpage is not output in the respective mode. This module is responsible for formatting the header information and also ensures online TML formatting. I_CALLBACK_TOP_OF_PAGE EXIT routine for handling TOP-OF-PAGE Description If the caller specifies an EXIT routine. following form: . the form routine must be passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE for the online mode. I_CALLBACK_HTML_TOP_OF_PAGE EXIT routine for HTML TOP-OF-PAGE Description If function module REUSE_ALV_COMMENTARY_WRITE is not used in the form for CALLBACK_TOP_OF_PAGE. Module REUSE_ALV_COMMENTARY_WRITE can then be called within the EXIT routine. If one of these parameters is not filled.

see the documentation on function module REUSE_ALV_FIELDCATALOG_MERGE. you can automatically set up the field catalog by passing the structure name. use methods of class CL_DD_DOCUMENT to display text in HTML format.All fields are on the list (NO_OUT = SPACE) except fields of data type CLNT. The field catalog is then internally set up for this structure as follows: 1. The 2. 4. 3. For more information on how to set up the field catalog automatically. References to unit fields stored in the Dictionary are adopted provided that the reference fields are contained in the structure. I_STRUCTURE_NAME Internal output table structure name Description If the internal output table is defined through an ABAP Dictionary structure (INCLUDE STRUCTURE struct or LIKE struct). for example. you can. I_GRID_SETTINGS Used for Grid settings . I_CALLBACK_HTML_END_OF_LIST EXIT routine for HTML END-OF-LIST Description In this parameter. end-of-list. This text is displayed above the grid.If you additionally pass a field catalog as parameter. you can pass a form for the online handling of form must have the followiong format: form end_of_list using cl_dd type ref to cl_dd_document. I_GRID_TITLE: Control title Description : Specifies the title of the control. the structure information is merged with this field catalog.In the form.The key fields of the Dictionary structure are adopted in the field catalog as key fields.

'X' X' = Optimizes the column width to ensure that the content is displayed completely.Description If Top-of-Page or End-of-List are output online. Display options colwidth_optimize Value range: SPACE. you use two fields: COLL_TOP_P: Sets Top-of-Page to 0% COLL_END_L: Sets End-of-List to 0% IS_LAYOUT List layout specifications Description Structure for describing the list to be output. The parameters are described and grouped based on the following categories: Display options Exceptions Totals Interaction Detail screen Color Other Note the section on pre-defined settings. these areas are displayed in a splitter above or below the list. To do this. . Using I_GRID_SETTINGS you can reduce the default size to 0%. no_colhead Value range: SPACE. 'X' 'X' = Do not output column headings.

The structure of the internal table to be output corresponds to a structure stored in the Data Dictionary and is referenced with LIKE or INCLUDE STRUCTURE in the declaration of the internal table. .The structure name is declared to the ALV using parameter I_STRUCTURE_NAME. The minimum values required for the field catalog are documented in the 'Default' section. IT_FIELDCAT Field catalog with field descriptions Description Field catalog containing the field descriptions of the fields to be considered for the list output (usually. 'X' 'X' = Striped pattern (for wide lists.zebra Value range: SPACE. The caller can optionally use all other parameters to assign non-standard output attributes to a field. this is a subset of the fields in the internal output table). you need a field catalog for each list output that uses the ALV. 3. 2. Basically. 'X' 'X' = Separate columns by SPACE. You can generate the field catalog automatically or semi-automatically by calling function module REUSE_ALV_FIELDCATALOG_MERGE. See also the documentation on function module : REUSE_ALV_FIELDCATALOG_MERGE. The field catalog associated with the output table is generated in the code of the caller. It is only in the following cases that you are not required to generate the field catalog and pass it explicitly: 1. for example) no_vline Value range: SPACE.All fields of this structure should be output in the list. See also the documentation on IMPORTNG parameter I_STRUCTURE_NAME.

1 . parameter) Field name of the field in the internal output table that is described by this . name of a field in the Data Dictionary Name of the referenced field in the Data Dictionary. name of a structure or table in the Data Dictionary Structure or table name of the referenced field in the Data Dictionary. it is sufficient to specify the Data Dictionary structure or table in parameter FIELDCAT-REF_TABNAME. The column sequence can interactively be changed by the user. The parameter determines the relative column position of the field in the list output.col_pos (column position) Value range: 0. Identification fieldname (field name) Value range: Field name of the internal output table (required field catalog entry. If both field names are identical. is not a program field) and if the field name in the internal output table is not identical to the field name of the field in the Data Dictionary. the columns are arranged in the order of the fields in the field catalog. If this parameter is set to its initial value for each field catalog entry.Positioning 1. Reference to the Data Dictionary ref_fieldname (field name of the reference field) Value range: SPACE. ref_tabname (field name of the reference table/structure) Value range: SPACE.60 Only relevant if the relative column positions should by default not be identical to the sequence of the fields in the field catalog. This parameter is only required if the field in the internal output table that is described by the current entry in the field catalog has a reference to the Data Dictionary (that is.

This parameter is only required if the field in the internal output table that is described by the current entry in the field catalog has a reference to the Data Dictionary (that is. is not a program field). (If the unit should not be displayed as a column in the list and the user should not be able to show the unit interactively.There is one field in the internal output table that contains the relevant unit. the unit SPACE has no effect on the homogeneity of the unit if the value field is initial. . the unit SPACE is considered as a unit when unit-specific totals are calculated. .The decimal places are displayed with the proper unit. (Physically. this has the following effects when the list is output: . because the unit is always unique and therefore explicitly output by the caller in the list header. If a value field has a reference to a unit. then you can assign parameter FIELDCAT-TECH = 'X' to the field catalog entry for the unit field. . Reference to the currency unit Cfieldname (field name of the currency unit field) Value range: SPACE. If unit-specific totals are calculated for this value field. the field must Actually belong to this data type.There is also an entry for the unit field in the field catalog. name of a field of the output table Only relevant to amount columns with unit reference. .For non-initial value fields with initial unit. If unitspecific totals are calculated for this value field. the unit is considered in the analysis of whether homogeneous units exist. Reference to fields with currency units/units of measure Each amount or quantity field of the internal output table whose decimal places are to be displayed with the proper unit in the list output.An initial value field with reference to an initial unit is displayed as SPACE.An initial value field with reference to a non-initial unit is displayed as '0' (provided that FIELDCAT-NO_ZERO is initial).) . must comply with the following conventions: -The field is of data type QUAN or CURR (internal type P).Overriding the physical data type with parameter FIELDCAT-DATATYPE has no effect. . for example.

initial = The column width is derived from the output length of the referenced field (domain) in the Data Dictionary. name of a field of the output table Only relevant to quantity columns with unit reference. n = The column width is n characters. n For fields with reference to the Data Dictionary you can leave this parameter set to initial. For exceptions. 'X' 'X' = Key field (colored output for key fields) Key fields cannot be hidden interactively by the user. Output options for a column outputlen (column width) Value range: 0 (initial). Reference to the unit of measure qfieldname (field name of the unit of measure field) Value range: SPACE. . There must be a separate field catalog entry for the field specified in FIELDCAT-QFIELDNAME. There must be a separate field catalog entry for the field specified in FIELDCAT-CFIELDNAME. Field name of the field in the internal output table that contains the unit of measure for the amount field FIELDCAT-FIELDNAME. see the documentation on parameter FIELDCAT-KEY_SEL. For fields without reference to the Data Dictionary (program fields) you must set the parameter to the desired field output length on the list (column width). Parameter FIELDCAT-NO_OUT must be left set to initial.Field name of the field in the internal output table that contains the currency unit for the amount field FIELDCAT-FIELDNAME. key (key column) Value range: SPACE.

y... The field is available to the user in the field list and can be interactively selected as a display field. The field may only be used in the field catalog (not in IT_SORT. See also the documentation on the 'Detail screen' section of parameter IS_LAYOUT. At row level. 'X' 'X' = Technical field The field cannot be output on the list and cannot be shown interactively by the user. no_out (field in the available fields list) Value range: SPACE. tech (technical field) Value range: SPACE. output control is performed using parameter FIELDCAT-NO_OUT.. 'X' Only relevant if FIELDCAT-KEY = 'X' Key field that can be hidden interactively by the user. 'X' 'X' = Field is not displayed on the current list. emphasize (highlight column in color) Value range: SPACE. As with non-key fields. 'X' or 'Cxyz' (x:'1'-'9'. The user cannot interactively change the sequence of the key columns.). the user can use the detail function to display the content of these fields.z: '0'=off '1'=on) 'X' = The column is highlighted in the default color for color .key_sel (key column that can be hidden) Value range: SPACE.

no_sum (totals calculation not allowed) Value range: SPACE. 'Cxyz' = The column is highlighted in the coded color: .C: Color (coding must start with C) . symbol (symbol) . 'X' 'X' = The cells of the column are output as a hotspot. 'X' 'X' = Totals are calculated for this field of the internal output table. The column contents of the internal output table must consist of valid icon strings (@xx@). The caller should consider the problem of printing icons.z: Inverse hotspot (column as hotspot) Value range: SPACE. 'X' 'X' = No totals may be calculated for this field although the data type of the field allows totalling.highlighting. 'X' 'X' = The column contents are displayed as an icon. Formatting column contents icon (icon) Value range: SPACE.y: Intensified . This function can also be used interactively by the user.x: Color number . do_sum (calculate totals for column) Value range: SPACE.

just (justification) Value range: SPACE. 'X' Only relevant to fields of data type NUMC By default. 'L'. Although symbols can generally be printed. 'X' 'X' = The column contents are output as a symbol. 'R'. The column contents of the internal output table must consist of valid symbol characters. 'X' = Output with leading zeros no_sign (no +/. lzero (leading zeros) Value range: SPACE. NUMC fields are output in the ALV right-justified without leading zeros. 'C' Only relevant to fields of data type CHAR or NUMC ' ' = Default justification according to data type 'R' = Right-justified output 'L' = Left-justified output 'C' = Centered output The justification of the column header depends on the justification of the column contents.sign) Value range: SPACE. they are not always shown correctly depending on the printer configuration. The caller should consider the problem of printing symbols. 'X' Only relevant to value fields .Value range: SPACE. You cannot justify the column header independently of the column contents.

signs. If you do not want this. mask mask = See documentation on the WRITE formatting option USING EDIT MASK mask Using mask = '== conv' you can force an output conversion conv. the text with the appropriate length is always used as the column header. and so on. both the field contents and the column headings are considered for the list output: If all field contents are shorter than the shortest column heading. 1. The long field label is also used in the dialog boxes for defining the display variant. If you do this. 'X' Only relevant to value fields 'X' = Supress zeros edit_mask (field formatting) Value range: SPACE. the texts are retrieved from the Data Dictionary. Texts The following parameters for texts are always required for program fields without reference to the Data Dictionary. For fields with reference to the Data Dictionary.seltext_l (long field label) . If the user optimizes the column width interactively.'X' = Value output without +/. If the user changes the column width interactively. no_zero (suppress zeros) Value range: SPACE. the corresponding texts from the Data Dictionary will be ignored. the sort order. you can fill the text parameters also for fields with reference to the Data Dictionary. the column width is set based on the column heading.

seltext_m (medium field label) 3. 'S'. Prerequisites: .FIELDCAT-INTLEN = n .reptext_ddic (heading) Same as the 'heading' for data element maintenance. 'M'.. If the column width is changed. datatype (data type) Value range: SPACE. Parameter for program fields without reference to the Data Dictionary See also the parameter in the 'Texts' section. ddictxt (determine text) Value range: SPACE. NUMC. 'R' you can predefine the keyword that should always be retrieved as the column header.) Only relevant to fields without reference to the Data Dictionary. 'M'.. the system tries to find a heading that fits the new output width.seltext_s (short field label) 4. the system does not necessarily retrieve the text stored here. but uses the text that fits best. 'R' Using possible values 'L'. data type from the Data Dictionary (CHAR. 'L'. Data type of program field ddic_outputlen (external output length) Value range: 0 (initial). 'S'.FIELDCAT-EDIT_MASK = '==conv' See also the documentation on parameter FIELDCAT-EDIT_MASK . When the list is output. n Only relevant to fields without reference to the Data Dictionary whose output should nevertheless be modified using a conversion exit.2..

Prerequisites: .FIELDCAT-DDIC_OUTPUTLEN = n See also the documentation on parameter FIELDCAT-DDIC_OUTPUTLEN n = Field output length of the internal display rollname (data element) Value range: SPACE. FIELDCAT-ROLLNAME is initial. the documentation for the data element of the referenced field in the Data Dictionary is displayed. name of a data element from the Data Dictionary You can use this parameter to provide an F1 help for a program field without reference to the Data Dictionary or to provide an F1 help other than that of the Data Dictionary for a field with reference to the Data Dictionary.See documentation on parameter FIELDCAT-INTLEN n = Field output length of the external display The column width FIELDCAT-OUTPUTLEN must not be equivalent to the output length of the external display (FIELDCAT-DDIC_OUTPUTLEN). If. for fields with reference to the Data Dictionary.FIELDCAT-EDIT_MASK = '==conv' See also the documentation on parameter FIELDCAT-EDIT_MASK . intlen (internal output length) Value range: 0 (initial). When the F1 help is called for this field. n Only relevant to fields without reference to the Data Dictionary whose output should nevertheless be modified using a conversion exit. . the documentation for the data element assigned is displayed.

seltext_l If you assign a data element to parameter ROLLNAME. character is the default) .fieldname . For internal table fields without reference to the Data Dictionary (program fields). REF_FIELDNAME must only be specified if the field name of the internal table field is not identical to the field name of the referenced fieldin the Data Dictionary. IT_EXCLUDING Table of inactive function codes Description .datatype (without data type. implement an F1 help for program fields. it is normally sufficient to make the following specifications: . you can.seltext_s .outputlen . it is normally sufficient to make the following specifications: . Priority rule: Specifications made in the field catalog take priority over specifications in the Data Dictionary. If you do not specify the relative column position (COL_POS).fieldname .ref_tabname Note:All fields not explicitly mentioned here are either not relevant in this context or are not released. the fields are output in the list in the order in which they were added to the field catalog.Default For internal table fields with reference to a field defined in the Data Dictionary. All other information is retrieved by the ALV from the Data Dictionary. for example.

If no complete breakdown but only a breakdown to totals level n that can be further expanded by the user should be displayed when the list is output for the first time. In this case. that is. The following fields of this internal table must be filled: <!--[if !supportLists]-->· <!--[if !supportLists]-->· output table <!--[if !supportLists]-->· <!--[if !supportLists]-->· <!--[if !supportLists]-->· changes <!--[if !supportLists]-->· <!--[if !supportLists]-->· <!--[if !supportLists]-->· <!--[if !supportLists]-->· criterion is also the <!--[if !supportLists]-->· <!--[endif]-->spos: Sort order <!--[endif]-->fieldname: Field name in the internal <!--[endif]-->up: 'X' = Sorted in ascending order <!--[endif]-->down: 'X' = Sorted in descending order <!--[endif]-->subtot: 'X' = Subtotals for control level <!--[endif]-->comp (INTERNAL USE ONLY) <!--[endif]-->expa <!--[endif]-->Prequisite: <!--[endif]-->IT_SORT-SUBTOT = 'X'. IT_SORT Sort criteria for first list display Description Using internal table IT_SORT. you must set the indicator for the totals level criterion of level n. .Optional IMPORTING parameter IT_EXCLUDING is an internal table. the sort <!--[endif]-->subtotals criterion. You must only fill this table if the caller uses the standard interface of the list tool but does not need certain interface functions and therefore wants to disable them. you must enter the function codes of these standard functions into the table. the caller determines the sort order and/or the subtotalling of the basic list.

to list output.IT_FILTER Filter criteria for first list output Description Table with filter criteria Using this parameter. Value Range: SPACE = Definition of initial variants not allowed 'X' = Definition of initial variants allowed Default : I_SAVE Variants can be saved Description: Controls the save mode Prerequisite: Parameter IS_VARIANT is filled accordingly. for example. This table should never be set up 'manually'. SPACE . IS_SEL_HIDE Selection information modification Description This parameter is currently not supported! Only relevant if layout parameter LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set. Complex type for modifying information displayed on the selection dialog I_DEFAULT Initial variant active/inactive logic Description Initial variant maintenance active/inactive. you can pass on filter criteria resulting from explicitly loading a display variant in advance. . Prerequisite: Parameter IS_VARIANT is filled accordingly. See also the documentation on the IMPORTING parameter IS_VARIANT.

Default : SPACE .See also the documentation on IMPORTING parameter IS_VARIANT. IS_VARIANT Variant information Description: This structure is only relevant if display variants are to be saved and/or read. However. o 'X' = Standard save mode Display variants can be saved as standard display variants. changes cannot be saved. o 'U' = User-specific save mode Display variants can only be saved as user-specific. Variant information including the name of the list variant that is used to output the list. . Saving display variants as user-specific is not possible. o 'A' = Standard and user-specific save mode Display variants can be saved both as user-specific and as standard variants. Value Range o ' ' = Display variants cannot be saved Defined display variants (such as delivered display variants) can be selected for presentation regardless of this indicator. Users make their choice on the dialog box for saving the display variant.

The logical group. The logical group is a CHAR(4) that must be uniquely defined and specifies the assignment. for example.The handle (HANDLE). HANDLE (optional field) and/or LOG_GROUP (optional field). you must specify the acess path using fields REPORT (required field). A variant is uniquely described through: <!--[if !supportLists]-->1. the same list is created with different settings through various transactions (LOG_GROUP). You provide this function to the user by assigning a HANDLE to each list. The user should be able to define display variants for each type of list. the handle must not be modified any more. for example. See also the documentation on IMPORTING parameter I_SAVE.To allow display variants to be read within the ALV. 3. multiple lists with different structures and data are called in a program (I_CALLBACK_PROGRAM). Depending on the . assigned (REPORT) <!--[endif]-->The program to which the variant is 2. The handle is a CHAR(4) field that must be uniquely defined and describes the assignment of the call to the current structure of the internal output table. you must additionally fill parameter I_SAVE accordingly. if. if. Example: Program x is called through transactions T1 and T2. Example: Depending on the user interaction. If variants for the program and the handle are saved. if you also want to allow display variants to be saved. several types of lists can be output in program x.

If variants for the program and the logical group are saved. the fields available to the user through the field catalog differ in their assignment to different logical groups. Default: If the structure is initial. Note: 1. . function module REUSE_ALV_VARIANT_F4 is available.SLIS is the type group which contains all the types related to ALV 2. if user-specific variants are saved (USERNAME). you must specify the above fields. You do not have to fill this parameter manually since the variant name is unique.In SLIS we have one type SLIS_T_FIELDCAT_ALV which contains all the fields related to field catalog so we simply declare our field catalog internal table by referring SLIS_T_FIELDCAT_ALV 3. but saving is active (I_SAVE is not initial).The variant name (VARIANT). For a possible entries help for variants. You only have to fill this parameter if this structure is to be used to read a concrete variant and the list is to be output with this variant.The user name.whenever we refer any type group types under type group then we must include the types group name in the program Syntax for declaring the type group in the SE38 program: TYPE-POOLS <Type pool name>. 4.transaction code. 5. the logical group must not be modified any more. then IS_VARIANT-REPORT = I_CALLBACK_PROGRAM is set. Value Range: To call a list with a variant. EX: TYPE_POOLS SLIS.

99 .html#X7eiDWahfGcmbmt0.blogspot.Read more at http://sapabap-freshers.html.com/2012/11/alvreports.