Functionality This module outputs an internal table with any structure as a formattedone-line or multiple-line list. Principle:
- Pass an internal table with the set of output information
- Pass a structure with general list layout details
- Pass a field catalog as an internal table
The field catalog describes the fields to be output in the list.Notes
- All actions on the list refer directly to the internal output table,
e.g. sorting the list also sorts the passed internal output table(passed by reference).
- An important consideration for the use of the tools and certain generic
functions (totals, subtotals) is the expected amount of data to bedisplayed. The application must take this consideration into account.Further information Description If one of the ALV standard function codes for 'Back', 'Cancel' or'Exit' occurs, the current list is discarded and the ALV functionmodule ends. In this case the exporting structureES_EXIT_CAUSED_BY_USER contains one of the following flags:
- ES_EXIT_CAUSED_BY_USER-BACK = 'X' 'Back' occurred
- ES_EXIT_CAUSED_BY_USER-CANCEL = 'X' 'Cancel' occurred
- ES_EXIT_CAUSED_BY_USER-EXIT = 'X' 'Exit' occurred
The function which occured determines the further navigation in theapplication.Description Parameter which states whether the caller left the list (SELFIELD-EXIT= 'X') in CALLBACK USER_COMMAND Description Internal: Do not use !!! Description Output list description structure. The parameters are described under the following headers:
- Display options
- Exceptions
- Totals
- Interaction
- Detail screen
- Display variants (only for hierarchical-sequential lists)
- Color
- Other
Note the section 'Default'. Display options
- colwidth_optimize
value set: SPACE, 'X' 'X' = optimzes the column width so that all contents are displayedcompletely.
- no_colhead
value set: SPACE, 'X' 'X' = column headers are not output
- zebra
value set: SPACE, 'X' 'X' = striped pattern (e.g. for wide lists)
- no_vline
value set: SPACE, 'X' not relevant for: hierarchical-sequential lists and multiple-linelists. 'X' = columns separated by SPACE
- no_min_linesize
value set: SPACE, 'X' not relevant for block lists 'X' = line size depends on list width ' ' = line size is set to 80 or MIN_LINESIZE (if > 0) .
- min_linesize
value set: 0, 10 - 250 minimum width of the list (to change default of 80) If the list is wider, the format uses the list width (maximum 250 orMAX_LINESIZE (if > 0)). prerequisite: no_min_linesize = ' '.
- max_linesize
value set: 0, 80 - 1020 maximum list width (to change the default of 250) interactively-definable maximum list width setting. Caution: wide lists are difficult to read and to print. Exceptions
- lights_fieldname
value set: SPACE, internal output table field name internal output table field containing the codes of exceptions to beoutput. Output table field code: '1' = red traffic light '2' = yellow traffic light '3' = green traffic light
- lights_tabname
value set: SPACE, internal output table name Only relevant for hierarchichal-sequential lists. Name of the internal output table which contains the field in theparameter LIGHTS_FIELDNAME. If LIGHTS_FIELDNAME is not empty, this field must also be filled forhierarchical-sequential lists.
- lights_rollname
value set: SPACE, data element name The documentation of this data element is displayed when you call F1help for an exception column.
- lights_condense
value set: SPACE, 'X' 'X' = the 'maximum' exception of the items in the subtotal is output atsubtotal level. Ex.: if a list record is output with 'red traffic light', each subtotalwhich includes this record is also output with 'red traffic light'. Totals
- no_sumchoice
value set: SPACE, 'X' 'X' = fields which are to be summed, passed by the calling program(FIELDCAT-DO_SUM = 'X'). The user should not be able to change thisvalue interactively.
- no_totalline
value set: SPACE, 'X' 'X' = no total record is to be output. Subtotals can still becalculated and output. The fields in the subtotals are flagged DO_SUM ='X' in the field list.
- no_subchoice
value set: SPACE, 'X' 'X' = value whose change triggers subtotals, provided by the callingprogram The user should not be able to change this value interactively. See also the documentation of the IMPORTING parameterIT_SORT>.
- no_subtotals
value set: SPACE, 'X' 'X' = no subtotals.
- totals_only
value set: SPACE, 'X' 'X' = only total records are output. an interactive breakdown of simple and hierarchical-sequential lists ispossible. prerequisite: the IMPORTING parameter IT_SORT contains the sortcriteria and subtotal flags. See also the documentation of the IMPORTING parameterIT_SORT>.
- totals_text
value set: SPACE, string(max.60) ' ' = the first column in the total record contains an appropriatenumber of '*'s to indicate the total by default. If the first column iswide enough, the string 'Total' is output after the asterisks. 'string' = the string passed is output after the total indicated by'*', if the column is wide enough.
- subtotals_text
value set: SPACE, string(max.60) ' ' = in the first column of subtotal records, the subtotal isindicated by an appropriate number of '*' by default. If the firstcolumn is not a subtotal criterion, the string 'Total' is output afterthe asterisks, if the column is wide enough. 'string' = the string passed is output after the subtotal indicated by'*', if the column is wide enough and the first column is not asubtotal criterion. If it is a subtotal criterion, its value is repeated after the total,if the column is wide enough.
- numc_sum
value set: SPACE, 'X' ' ' = by default NUMC fields cannot be totalled 'X' = NUMC fields can be totalled. If this flag is set, the total canbe controlled via the FIELDCAT-NO_SUM parameter per NUMC column. Interaction
- box_fieldname
value set: SPACE, internal output table field name if the list has checkboxes at the start of records (for selectingseveral records), this parameter contains the internal output tablefield name indicated by the checkbox selection column. The field is a checkbox at the start of list records without a listheader.
- box_tabname
value set: SPACE, internal output table name Only relevant for hierarchical-sequential lists. Name of the internaloutput table which contains the field in the parameter BOX_FIELDNAME.If BOX_FIELDNAME is not empty, this field must also be filled forhierarchical-sequential lists.
- no_input
value set: SPACE, 'X' 'X' = all ready-for-input fields in a list are displayed as notready-for-input. (record selection checkboxes and fields which can be madeready-for-input via the field list parameter FIELDCAT-INPUT = 'X')
- expand_fieldname
value set: SPACE, internal header table field name Only relevant for hierarchical-sequential lists if hierarchical-sequential list items are to be expandable andcollapsable, the internal header table must contain an additionalCHAR(1) field which contains the expansion status of the header entry. The name of this field must be assigned to the parameterIS_LAYOUT-EXPAND_FIELDNAME. The initial value of the field in the header table is that the itemsare not displayed and the folder symbol SYM_PLUS_FOLDER appears in thelist before the header entry. If the field contains 'X' for a header entry, the items for this headerappear, and the folder symbol SYM_MINUS_FOLDER appears on the listbefore the header entry. The user can show or hide the items by clicking on the folder symbol(hotspot). If the items for a header entry are only to be read by the callingprogram and passed to ALV when a header has been expandedinteractively, this can be controlled via the CALLBACK event'ITEM_DATA_EXPAND'. See also the documentation of the parameterIT_EVENTS>.
- f2code
value set: SPACE, function code meaning in the ALV standard interface: To assign an ALV standard function code to double-click (F2), assignthe function code to this parameter. Ex.: to assign the ALV standard function 'Detail' ('&ETA') to F2. => LAYOUT-F2CODE = '&ETA' Effect in 'user interface': Case 1: the ALV standard function code for F2 '&IC1' is left in the copiedapplication interface, but F2 is to have a function which is not underF2 in the interface (ALV standard function or application function).Pass this function codeto ALV in the parameter F2CODE. Case 2: The ALV standard function code for F2 '&IC1' was deleted from theapplication interface and replaced by another function code (ALVstandard function or application function). Pass this function code toALV in the parameter F2CODE. This is the prerequisite for columnselection in this case.
- confirmation_prompt
value set: SPACE, 'X' 'X' = if one of the functions 'Back(F03)', 'Exit(F15)' or 'Cancel(F12)'occurs, a confirmation prompt appears.
- key_hotspot
value set: SPACE, 'X' The columns defined in the field catalog as key fields (FIELDCAT-KEY = 'X') are output as hotspots, i.e. clicking on a keycolumn (highlighted in color in the list) calls the function under F2.
- reprep
value set: SPACE, 'X' 'X' = activate Report/Report interface: prerequisite: application system (=> Report RKKBRSTI exists). List module is a possible sender in the Report/Report interface logic(poss. initialization of the interface...). The calling report/module pool... of type RT=Report inI_CALLBACK_PROGRAM is passed to the Report/Report interface as senderreport. If the sender report is assigned to receiver reports in the tableTRSTI, the function code BEBx is active (x = function code class). Example: If Report Writer report group 7KOI with function code class '3' (SAPsetting) is assigned as a receiver for the sender RKTFGS15, thisreceiver report group is called by function code 'BEB3' via the Re/Reinterface. The report restrictions and the key information of theselected records are passed to the Re/Re interface as selectioncriteria. For further information about the Report/Report interface see thedocumentation of the function group 'RSTI'.
- group_buttons
value set: SPACE, 'X' not relevant for block lists (output of several lists consecutively) Prerequisite: Group output fields via FIELDCAT-SP_GROUP in the field list, and passthe group name to the list module in the interface parameterIT_SPECIAL_GROUPS. Further information: See the documentation of the IMPORTING parameterIT_SPECIAL_GROUPS>. and the field catalog parameter FIELDCAT-SP_GROUP of the IMPORTINGparameter IT_FIELDCAT >. ' ' = if the prerequisite is fulfilled, but the parameter is not set,the function code '&OL0' calls the display variant popup in which youcan show the visible fields in the field list by their groups. Allfields in the field list are visible by default. The user can go to thegroup views in the popup. The fields can be classified into any number of logical groups (1:n). 'X' = a maximum of five logical groups can be formed. The displayvariant popup for each of these groups can be called by its ownfunction in the interface. The fields in the field list belong to thisgroup. The ALV standard interface contains pushbuttons for the firstthree groups (the first three entries in the internal tableIT_SPECIAL_GROUPS). The group text passed in IT_SPECIAL_GROUPS isdisplayed as pushbutton text. The display variant popup for the fourthand fifth groups can be called via the right-hand mouse key functionselection. When the display variant popup for a field group is called, that groupis selected, but the user can change the group view in the popup. The function codes &OLx (x=1,2,3,4,5) call the display variant popupsfor the respective group. There are pushbuttons for the function codes &OL1, &OL2 and &OL3 in theALV standard interface (function group KKBL status STANDARD). Thefunctions &OL4 and &OL5 only have function keys. A group 'All fields' is added by the System when grouping logic is used(= the above prerequisite is satisfied), regardless of the setting ofthis parameter.
- no_keyfix
value set: SPACE, 'X' Not relevant for block lists (output of several lists consecutively) ' ' = the key columns defined in the field catalog by FIELDCAT-KEY ='X' are fixed in the list output. These columns do not scrollhorizontally. The item table key columns are fixed inhierarchical-sequential lists. The header table key fields are notconsidered here. 'X' = key columns not fixed The user can change these general settings interactively. To fix a column by default which is not a key column, set the parameterto 'X' and control it via the field list. See the documentation of the field list parameter FIELDCAT-FIX_COLUMNof the IMPORTING parameter IT_FIELDCAT>.
- get_selinfos
value set: SPACE, 'X' If the calling program is a report with an ABAP/4 selection screen,setting this parameter makes ALV read the selection screen again. Ifthe selections are read successfully, a pushbutton, via which the usercan call a popup which lists the report selections in a simple form,becomes active on the results list output by ALV. The contents of thispopup are printed, if the interface IS_PRINT structure parameterNO_PRINT_SELINFOS is not set. You can ensure that they are printed on aseparate page by setting the parameter IS_PRINT-NO_COVERPAGE. For more information about printed output, see the documentation of theparameter IS_PRINT>.
- group_change_edit
value set: SPACE, 'X' 'X' = the user can enter a format option for each sort criterion in thesort/subtotal popup, for the list format when this value changes (e.g.new page or undeline). For further information about sorting see the documentation of theparameter IT_SORT>. Detail screen
- detail_popup
value set: SPACE, 'X' ' ' = list record detail display in full-screen mode, with top-of-page. 'X' = list record detail display in popup (without top-of-page).
- detail_initial_lines
- value set: SPACE, 'X'
' ' = only fields whose contents are not initial are output in thedetail view. 'X' = initial field contents are also output in detail.
- detail_titlebar
value set: SPACE, string(max.30) ' ' = 'Detail: Display' is output as the title of the detail window. 'string' = the string passed is output as the title of the detailwindow. Display variants (only relevant for hierarchical-sequential lists)
- header_text
value set: SPACE, CHAR(20) only relevant for hierarchical-sequential lists you can toggle between display field and field list views viapushbuttons in the display variant definition popup forhierarchical-sequential lists. The views refer to the hierarchy levelof the fields. This is technically a toggle between the header tableand item table fields. ' ' = the header table field pushbutton text is 'Header' by default. CHAR(20) = header table field pushbutton text.
- item_text
value set: SPACE, CHAR(20) only relevant for hierarchical-sequential lists You can toggle the view between the display fields and the field listvia pushbuttons in the display variant definition popup forhierarchical-sequential lists. The views refer to the hierarchy levelof the fields. This is technically a toggle between the header tableand item table fields. ' ' = the pushbutton text for the item table fields is 'Item' bydefault. CHAR(20) = item table field pushbutton text.
- item_default
value set: SPACE, 'X' only relevant for hierarchical-sequential lists ' ' = the header table fields are displayed by default in the displayvariant definition popup. The user can switch to the item table fieldsinteractively. 'X' = the item table fields are displayed by default in the displayvariant Definition Popup. The user can switch to the header tablefields interactively. Color
- info_fieldname
value set: SPACE, internal output table field name A whole list record can be colored individually using a color code in acolumn of the internal output table for the record. Assign the name ofthe field containing the color code to this parameter. The internal output table field must be of type CHAR(3). The code must have the following syntax: 'Cxy': C = color (all codes must start with 'C') x = color number ('1'-'9') y = bold ('0' = off, '1' = on) Note: the color of the key columns is not affected. Key columns can becolored at record or cell level using the complex coloring which isdescribed in the next parameter COLTAB_FIELDNAME. To color columns, see the documentation of the field catalog parameterFIELDCAT-EMPHASIZE of the IMPORTING parameterIT_FIELDCAT>.
- coltab_fieldname
value set: SPACE, internal output table field name Cells can be colored individually using a color code which is containedin a column of the internal output table for the record containing thecell. Assign the name of the field to this parameter. The internal output table field must be of type SLIS_T_SPECIALCOL_ALV. Principle: the color code field is entered for the record containingthe cells to be colored. The field contains an internal table with theabove structure, containing the field names of the cells to be coloredand the color code. The cell coordinates are determined by the recordposition containing the color code and the column information in thecolor table. The record structure of the internal color table of typeSLIS_T_SPECIALCOL_ALV is as follows: Color table-FIELDNAME = field name of the cell to be colored Color table-COLOR-COL = color number (1 - 9) Color table-COLOR-INT = bold (0 = off, 1 = on) Color table-COLOR-INV = inverse (0 = off, 1 = on) Color table-NOKEYCOL = ignore key coloring ('X' = yes, ' ' = no) If the parameter color table-FIELDNAME is not filled, the coloringapplies to all fields, so the entire record is colored. Others
- list_append
value set: SPACE, 'X' only relevant for block lists which are not output with theREUSE_ALV_BLOCK_... modules. It is only useful to output block-lists without specifying the abovemodules if the number of list blocks exceeds, or may exceed, themaximum number specified in the block module documentation. These operations are not possible for user-defined block lists. Principle: to output a list of n blocks Call the function module for the list type for the first block. The caller must enter the maximum list width of the n blocks in theparameter LAYOUT-MIN_LINESIZE in the first call. The event tableIT_EVENTS of the event END_OF_LIST must contain the associated formroutine name (see also the documentation of the interface parameter IT_EVENTS>). The parameter LAYOUT-LIST_APPEND must be initial. After the first list has been output, the form routine specified in theevent END_OF_LIST is called by Callback. The remaining n-1 blocks arethen output by calling the function module for the list type. Theparameter LAYOUT-LIST_APPEND must be set = 'X' for these n-1 calls. Theevent table IT_EVENTS should not contain the event END_OF_LIST or atleast be assigned to a different form routine name from the first call.Default The default layout settings can often be retained, so that you do nothave to pass this structure with changed flags. Description Print control parameter
- PRINT
value set: SPACE, 'X' 'X' = the list is to be printed and not displayed on the screen. Othersettings can be made in the print parameter screen.
- NO_PRINT_SELINFOS
value set: SPACE, 'X' 'X' = do not print selection info (see LAYOUT-GET_SELINFOS)
- NO_COVERPAGE
value set: SPACE, 'X' 'X' = do not print selection information and list status on a separatepage.
- NO_NEW_PAGE
value set: SPACE, 'X' For internal use only
- RESERVE_LINES
value set: 0, n Not relevant for hierarchical-sequential lists and block lists. n = number of lines to be printed by the user in the footer area in theCallback at the event END_OF_PAGE.
- NO_PRINT_LISTINFOS
value set: SPACE, 'X' 'X' = Do not print list status (sort, subtotal and filter information).
- NO_CHANGE_PRINT_PARAMS
value set: SPACE, 'X' SPACE = (default) The output format (number of columns) is dynamicallyadjusted to the list width (max. 255). 'X' = The current print parameters are used. If the list is wider, theoutput width is not dynamically adjusted.
- PRINT_CTRL of type ALV_S_PCTL
Structure ALV_S_PCTL contains the DDIC structures PRI_PARAMS andARC_PARAMS. You define the print parameters with these structures. Prerequisite:> Before you use these parameters, you must call thefunction module UNSET_PRINTPARAMETER. This initializes the requiredparameters. &RANGE& &DEFAULT&Description Only relevant when the layout parameter LAYOUT-GET_SELINFOS of the IMPORTING structureIS_LAYOUT> is set. Complex type for modifying the information displayed in the selectioninfo popup:
- mode: 'R' = only the entries passed in the internal table
IS_SEL_HIDE-T_ENTRIES are output in the popup. Selection info which the list tool read in the selection screen (when called by a report with a selection screen) are replaced by the values passed. 'S' = the selection info which the list tool read in the selection screen of the calling report are modified by the entries in the table IS_SEL_HIDE-T_ENTRIES.
- t_entries: Selection info table
- t_entries-mode: 'A' = output the selection info for the current table
record additionally in the info popup. 'D' = do not output select option or SELNAME parameter selection info in the popup.
- t_entries-selname: (only used in t_entries-mode = 'D')
Name of the select option or parameter. The following table fields are only used in t_entries-mode = 'A'. Theycontain the selection information to be added.
- t_entries-field: DDIC field name of the field for which selection
information is to be output.
- t_entries-table: DDIC table names of t_entries-field.
- t_entries-stext: Field name in info popup.
If t_entries-field and t_entries-table have been entered, this text is taken from DDIC.
- t_entries-valuf: Selection condition 'from' value (external format)
- t_entries-valut: Selection condition 'to' value (external format)
- t_entries-sign0: (I)nclusive (E)xclusive
- t_entries-optio: All values of the select options Option field
allowed. The remaining fields are used internally and are not relevant for thecaller.Description This structure is only relevant if display variants are to be savedand/or read. Variant information including the name of the list output variant. The access path must be specified in the fields REPORT (requiredfield), HANDLE (optional) and/or LOG_GROUP (optional) to allow ALV toread display variants. If display variants are also to be saved, the parameter I_SAVE mustalso be entered. See also the documentation of the IMPORTING parameterI_SAVE>. A variant is identified uniquely by:
- the program to which it is assigned (REPORT)
- the handle if, e.g. several lists with various structures and data are
called (HANDLE) in a program (I_CALLBACK_PROGRAM) The handle is a unique user-assigned CHAR(4) field, which assigns thecall to the current internal output table structure. Example: Various lists can be output in program x, depending on a user action. Display variants are to be able to be defined for each of these lists. This functionality is guaranteed by assigning a HANDLE for each list.If variants are saved for this program and handle, the handle must notchange.
- the logical group if, e.g. the same list is made with different
settings (LOG_GROUP) via different transactions The logical group is a unique user-assigned CHAR(4) field whichdetermines the assignment. Example: The program x is called via the transactions T1 and T2. The fieldcatalog fields offered to the user vary depending on the transactioncode by assignment to logical groups. If variants are saved for the program and logical group, the logicalgroup must not change.
- the user name, if variants are saved user-specifically (USERNAME)
This parameter is never entered manually as the variant name is unique.
- the variant name (VARIANT).
This parameter is only to be entered if a particular variant is to beread and the list is to be output with this variant via this structure.Value range The above fields must be specified to be able to call a list with avariant. Default If the structure is initial but saving is active (I_SAVE is notinitial), IS_VARIANT-REPORT is set to I_CALLBACK_PROGRAM. The function module REUSE_ALV_VARIANT_F4> provides variant possible entry help.Description This table tells ALV which events are processed by the caller byCALLBACK. The table of possible events per list type can be initialized using themodule REUSE_ALV_EVENTS_GET>. You can display the names of the constants in the type pools SLIS whichrepresent the individual events using the individual test function inthe function module REUSE_ALV_EVENT_NAMES_GET>. Onlyevents with a form routine name are processed. The table structure contains the fields:
- IT_EVENTS-NAME
Name of the Callback event. Possible Callback events: Action USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD Process actions on the list As this is a frequently-used Callback event, the form routine can alsobe passed directly in the interface in the IMPORTING parameterI_CALLBACK_USER_COMMAND>. PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB If a user list status is to be set, it must be done in the form routineassigned to this event. The ALV function codes, which must not beactive, are in the Parameter RT_EXTAB. This table must be passed withthe SET PF-STATUS command (with inactive user function codes as well,if necessary). The STANDARD status of the function group SALV should be used as atemplate for a user-specific status. As this is a frequently-used Callback event, its form routine can alsobe passed directly in the interface in the IMPORTING parameterI_CALLBACK_PF_STATUS_SET>. ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C Only relevant for hierarchical-sequential lists using the layoutparameter IS_LAYOUT-EXPAND_FIELDNAME of the structureIS_LAYOUT>. Exit for passing item entries (ITEM table) for a header record whichwas expanded interactively by the user. RS_SELFIELD-TABINDEX contains the header table index for which the itementries 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 isto be expanded. RFLG_ALL is passed with 'X' if the user shows all items. Theapplication must ensure that entries are not repeated in the itemtable. RS_SELFIELD is initial in this case. CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make specialsettings. It is not usually used. List processing events IMPORTANT: The application Callback routine must not manipulate theinternal output table and/or its header record. This restrictionapplies to all Callbacks which are called in the list output and rununder the 'List processing events'. TOP_OF_LIST no USING parameter Information output at the start of the list END_OF_LIST no USING parameter Information output at the end of the list TOP_OF_PAGE no USING parameter Equivalent to the list processing TOP-OF-PAGE event END_OF_PAGE no USING parameter Not available for hierarchical-sequential lists. Information output at the end of a page. This is only called forprinting. TOP_OF_COVERPAGE no USING parameter The selection information and list status are output together (if theyexist) on a separate page by default. See also the documentation of theparameters: IS_PRINT>-NO_COVERPAGE IS_PRINT>-NO_PRINT_SELINFOS IS_PRINT>-NO_PRINT_LISTINFOS IS_LAYOUT>-GET_SELINFOS The user can format the header area of the 'cover page' himself orherself by specifying a Callback routine for this event. END_OF_COVERPAGE no USING parameter Analogously to TOP_OF_COVERPAGE the user can add other information tothe information output by ALV (selection information, list status) atthis event. FOREIGN_TOP_OF_PAGE no USING parameter The Top-of-page event is always processed in ALV and is only passed tothe caller via the Callback mechanism. This is still the case if thecaller, e.g. by a user action, processes a branch list which was notformatted by ALV (e.g. a popup with additional information about thelist record selected and displayed by ALV). In this case, top-of-page cannot be formatted by ALV analogously to thebasic list, it must be handled completely by the caller. The eventtop-of-page still occurs in ALV. When ALV notices a top-of-page whichwas not caused by an ALV output, the form routine inFOREIGN_TOP_OF_PAGE is called. FOREIGN_END_OF_PAGE no USING parameter The event end-of-page is always processed in ALV and only passed to thecaller via callback. This is still the case, e.g. when the callerprocesses a details list which was not formatted by ALV (e.g. a popupwith further information about selected list records which weredisplayed by ALV). In this case, end-of-page cannot be formatted by ALV analogously to thebasic list, it must be handled completely by the caller. The eventend-of-page still occurs in ALV. When ALV notices an end-of-page thatwas not caused by an ALV output, the form routine inFOREIGN_END_OF_PAGE is called. BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO Output information before each output line. Should only be used injustified cases because it costs a lot of performance. AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO Output information after each output line. Should only be used injustified cases because it costs a lot of performance. Internal use only LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME R_INDEX LIKE SY-TABIX R_INDEX_ITEM LIKE SY-TABIX R_INDEX_SUM LIKE SY-TABIX
- IT_EVENTS-FORM
Name of the form routine which should be called in the calling programat the event.Description Table for passing ALV standard function codes, to return control to theuser before and/or after execution with the callback eventUSER_COMMAND. See also the documentation of the IMPORTING parameterI_CALLBACK_USER_COMMAND>. This table should only be passed when the application wants to react tothe execution of standard functions. This could, e.g. be to check the authorization for a standard functionor to select data depending on the current display variant. The table fields are as follows:
- ucomm
Standard function code which is also passed in the callback event USER_COMMAND. Example: ucomm = '&OL0' means that the application also gets control at thedisplay variant definition function code.
- before
'X' = the application gets control before ALV executes the function.
- after
'X' = the application gets control after ALV has executed the function,but before the list is output. Example: ucomm = '&OL0' and after = 'X'. The application gets control after the user has left the displayvariant definition popup. In the function code processing form routine which is passed to ALV inthe I_CALLBACK_USER_COMMAND parameter, the application can now get thefield catalog which may have been modified by the user, using themodule REUSE_ALV_LIST_LAYOUT_INFO_GET >, and then reselect the data for the new output fieldes in theinternal output table, if necessary. If the application sets the SELFIELD-REFRESH flag (USER_COMMAND formroutine interface reference parameter) after the selection, the list isoutput again. Output fields added by the user and reselected data nowappear.Description The optional IMPORTING parameter IT_EXCLUDING is an internal table. Itis only needed if the caller uses the list tool standard interface butwants to deactivate interface functions which he or she does not need. In this case the function codes of these standard functions are enteredin the table. Description 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. The field catalog for the output table is built-up in the caller'scoding. The build-up can be completely or partially automated bycalling the REUSE_ALV_FIELDCATALOG_MERGE module See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE>. The minimal field catalog is documented under 'default'. The caller canuse the other optional parameters to assign output attributes to afield which differ from the default. A field catalog need not be built-up and passed explicitly only underthe following conditions:
- The internal table to be output has the same structure as a Data
Dictionary structure which is referred to in the internal tabledeclaration using LIKE or INCLUDE STRUCTURE.
- all fields in this structure are to be output
- the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
See also the documentation of the IMPORTING paramterI_STRUCTURE_NAME>. Positioning
- row_pos (row position)
value set: 0, 1 - 3 Only relevant if the list output is to be multi-line (two or threelines) by default. A multi-line list can also be defined by the user interactively if thedefault list is one-line. The parameter specifies the relative output line of the column in amulti-line list.
- col_pos (column position)
value set: 0, 1 - 60 only relevant when the default relative column positions differ fromthe field catalog field sequence. The parameter specifies the relative column position of the field inthe list output. The column order can be changed interactively by theuser. If this parameter is initial for all field catalog entries,columns appear in the field catalog field sequence. Identification
- fieldname (field name)
value set: internal output table field name (required parameter) Name of the internal output table field which is described by thisfield catalog entry
- tabname (internal output table)
value set: SPACE, internal output table name This parameter is used in 'manual' field catalog build-up only forhierarchical-sequential lists. Name of the internal output table which contains the fieldFIELDCAT-FIELDNAME. Data Dictionary reference
- ref_fieldname (reference field name)
value set: SPACE, Data Dictionary field name Name of the Data Dictionary field referred to. This parameter is only used when the internal output table fielddescribed by the current field catalog entry has a reference to theData Dictionary (not a program field), and the field name in theinternal output table is different from the name of the field in theData Dictionary. If the field names are identical, naming the DataDictionary structure or table in the FIELDCAT-REF_TABNAME parameter issufficient.
- ref_tabname (reference table/structure field name)
value set: SPACE, name of a Data Dictionary structure or table Structure or table name of the referred Data Dictionary field. This parameter is only used when the internal output table fielddescribed by the current field catalog entry has a Data Dictionaryreference (not a program field). Reference to fields with currency/measurement unit Each internal output table sum or quantity field whose decimal placesare to be formatted appropriately for the unit in the list must followthe convention: the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting thephysical data type with the parameter FIELDCAT-DATATYPE has no effect) There is a field in the internal output table which contains theassociated unit. There is also an entry in the field catalog for the unit field. (If the unit is not to appear as a column in the list, and cannot beinteractively displayed as a column, e.g. because it is alwaysunambiguous and is therefore explicitly output by the caller in thelist header, the field catalog units field entry can take the parameterFIELDCAT-TECH = 'X'. The association of a value field to a unit affects the output asfollows: appropriate decimal places display for the unit 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 issummed, this unit affects whether the units are homogeneous. 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 thehomogeneity of the units. When non-initial fields with an initial unit are summed, the unit SPACEis considered to be a unit. Link to currency unit
- cfieldname (currency unit field name)
value set: SPACE, output table field name Only relevant for amount columns with associated unit. Name of the internal output table field containing the currency unitassociated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
- ctabname (internal currency unit field output table)
value set: SPACE, output table field name only relevant for hierarchical-sequential lists Name of the internal output table containing the FIELDCAT-CFIELDNAMEfield. Link to measurement unit
- qfieldname (measurement unit field name)
value set: SPACE, output table field name only relevant for quantity columns with unit link. Name of the internal output table field containing the measurement unitassociated with the quantity field FIELDCAT-FIELDNAME. The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
- qtabname (internal measurement unit field output table)
value set: SPACE, output table field name only relevant for hierarchical-sequential lists Name of the internal output table containing the FIELDCAT-QFIELDNAMEfield. Column output options
- outputlen (column width)
value set: 0 (initial), n For fields with a Data Dictionary link this parameter can be leftinitial. For fields without a Data Dictionary link (program field) the parametermust be given the value of the desired field list output length (columnwidth). initial = column width is the output length of the referred DataDictionary field (domain). n = column width is n characters
- key (key column)
value set: SPACE, 'X' 'X' = kex field (key field output in color) Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial. For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
- key_sel (hideable key column)
value set: SPACE, 'X' only relevant when FIELDCAT-KEY = 'X' Key field which can be hidden interactively. The key column sequence cannot be changed interactively by the user. The output is controlled by the FIELDCAT-NO_OUT parameter analogouslyto non-key fields.
- no_out (field in field list)
value set: SPACE, 'X' 'X' = field is not displayed in the current list. The user can interactively choose the field for output from the fieldlist. The user can display the contents of these fields at line level usingthe 'Detail' function. See also the 'Detail screen' documentation of the parameterIS_LAYOUT>.
- tech (technical field)
value set: SPACE, 'X' 'X' = technical field Field cannot be output in the list and cannot be displayedinteractively. Field can only be used in the field catalog (not in IT_SORT, ...).
- emphasize (highlight columns in color)
value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on) 'X' = column is colored with the default column highlight color. 'Cxyz' = column is colored with a coded color: C: Color (coding must begin with C) x: color number y: bold z: inverse
- hotspot (column as hotspot)
value set: SPACE, 'X' 'X' = column cells are output as hotspots
- fix_column (fix column)
value set: SPACE, 'X' Not relevant for block lists (output of several lists consecutively) 'X' = column fixed (does not scroll horizontally) All columns to be fixed must have this flag, starting from the left. Ifa column without this flag is output, only the columns to the left ofthis column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter IS_LAYOUT-NO_KEYFIX of the IMPORTING paramterIS_LAYOUT>.
- do_sum (sum over column)
value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field. This function can also be called by the user interactively.
- no_sum (sums forbidden)
value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data typeof the field would allow summing.
- input (column ready for input)
Function not available Format column contents
- icon
value set: SPACE, 'X' 'X' = column contents to be output as an icon. The internal output table column contents must be valid icon strings(@xx@). The caller must consider the printability of icons.
- symbol
value set: SPACE, 'X' 'X' = column contents are to be output as a symbol. The internal output table column must be a valid symbol character. The caller must consider the printability of symbols. Symbols can usually be printed, but may not always be output correctly,depending on the printer configuration.
- just (justification)
value set: SPACE, 'R', 'L', 'C' Only relevant for fields of data type CHAR or NUMC ' ' = default justification for this data type 'R' = right-justified output 'L' = left-justified output 'C' = centered output The justification of the column header always follows the justificationof the columns. Independent justification of the column neader is notpossible.
- lzero (leading zeros)
value set: SPACE, 'X' Only relevant for fields of data type NUMC ALV outputs NUMC fields right-justified without leading zeros bydefault. 'X' = output with leading zeros Note: If a NUMC field is output left-justified or centered byFIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionaryreference ALPHA conversion exit, the output is always left-justified.
- no_sign (no +/- sign)
value set: SPACE, 'X' Only relevant for value fields 'X' = value output without +/ sign
- no_zero (suppress zeros)
value set: SPACE, 'X' Only relevant for value fields 'X' = suppress zeros
- edit_mask (field formatting)
value set: SPACE, template template = see documentation of WRITE formatting option USING EDIT MASK template The output conversion conv can be made by template = '== conv'. Texts The following text parameters should be specified for program fieldswithout a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a DataDictionary reference. If this is not desired, the text parameters canalso be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column headertext with the appropriate length is always used. The interactive function 'Optimize column width' takes account of boththe field contents and the column headers: if all field contents are shorter than the shortest column header, thecolumn width depends on the column header. The 'long field label' is also used in display variant definition,sort, etc. popups.
- seltext_l (long field label)
- seltext_m (medium field label)
- seltext_s (short field label)
- reptext_ddic (header)
analogous to the Data element maintenance 'Header' The specified text is not necessarily output in the list, an optimumamong all texts is sought.
- ddictxt (specify text)
value set: SPACE, 'L', 'M', 'S' You can specify with values 'L', 'M', and 'S', the keyword that shouldalways be used as column header. If the column width changes, noattempt is made in this case to find an appropriate header for the newoutput width. Parameters for program fields without Data Dictionary reference see also 'Text' parameters
- datatype (data type)
value set: SPACE, Data Dictionary data type (CHAR, NUMC,...) Only relevant for fields without Data Dictionary reference Program field data type
- ddic_outputlen (external output length)
value set: 0 (initial), n Only relevant for fields without Data Dictionary reference whose outputis nevertheless to be modified by a conversion exit. Prerequisites: FIELDCAT-EDIT_MASK = '==conv' see also the documentation of the parameter FIELDCAT-EDIT_MASK FIELDCAT-INTLEN = n see also the documentation of the parameter FIELDCAT-INTLEN n = external format field output length The column width FIELDCAT-OUTPUTLEN need not be the same as theexternal format output length (FIELDCAT-DDIC_OUTPUTLEN).
- intlen (internal output length)
value set: 0 (initial), n Only relevant for fields without Data Dictionary reference whose outputis nevertheless to be modified by a conversion exit. Prerequisites: FIELDCAT-EDIT_MASK = '==conv' see also the documentation of the parameter FIELDCAT-EDIT_MASK FIELDCAT-DDIC_OUTPUTLEN = n see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN n = internal format field output length
- rollname (data element)
value set: SPACE, Data Dictionary data element name F1 help can be provided for a program field without a Data Dictionaryreference, or F1 help which differs from the Data Dictionary help canbe provided for a field with a Data Dictionary reference, using thisparameter. When F1 help is called for this field, the documentation of thespecified data element is displayed. If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionaryreference, the documentation of the data element of the referred DataDictionary field is output. Others
- sp_group (field group key)
value set: SPACE, CHAR(1) Field group key. Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter(see also the documentation of the parameterIT_SPECIAL_GROUPS>). When such an assignment is made in the field catalog and inIT_SPECIAL_GROUPS, the fields are grouped correspondingly in thedisplay variant popup.
- reprep (Report/Report interface selection criterion)
value set: SPACE, 'X' Prerequisites: The system contains the Report/Report interface (function group RSTI, table TRSTI) Parameter LAYOUT-REPREP = 'X' (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT>) 'X' = When the Report/Report interface is called, the value of thisfield is passed in the selected interface start record as a selectioncriterion.Default
- The following entries are usually sufficient for internal table fields
with a reference to a field defined in the Data Dictionary : fieldname ref_tabname Notes: ALV gets the remaining information from the Data Dictionary. If no relative column position (COL_POS) is specified, the fields areoutput in the list in the order in which they were added to the fieldcatalog. REF_FIELDNAME need only be specifid when the name of the internal tablefield differs from the name of the referred Data Dictionary field. Information which is explicitly entered in the field catalog is notoverwritten by information from the Data Dictionary. Priority rule: Entries in the field catalog have priority over differing entries inthe Data Dictionary.
- The following entries are usually sufficient for internal table fields
without a reference to the Data Dictionary (program fields): fieldname outputlen datatype seltext_s seltext_m seltext_l Notes: F1 help can be provided for program fields by assigning a data elementto the parameter ROLLNAME. If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDICcontain appropriate field labels, the program field column headers arealso adjusted appropriately when the column width changes.Description Filter criteria table Filter criteria which result, e.g. from explicitly loading an initialdisplay variant, can be passed to list output in this parameter. This table should never be built-up 'manually'. Description The caller specifies the sorting and/or subtotalling of the basic listin the internal table IT_SORT. This internal table has the following fields:
- spos
Sort sequence
- fieldname
Internal output table field name
- tabname
Only relevant for hierarchical-sequential lists Name of the internal output table
- up
'X' = sort in ascending order
- down
'X' = sort in descending order subtot 'X' = subtotal at group value change
- group
'* ' = new page at group value change 'UL' = underline at group value change The formatting options are constants of the domain SLIS_CTRLS. See also the documentation of GROUP_CHANGE_EDIT of the interfacestructure IS_LAYOUT> for more information about group value change formatting.
- comp (INTERNAL USE ONLY)
- expa
Prerequisite: IT_SORT-SUBTOT = 'X', i.e. sort criterion is also subtotal criterion If the first list output is only to be expanded to total level n, andcan then be further expanded interactively by the user, the flag shouldbe set at the total level criterion for level nDescription If fields have been grouped in the field catalog by a shared value ofthe parameter SP_GROUP, the technical key of the group(FIELDCAT-SP_GROUP) is assigned to the field group text in thisinternal table. See also the documentation of the field catalog parameter FIELDCAT-SP_GROUP of the IMPORTING parameterIT_FIELDCAT> and the Layout paramter LAYOUT-GROUP_BUTTONS of the IMPORTING paramterIS_LAYOUT>.Description Passing an EXIT routine tells the ALV that you want to set your ownuser status. In this case, the ALV does not set its default status butcalls the form routine passed with I_CALLBACK_PF_STATUS_SET. The interface of this form routine must be defined as follows: FORM set_pf_status USING rt_extab TYPE slis_t_extab The table RT_EXTAB contains those function codes that are hidden on thestandard interface of the ALV. If the caller wants to use his or her own interface (to offer otherfunctions on the list or transfer existing functionality, for example),it is recommended that he or she copy the standard status STANDARD fromfunction group SALV and make the appropriate changes. Standard ALVfunction codes always begin with '&'. Please consult the documentation on theI_CALLBACK_USER_COMMAND> parameter as well. If the default status is used, the ALV hides standard functions thatare not appropriate for the list currently displayed. To ensure thatthis also works when you use your own interface, the ALV passes thefunction codes of these standard functions in the excluding tablert_extab (see above) when the form routine is called. This means that the user status should always be set as follows in theform routine: SET PF-STATUS usrstatus EXCLUDING rt_extab. Excluding table rt_extab can be appended to include those applicationfunctions that are to be deactivated. The system calls this form routine whenever the standard interfacewould be set by the ALV using SET PF-STATUS.Default If no exit routine is entered, then the ALV sets a status thatcorresponds to the STANDARD status of function group SALV. Description Program which calls the function module and contains the exit routines.It must be a Report, Function group, Module pool or Form routine pool(not an Include). Note: Never pass SY-REPID directly in the interface. If the desiredprogram name is in SY-REPID, it must be assigned to an intermediatevariable which is then passed to the interface. Description Passing an EXIT routine tells ALV that the application wants to reactto certain function codes itself. These are general function codes which ALV does not recognize (not ALVstandard functions) and which were defined and set by an applicationstatus. See also the documentation of the parameterI_CALLBACK_PF_STATUS_SET>. The interface of the specified form routine must be defined as follows: FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield. The parameter R_UCOMM contains the function code called. The structure RS_SELFIELD contains the following information:
- tabname : internal output table name
- tabindex : internal output table index
- fieldname: field name of cursor position
- sel_tab_field: cell name of cursor position (internal ALV table name
field
- endsum : cursor is on the final total row
- sumindex : if >0, the cursor is on a subtotal row
- value : field value on the list
- refresh : (exporting) list is to be refreshed
- col_stable:(exporting) keep column positions in refresh
- row_stable:(exporting) keep row positions in refresh
- exit :(exporting) leave list (and ALV)
- before_action: jump before performing standard action
- after_action : jump after performing standard action, before creating
list
- ignore_multi : internal use
The exit routine always runs when a function code occurs which ALV doesnot recognize, or a jump before or after a standard function code isdefined by the interface parameter IT_EVENT_EXIT. See also the documentation of the parameterIT_EVENT_EXIT>. The function code and current cursor position information are passed tothe calling program via the exit routine. If several lines are selected by marking checkboxes, the output tablecheckbox field contains the current status of the checkbox in the list.Description Initial variant logic active/inactive. Prerequisite: The parameter IS_VARIANT has the appropriate value. See also the documentation of the IMPORTING parameterIS_VARIANT>.Value range SPACE = no initial variant can be defined 'X' = initial variant can be defined Default SPACE Description To avoid overloading list output with interface consistency checks,they are only made in an extra call mode. If this parameter is 'X', the consistency of the interface is checkedwhen the function module is called, and an error log is output. This parameter should only be set for development test purposes (e.g.in debugging). The interface check can also be made on the results list by enteringthe function code &SOS. Default SPACE Description Controls the storage mode Prerequisite: The IS_VARIANT parameter has the appropriate value. See also the documentation of the IMPORTING parameterIS_VARIANT>.Value range
- ' ' = display variants cannot be saved
Defined display variants (e.g. delivered display variants) can beselected for presentation independently of this flag. Changes can not be saved.
- 'X' = standard save
Display variants can be saved as standard display variants. User-specific saving is not possible.
- 'U' = only user-specific saving
The user can only save display variants user-specifically
- 'A' = standard and user-specific saving
The user can save a display variant user-specifically and as standard display variant. The user chooses in the display variant save popup.Default SPACE Description Only used if the list is output in a popup. x coordinate of the bottom right-hand corner of the popup. Description Only used if the list is output in a popup. y coordinate of the bottom right-hand corner of the popup. Description Only to be used if the list is output in a popup. x coordinate of the top left-hand corner of the popup. Description Only used if the list is output in a popup. y coordinate of the top left-hand corner of the popup. Description If the internal output table is defined via an ABAP/4 Dictionarystructure (INCLUDE STRUCTURE struct or LIKE struct), the field catalogcan be built-up automatically by passing the structure name. The field catalog is internally built up for this structure as follows:
- All fields are in the list (NO_OUT = SPACE) except fields of data type
CLNT.
- The key fields of the Dictionary structure are also key fields in the
field catalog.
- Dictionary references to unit fields are copied if the reference fields
are in the structure.
- If a field catalog is also passed as parameter, the structure
information is combined with this field catalog. For further information about the automatic build-up of the fieldcatalog, see the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE>.Description Internal table with any structure containing the data to be output inlist form. This table can contain more fields than are relevant for the listoutput (display fields and field list). Only the fields named in field catalog and the layout structure areused for the list output. Other internal table fields are ignored. The value of the field FIELDCAT-NO_OUT in the field catalog determineswhether a field is output directly in the list, or whether this fieldis initially put in the field list. The user can interactively move fields between this field list and theoutput field list to display or hide them. If the internal table is defined in the calling program without aheader, no F1 help is possible in the list.
|