Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALVS

Former Member
0 Likes
916

what are the function modules used in ALVS . AND

can u give the significance of each of them

4 REPLIES 4
Read only

Former Member
0 Likes
764

hi,

ALV (ABAP LIST VIEWER)

The ABAP List Viewer unifies and identifies and simplifies the uses of lists in the R/3 System.

The ABAP List Viewer can be used to view both single-level lists and multilevel sequential lists.

• Single level lists consist any number of lines that have no hierarchical relationship to each other.

• Multilevel Sequential level lists consist any number of lines that have two hierarchical levels. Multilevel lists have header rows and item rows: the item rows are subordinate to the header rows. For each header rows there can be any number of subordinate items rows.

There are number of the function modules used to view the list. The selection of function module depends on the way that how you want to display your list.

Some useful function modules are listed below: -

1.REUSE_ALV_LIST_DISPLAY

2.REUSE_ALV_HIERSEQ_LIST_DISPLAY

3.REUSE_ALV_FIELDCATALOG_MERGE

4.REUSE_ALV_COMMENTARY_WRITE

5.REUSE_ALV_EVENTS_GET

6.REUSE_ALV_BLOCK_LIST_INIT

7.REUSE_ALV_BLOCK_LIST_APPEND

8.REUSE_ALV_BLOCK_LIST_HS_APPEND

9.REUSE_ALV_BLOCK_LIST_DISPLAY

10.REUSE_ALV_LIST_LAYOUT_INFO_GET

11.REUSE_ALV_LIST_LAYOUT_INFO_SET

12.REUSE_ALV_POPUP_TO_SELECT

13.REUSE_ALV_VARIANT_DEFAULT_GET

14.REUSE_ALV_VARIANT_F4

15.REUSE_ALV_VARIANT_EXISTENCE

1. REUSE_ALV_LIST_DISPLAY: - (This function module is used to display simple list.)

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

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 .

I_INTERFACE_CHECK: -

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 checked

When 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 entering the

function code &SOS.

I_CALLBACK_PROGRAM: -

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 desired program name is in SY-REPID, it must be assigned to an intermediate variable, which is then passed to the interface.

I_CALLBACK_PF_STATUS_SET: -

Passing an EXIT routine tells ALV that the caller wants to set his or her own user status.

The default ALV status is then not set.

The form routine interface must be defined as follows:

FORM set_pf_status USING rt_extab TYPE slis_t_extab

The table RT_EXTAB contains the function codes which are hidden in the

standard interface.

I_CALLBACK_USER_COMMAND: -

Passing an EXIT routine tells ALV that the application wants to react to certain function codes itself.

These are general function codes which ALV does not recognize (not ALV standard functions) and which were defined and set by an application status.

See also the documentation of the parameter I_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:

o tabname : internal output table name

o tabindex : internal output table index

o fieldname: field name

o endsum : cursor is on the final total row

o sumindex : if >0, the cursor is on a subtotal row

o value : field contents

o refresh : (exporting) list is to be refreshed

o col_stable:(exporting) keep column positions in refresh

o row_stable:(exporting) keep row positions in refresh

o exit :(exporting) leave list (and ALV)

o before_action: jump before performing standard action

o after_action : jump after performing standard action, before creating

list

o ignore_multi : internal use

o sel_tab_field: internal use

The exit routine always runs when a function code occurs which ALV does not recognize, or a jump before or after a standard function code is defined by the interface parameter IT_EVENT_EXIT.

I_STRUCTURE_NAME: -

If the internal output table is defined via an ABAP/4 Dictionary structure (INCLUDE STRUCTURE struct or LIKE struct), the field catalog can be built-up automatically by passing the structure name.

The field catalog is internally built up for this structure as follows:

o All fields are in the list (NO_OUT = SPACE) except fields of data type

CLNT.

o The key fields of the Dictionary structure are also key fields in the

field catalog.

o Dictionary references to unit fields are copied if the reference

fields are in the structure.

o If a field catalog is also passed as parameter, the structure

information is combined with this field catalog.

IS_LAYOUT:- (list layout specifications)

Output list description structure.

The parameters are described under the following headers:

o Display options

o Exceptions

o Totals

o Interaction

o Detail screen

o Display variants (only for hierarchical-sequential lists)

o Color

o Other

Note the section 'Default'.

Display options

• colwidth_optimize

value set: SPACE, 'X'

'X' = optimzes the column width so that all contents are displayed completely.

o no_colhead

value set: SPACE, 'X'

'X' = column headers are not output

o zebra

value set: SPACE, 'X'

'X' = striped pattern (e.g. for wide lists)

o no_vline

Value set: SPACE, 'X'

Not relevant for: hierarchical-sequential lists and multiple-line

lists.

'X' = columns separated by SPACE

o 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) .

o 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 or

MAX_LINESIZE (if > 0)).

prerequisite: no_min_linesize = ' '.

o 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

o lights_fieldname

value set: SPACE, internal output table field name internal output table field containing the codes of exceptions to be output.

Output table field code:

'1' = red traffic light

'2' = yellow traffic light

'3' = green traffic light

o 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 the parameter LIGHTS_FIELDNAME.

If LIGHTS_FIELDNAME is not empty, this field must also be filled for

hierarchical-sequential lists.

o lights_rollname

Value set: SPACE, data element name

The documentation of this data element is displayed when you call F1

help for an exception column.

o lights_condense

Value set: SPACE, 'X'

'X' = the 'maximum' exception of the items in the subtotal is output at subtotal level.

Ex.: if a list record is output with 'red traffic light', each subtotal which includes this record is also output with 'red traffic light'.

Totals

o 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 this

value interactively.

o no_totalline

Value set: SPACE, 'X'

'X' = no total record is to be output. Subtotals can still be calculated 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 calling

program.

The user should not be able to change this value interactively.

See also the documentation of the IMPORTING parameter IT_SORT.

o no_subtotals

Value set: SPACE, 'X'

'X' = no subtotals.

o totals_only

Value set: SPACE, 'X'

'X' = only total records are output.

An interactive breakdown of simple and hierarchical-sequential lists is possible.

Prerequisite: the IMPORTING parameter IT_SORT contains the sort criteria and subtotal flags.

See also the documentation of the IMPORTING parameter IT_SORT.

o totals_text

Value set: SPACE, string(max.60)

' ' = the first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide 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.

o subtotals_text

Value set: SPACE, string(max.60)

' ' = in the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the 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 a subtotal criterion.

If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.

o 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 can

be controlled via the FIELDCAT-NO_SUM parameter per NUMC column.

Interaction

o box_fieldname

Value set: SPACE, internal output table field name if the list has checkboxes at the start of records (for selecting several records), this parameter contains the internal output table field name indicated by the checkbox selection column.

The field is a checkbox at the start of list records without a list header.

o box_tabname

Value set: SPACE, internal output table name

Only relevant for hierarchical-sequential lists. Name of the internal

output table which contains the field in the parameter BOX_FIELDNAME.

If BOX_FIELDNAME is not empty, this field must also be filled for

hierarchical-sequential lists.

o no_input

Value set: SPACE, 'X'

'X' = all ready-for-input fields in a list are displayed as not ready-for-input.

(Record selection checkboxes and fields which can be made ready-for-input via the field list parameter FIELDCAT-INPUT = 'X')

o 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 and collapsable, the internal header table must contain an additional CHAR(1) field which contains the expansion status of the header entry.

The name of this field must be assigned to the parameter

IS_LAYOUT-EXPAND_FIELDNAME.

The initial value of the field in the header table is that the items are not displayed and the folder symbol SYM_PLUS_FOLDER appears in the list before the header entry.

If the field contains 'X' for a header entry, the items for this header appear, and the folder symbol SYM_MINUS_FOLDER appears on the list before 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 calling program and passed to ALV when a header has been expanded interactively, this can be controlled via the CALLBACK event 'ITEM_DATA_EXPAND'.

o f2code

Value set: SPACE, function code

meaning in the ALV standard interface:

To assign an ALV standard function code to double-click (F2), assign

the 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 copied application interface, but F2 is to have a function which is not under F2 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 the application interface and replaced by another function code (ALV standard function or application function). Pass this function code to ALV in the parameter F2CODE. This is the prerequisite for column selection in this case.

o confirmation_prompt

Value set: SPACE, 'X'

'X' = if one of the functions 'Back(F03)', 'Exit(F15)' or 'Cancel(F12)' occurs, a confirmation prompt appears.

o 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 key

column (highlighted in color in the list) calls the function under F2.

o 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 in

I_CALLBACK_PROGRAM is passed to the Report/Report interface as sender

report.

If the sender report is assigned to receiver reports in the table

TRSTI, the function code BEBx is active

(x = function code class).

Example:

If Report Writer report group 7KOI with function code class '3' (SAP setting) is assigned as a receiver for the sender RKTFGS15, this receiver report group is called by function code 'BEB3' via the Re/Re interface. The report restrictions and the key information of the selected records are passed to the Re/Re interface as selection

criteria.

For further information about the Report/Report interface see the

documentation of the function group 'RSTI'.

o 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 pass

the group name to the list module in the interface parameter

IT_SPECIAL_GROUPS.

Further information:

See the documentation of the IMPORTING parameter IT_SPECIAL_GROUPS.

and the field catalog parameter FIELDCAT-SP_GROUP of the IMPORTING

parameter <DS:FU.REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT>IT_FIELDCAT.

' ' = if the prerequisite is fulfilled, but the parameter is not set, the function code '&OL0' calls the display variant popup in which you can show the visible fields in the field list by their groups. All fields in the field list are visible by default. The user can go to the group 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 display

Variant popup for each of these groups can be called by its own function in the interface. The fields in the field list belong to this group. The ALV standard interface contains pushbuttons for the first three groups (the first three entries in the internal table

IT_SPECIAL_GROUPS). The group text passed in IT_SPECIAL_GROUPS is

displayed as pushbutton text. The display variant popup for the fourth and fifth groups can be called via the right-hand mouse key function selection.

When the display variant popup for a field group is called, that group is 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 popups

for the respective group.

There are pushbuttons for the function codes &OL1, &OL2 and &OL3 in the ALV standard interface (function group KKBL status STANDARD). The functions &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 of this parameter.

o 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 scroll horizontally. The item table key columns are fixed in hierarchical-sequential lists. The header table key fields are not considered 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 parameter to 'X' and control it via the field list.

See the documentation of the field list parameter FIELDCAT-FIX_COLUMN of the IMPORTING parameter <DS:FU.REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT>IT_FIELDCAT.

o 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. If the selections are read successfully, a pushbutton, via which the user can call a popup which lists the report selections in a simple form, becomes active on the results list output by ALV. The contents of this popup are printed, if the interface IS_PRINT structure parameter

NO_PRINT_SELINFOS is not set. You can ensure that they are printed on

a separate page by setting the parameter IS_PRINT-NO_COVERPAGE.

For more information about printed output, see the documentation of

the parameter IS_PRINT.

o group_change_edit

Value set: SPACE, 'X'

'X' = the user can enter a format option for each sort criterion in

the sort/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 the parameter IT_SORT.

Detail screen

o 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).

o detail_initial_lines

o value set: SPACE, 'X'

' ' = only fields whose contents are not initial are output in the

detail view.

'X' = initial field contents are also output in detail.

o 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 detail window.

Display variants (only relevant for hierarchical-sequential lists)

o header_text

Value set: SPACE, CHAR(20)

Only relevant for hierarchical-sequential lists

You can toggle between display field and field list views via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.

' ' = The header table field pushbutton text is 'Header' by default.

CHAR (20) = header table field pushbutton text.

o 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 list via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.

' ' = the pushbutton text for the item table fields is 'Item' by default.

CHAR(20) = item table field pushbutton text.

o item_default

Value set: SPACE, 'X'

Only relevant for hierarchical-sequential lists

' ' = The header table fields are displayed by default in the display variant definition popup. The user can switch to the item table fields interactively.

'X' = the item table fields are displayed by default in the display variant Definition Popup. The user can switch to the header table fields interactively.

Color

o info_fieldname

Value set: SPACE, internal output table field name

A whole list record can be colored individually using acolor code in a column of the internal output table for the record. Assign the name of the 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 be colored at record or cell level using the complex coloring which is described in the next parameter COLTAB_FIELDNAME.

To color columns, see the documentation of the field catalog parameter

FIELDCAT-EMPHASIZE of the IMPORTING parameter IT_FIELDCAT.

o coltab_fieldname

Value set: SPACE, internal output table field name

Cells can be colored individually using a color code which is contained in a column of the internal output table for the record containing the cell.

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 containing the cells to be colored. The field contains an internal table with the above structure, containing the field names of the cells to be colored and the color code. The cell coordinates are determined by the record position containing the color code and the column information in the color table.

The record structure of the internal color table of type

SLIS_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-INT = inverse (0 = off, 1 = on)

Color table-NOKEYCOL = ignore key coloring ('X' = yes, ' ' = no)

If the parameter color table-FIELDNAME is not filled, the coloring applies to all fields, so the entire record is colored.

Others

o list_append

Value set: SPACE, 'X'

Only relevant for block lists which are not output with the REUSE_ALV_BLOCK_... modules.

It is only useful to output block-lists without specifying the above modules if the number of list blocks exceeds, or may exceed, the maximum 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 the parameter LAYOUT-MIN_LINESIZE in the first call. The event table IT_EVENTS of the event END_OF_LIST must contain the associated form routine 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 the event END_OF_LIST is called by Callback. The remaining n-1 blocks are then output by calling the function module for the list type. The parameter LAYOUT-LIST_APPEND must be set = 'X' for these n-1 calls.

The event table IT_EVENTS should not contain the event END_OF_LIST or at least be assigned to a different form routine name from the first call.

IT_FIELDCAT: -

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's coding. The build-up can be completely or partially automated by calling 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 can use the other optional parameters to assign output attributes to a field which differ from the default.

A field catalog need not be built-up and passed explicitly only under the following conditions:

o 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.

o all fields in this structure are to be output

o the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.

See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.

Positioning

o row_pos (row position)

Value set: 0, 1 - 3

Only relevant if the list output is to be multi-line (two or three lines) by default.

A multi-line list can also be defined by the user interactively if the default list is one-line.

The parameter specifies the relative output line of the column in a multi-line list.

o col_pos (column position)

Value set: 0, 1 - 60

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.

Identification

o fieldname (field name)

Value set: internal output table field name (required parameter)

Name of the internal output table field which is described by this field catalog entry

o tabname (internal output table)

Value set: SPACE, internal output table name

This parameter is used in 'manual' field catalog build-up only for

hierarchical-sequential lists.

Name of the internal output table which contains the field

FIELDCAT-FIELDNAME.

Data Dictionary reference

o 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 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 nambiguous 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'.

The association of a value field to a unit affects the output as follows:

- 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 is summed, 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 the homogeneity of the units.

- When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.

Link to currency unit

o 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 unit associated with the amount field FIELDCAT-FIELDNAME.

The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.

o 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-CFIELDNAME field.

Link to measurement unit

o 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 unit associated with the quantity field FIELDCAT-FIELDNAME.

The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.

o 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-QFIELDNAME field.

Column output options

o outputlen (column width)

Value set: 0 (initial), n

For fields with a Data Dictionary link this parameter can be left initial.

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).

Initial = column width is the output length of the referred Data

Dictionary field (domain).

n = column width is n characters

o key (key column)

Value set: SPACE, 'X'

'X' = key 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.

o 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 analogously

to non-key fields.

o 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 field list.

The user can display the contents of these fields at line level using the 'Detail' function.

See also the 'Detail screen' documentation of the parameter IS_LAYOUT.

o tech (technical field)

Value set: SPACE, 'X'

'X' = technical field

Field cannot be output in the list and cannot be displayed interactively.

Field can only be used in the field catalog (not in IT_SORT, ...).

o 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

o hotspot (column as hotspot)

Value set: SPACE, 'X'

'X' = column cells are output as hotspots

o 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.

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

IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.

o 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.

o no_sum (sums forbidden)

Value set: SPACE, 'X'

'X' = no sum can be calculated over this field, although the data type of the field would allow summing.

o input (column ready for input)

Function not available

Format column contents

o 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.

o 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 justification of the columns. Independent justification of the column header is not possible.

o lzero (leading zeros)

Value set: SPACE, 'X'

Only relevant for fields of data type NUMC

ALV outputs NUMC fields right-justified without leading zeros by default.

'X' = output with leading zeros

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.

o no_sign (no +/- sign)

Value set: SPACE, 'X'

Only relevant for value fields

'X' = value output without +/ sign

o no_zero (suppress zeros)

Value set: SPACE, 'X'

Only relevant for value fields

'X' = suppress zeros

o 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 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.

The 'long field label' is also used in display variant definition, sort, etc. popups.

o seltext_l (long field label)

o seltext_m (medium field label)

o seltext_s (short field label)

o reptext_ddic (header)

Analogous to the Data element maintenance 'Header'

The specified text is not necessarily output in the list, an optimum among all texts is sought.

o ddictxt (specify text)

Value set: SPACE, 'L', 'M', 'S'

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.

Parameters for program fields without Data Dictionary reference see also 'Text' parameters

o datatype (data type)

Value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)

Only relevant for fields without Data Dictionary reference

Program field data type

o ddic_outputlen (external output length)

value set: 0 (initial), n

Only relevant for fields without Data Dictionary reference whose

output is 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 the

external format output length (FIELDCAT-DDIC_OUTPUTLEN).

o intlen (internal output length)

Value set: 0 (initial), n

Only relevant for fields without Data Dictionary reference whose output is 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

o rollname (data element)

Value set: SPACE, Data Dictionary data element name

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.

When F1 help is called for this field, the documentation of the specified data element is displayed.

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.

Others

o 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 parameter IT_SPECIAL_GROUPS).

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.

o 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 this

field is passed in the selected interface start record as a selection criterion.

Value range

Default

o 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 are output in the list in the order in which they were added to the field catalog.

REF_FIELDNAME need only be specifid when the name of the internal table

field differs from the name of the referred Data Dictionary field.

Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.

Priority rule:

Entries in the field catalog have priority over differing entries in the Data Dictionary.

o 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 element to the parameter ROLLNAME.

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.

IT_EXCLUDING :-

The optional IMPORTING parameter IT_EXCLUDING is an internal table. It is only needed if the caller uses the list tool standard interface but wants to deactivate interface functions which he or she does not need.

In this case the function codes of these standard functions are entered in the table.

IT_SPECIAL_GROUP :-

If fields have been grouped in the field catalog by a shared value of the parameter SP_GROUP, the technical key of the group (FIELDCAT-SP_GROUP) is assigned to the field group text in this internal table.

IT_SORT: - Sort criteria for first list display

The caller specifies the sorting and/or subtotalling of the basic list in the internal table IT_SORT.

This internal table has the following fields:

o spos

Sort sequence

o fieldname

Internal output table field name

o tabname

Only relevant for hierarchical-sequential lists

Name of the internal output table

o up

'X' = sort in ascending order

o down

'X' = sort in descending order

Subtot

'X' = subtotal at group value change

o 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 interface structure IS_LAYOUT for more information about group value change formatting.

o comp (INTERNAL USE ONLY)

o 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, and can then be further expanded interactively by the user, the flag should be set at the total level criterion for level n.

IT_FILTER: -

Filter criteria table

Filter criteria which result, e.g. from explicitly loading an initial display variant, can be passed to list output in this parameter.

This table should never be built-up 'manually'.

IS_SEL_HIDE: -

Only relevant when the layout parameter

LAYOUT-GET_SELINFOS of the IMPORTING structure IS_LAYOUT is set.

Complex type for modifying the information displayed in the selection info popup:

o 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.

o t_entries: Selection info table

o 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.

o 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'. They

contain the selection information to be added.

o t_entries-field: DDIC field name of the field for which selection

information is to be output.

o t_entries-table: DDIC table names of t_entries-field.

o 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.

o t_entries-valuf: Selection condition 'from' value (external format)

o t_entries-valut: Selection condition 'to' value (external format)

o t_entries-sign0: (I)nclusive (E)xclusive

o t_entries-optio: All values of the select options Option field

allowed.

The remaining fields are used internally and are not relevant for the

caller.

I_DEFAULT: -

Initial variant logic active/inactive.

Prerequisite:

The parameter IS_VARIANT has the appropriate value.

See also the documentation of the IMPORTING parameter IS_VARIANT.

Value Range:-

‘ ‘ = no variant can be defined

‘X’= variant can be defined

I_SAVE: -

Controls the storage mode

Prerequisite:

The IS_VARIANT parameter has the appropriate value.

See also the documentation of the IMPORTING parameter IS_VARIANT.

Value range

o ' ' = display variants cannot be saved

Defined display variants (e.g. delivered display variants) can be selected for presentation independently of this flag.

Changes can not be saved.

o 'X' = standard save

Display variants can be saved as standard display variants.

User-specific saving is not possible.

o 'U' = only user-specific saving

The user can only save display variants user-specifically

o '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

IS_VARIANT- Variant Information

This structure is only relevant if display variants are to be saved and/or read.

Variant information including the name of the list output variant.

The access path must be specified in the fields REPORT (required field),

HANDLE (optional) and/or LOG_GROUP (optional) to allow ALV to read

display variants.

If display variants are also to be saved, the parameter I_SAVE must also be entered.

See also the documentation of the IMPORTING parameter I_SAVE.

A variant is identified uniquely by:

• the program to which it is assigned (REPORT)

o 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 the call 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 not change.

o 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 which determines the assignment.

Example:

The program x is called via the transactions T1 and T2. The field catalog fields offered to the user vary depending on the transaction code by assignment to logical groups.

If variants are saved for the program and logical group, the logical group must not change.

o 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 be read 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 a variant.

Default

If the structure is initial but saving is active (I_SAVE is not initial),

IS_VARIANT-REPORT is set to I_CALLBACK_PROGRAM.

IT_EVENTS: -

This table tells ALV which events are processed by the caller by CALLBACK.

The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.

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

REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are

processed.

The table structure contains the fields:

o 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 also be passed directly in the interface in the IMPORTING parameter I_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 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).

The STANDARD status of the function group SALV should be used as a template for a user-specific status.

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.

ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD

RFLG_ALL TYPE C

Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.

Exit for passing item entries (ITEM table) for a header record, which was expanded interactively by the user.

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.

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.

CALLER_EXIT USING RS_DATA

Is called at the beginning of the function module to make special settings. It is not usually used.

- List processing events

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'.

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 for printing.

TOP_OF_COVERPAGE no USING parameter

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:

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 or herself 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 to the information output by ALV (selection information, list status) at this event.

FOREIGN_TOP_OF_PAGE no USING parameter

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).

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.

FOREIGN_END_OF_PAGE no USING parameter

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).

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.

BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO

Output information before each output line. Should only be used in justified 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 in justified 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

o IT_EVENTS-FORM

Name of the form routine, which should be called in the calling program

at the event.

IT_EVENT_EXIT: -

Table for passing ALV standard function codes, to return control to the user before and/or after execution with the callback event USER_COMMAND.

See also the documentation of the IMPORTING parameter

I_CALLBACK_USER_COMMAND.

This table should only be passed when the application wants to react to the execution of standard functions.

This could, e.g. be to check the authorization for a standard function or to select data depending on the current display variant.

Note: the functions 'Back (F3)', 'Cancel (F15)' and 'Exit (F12)' are NOT standard ALV functions, they are system functions. If the application wants to react to these (e.g. to send a confirmation prompt before leaving the list), these functions must be occupied by application function codes.

The table fields are as follows:

o 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 the display variant definition function code.

o before

'X' = the application gets control before ALV executes the function.

o 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 display variant definition popup.

In the function code processing form routine which is passed to ALV in the I_CALLBACK_USER_COMMAND parameter, the application can now get the

field catalog which may have been modified by the user, using the module

REUSE_ALV_LIST_LAYOUT_INFO_GET, and then reselect the data for the

new output fieldes in the internal output table, if necessary.

If the application sets the SELFIELD-REFRESH flag (USER_COMMAND form

routine interface reference parameter) after the selection, the list is output again. Output fields added by the user and reselected data

now appear.

IS_PRINT: -

Print control parameter

o PRINT

Value set: SPACE, 'X'

'X' = the list is to be printed and not displayed on the screen. Other settings can be made in the print parameter screen.

o NO_PRINT_SELINFOS

Value set: SPACE, 'X'

'X' = do not print selection info (see LAYOUT-GET_SELINFOS)

o NO_COVERPAGE

Value set: SPACE, 'X'

'X' = do not print selection information and list status on a separate page.

• NO_NEW_PAGE

Value set: SPACE, 'X'

For internal use only

o 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 the Callback at the event END_OF_PAGE.

o NO_PRINT_LISTINFOS

Value set: SPACE, 'X'

'X' = Do not print list status (sort, subtotal and filter information).

o NO_CHANGE_PRINT_PARAMS

Value set: SPACE, 'X'

SPACE = (default) The output format (number of columns) is dynamically

adjusted to the list width (max. 255).

'X' = The current print parameters are used. If the list is wider, the output width is not dynamically adjusted.

IS_REPREP_ID: -

Initialization key for Re/Re interface.

I_SCREEN_START_COLUMN: -

Only to be used if the list is output in a popup.

x coordinate of the top left-hand corner of the popup

I_SCREEN_START_LINE: -

Only to be used if the list is output in a popup

y coordinate of the top left-hand corner of the popup.

I_SCREEN_END_COLUMN: -

Only to be used if the list is output in a popup

x coordinate of the bottom right-hand corner of the popup.

I_SCREEN_END_LINE: -

Only to be used if the list is output in a popup

y coordinate of the bottom right-hand corner of the popup.

E_EXIT_CAUSED_BY_CALLER: - delete list in the CALLBACK_USER_COMMAND

Parameter which states whether the caller left the list (SELFIELD-EXIT = 'X') in CALLBACK USER_COMMAND

ES_EXIT_CAUSED_BY_CALLER: - (how the user left the list)

If one of the ALV standard function codes for 'Back', 'Cancel' or 'Exit' occurs, the current list is discarded and the ALV function module ends.

In this case the exporting structure ES_EXIT_CAUSED_BY_USER contains one of the following flags:

o ES_EXIT_CAUSED_BY_USER-BACK = 'X' 'Back' occurred

o ES_EXIT_CAUSED_BY_USER-CANCEL = 'X' 'Cancel' occurred

o ES_EXIT_CAUSED_BY_USER-EXIT = 'X' 'Exit' occurred

T_OUTTAB: - (table with data to be displayed)

Internal table with any structure containing the data to be output in list form.

This table can contain more fields than are relevant for the list output (display fields and field list).

Only the fields named in field catalog and the layout structure are used for the list output. Other internal table fields are ignored.

The value of the field FIELDCAT-NO_OUT in the field catalog determines whether a field is output directly in the list, or whether this field is initially put in the field list.

The user can interactively move fields between this field list and the output field list to display or hide them.

If the internal table is defined in the calling program without a header, no F1 help is possible in the list.

2.REUSE_ALV_HIERSEQ_LIST_DISPLAY: - (Used to display multilevel sequential list.)

IMPORTING

VALUE(I_INTERFACE_CHECK) DEFAULT SPACE

VALUE(I_CALLBACK_PROGRAM) LIKE SY-REPID OPTIONAL

VALUE(I_CALLBACK_PF_STATUS_SET) TYPE SLIS_FORMNAME

DEFAULT SPACE

VALUE(I_CALLBACK_USER_COMMAND) TYPE SLIS_FORMNAME

DEFAULT SPACE

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_SCREEN_START_COLUMN) DEFAULT 0

VALUE(I_SCREEN_START_LINE) DEFAULT 0

VALUE(I_SCREEN_END_COLUMN) DEFAULT 0

VALUE(I_SCREEN_END_LINE) DEFAULT 0

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(I_TABNAME_HEADER) TYPE SLIS_TABNAME

VALUE(I_TABNAME_ITEM) TYPE SLIS_TABNAME

VALUE(I_STRUCTURE_NAME_HEADER) LIKE DD02L-TABNAME

OPTIONAL

VALUE(I_STRUCTURE_NAME_ITEM) LIKE DD02L-TABNAME

OPTIONAL

VALUE(IS_KEYINFO) TYPE SLIS_KEYINFO_ALV

VALUE(IS_PRINT) TYPE SLIS_PRINT_ALV OPTIONAL

VALUE(IS_REPREP_ID) TYPE SLIS_REPREP_ID OPTIONAL

EXPORTING

VALUE(E_EXIT_CAUSED_BY_CALLER)

VALUE(ES_EXIT_CAUSED_BY_USER) TYPE SLIS_EXIT_BY_USER

TABLES

T_OUTTAB_HEADER

T_OUTTAB_ITEM

EXCEPTIONS

PROGRAM_ERROR

I_INTERFACE_CHECK: - (Interface consistency check log output.)

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_PROGRAM: - (Name of the calling program.)

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_PF_STATUS_SET: -

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_USER_COMMAND: - (Exit routine for command handling.)

Same as in REUSE_ALV_LIST_DISPLAY

IS_LAYOUT: - (List layout specifications)

Same as in REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT: - (Field catalog with field descriptions)

Same as in REUSE_ALV_LIST_DISPLAY

IT_EXCLUDING: - (Table of inactive function codes)

Same as in REUSE_ALV_LIST_DISPLAY

IT_SPECIAL_GROUPS: - (Grouping fields for column selection)

Same as in REUSE_ALV_LIST_DISPLAY

IT_SORT: -(Sort criteria for first list display)

Same as in REUSE_ALV_LIST_DISPLAY

IT_FILTER: -(Filter criteria for first list output)

Same as in REUSE_ALV_LIST_DISPLAY

IS_SEL_HIDE: - (Selection information modification)

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_START_COLUMN: -(Coordinates for list in dialog box)

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_START_LINE: - -(Coordinates for list in dialog box)

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_END_COLUMN: -(Coordinates for list in dialog box)

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_END_LINE: - -(Coordinates for list in dialog box)

Same as in REUSE_ALV_LIST_DISPLAY

I_DEFAULT: - (Initial variant active/inactive logic)

Same as in REUSE_ALV_LIST_DISPLAY

I_SAVE: -(Variants can be saved)

Same as in REUSE_ALV_LIST_DISPLAY

IS_VARIANT: -(Variant information)

Same as in REUSE_ALV_LIST_DISPLAY

IT_EVENTS: - (Table of events to perform)

Same as in REUSE_ALV_LIST_DISPLAY

IT_EVENT_EXIT: - (Standard fcode exit requests table)

Same as in REUSE_ALV_LIST_DISPLAY

I_TABNAME_HEADER: -(Header Table Name)

Name of the internal table in the program containing the output data of the highest hierarchy level.

I_TABNAME_ITEM: - (Item Table Name)

Name of the internal table in the program containing the output data of the lowest hierarchy level.

I_STRUCTURE_NAME_HEADER:- (Internal output table (header) structure name)

Same as I_STRUCTURE_NAME in REUSE_ALV_LIST_DISPLAY

I_STRUCTURE_NAME_ITEM: -(Internal output table (posit.) structure name)

Same as I_STRUCTURE_NAME in REUSE_ALV_LIST_DISPLAY

IS_KEYINFO: - (Header/posit. table field links)

This structure contains the header and item table field names which link the two tables (shared key).

Enter the foreign key field names in the fields KEYINFO-HEADERxx and

KEYINFO-ITEMxx. The foreign key field names of the header and item tables are usually identical.

The item table has other key fields as well as the header table foreign key. These other key fields should also be named in this structure. The corresponding header table field (HEADERxx) must be SPACE.

Naming the other key fields guarantees a stable item table sort sequence.

IS_PRINT: - (Print information)

Same as in REUSE_ALV_LIST_DISPLAY

IS_REPREP_ID: - (Initialization key for Re/Re interface)

E_EXIT_CAUSED_BY_CALLER: -(Delete list in CALLBACK_USER_COMMAND)

Same as in REUSE_ALV_LIST_DISPLAY

ES_EXIT_CAUSED_BY_USER: -(How the user left the list)

Same as in REUSE_ALV_LIST_DISPLAY

T_OUTTAB_HEADER: -(Header table with data to be output)

Same as T_OUTTAB in REUSE_ALV_LIST_DISPLAY

T_OUTTAB_ITEM: - (Position table with data to be output)

Same as T_OUTTAB in REUSE_ALV_LIST_DISPLAY

3. REUSE_ALV_FIELDCATALOG_MERGE: -(this module is used to create field catalog from dictionary structure or internal table)

IMPORTING

VALUE(I_PROGRAM_NAME) LIKE SY-REPID OPTIONAL

VALUE(I_INTERNAL_TABNAME) TYPE SLIS_TABNAME OPTIONAL

VALUE(I_STRUCTURE_NAME) LIKE DD02L-TABNAME OPTIONAL

VALUE(I_CLIENT_NEVER_DISPLAY) TYPE SLIS_CHAR_1

DEFAULT 'X'

VALUE(I_INCLNAME) LIKE TRDIR-NAME OPTIONAL

CHANGING

VALUE(CT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV

EXCEPTIONS

INCONSISTENT_INTERFACE

PROGRAM_ERROR

I_PROGRAM_NAME: - (Internal table declaration program)

Program from which the function module is called and which contains the exit routines. The program should always be a Report, Function group, Module pool or Form routine pool (not an Include).

I_INTERNAL_TABNAME: -(Output table name)

Name of the internal output table in the CALLBACK_PROGRAM.

I_STRUCTURE_NAME: - (Structure name (structure, table, view))

Same as in REUSE_ALV_LIST_DISPLAY

I_CLIENT_NEVER_DISPLAY: - (Hide client fields)

Client field handling in the structure passed.

Value range

'X', SPACE

SPACE: client fields (type CLNT) in the structure passed are flagged as technical (=> no screen output) in the field catalog.

I_INCLNAME: -(Data declaration include name)

If the list output structure data declaration is not in the assigned TOP Include, the Include name can be specified here if no structure is specified.

CT_FIELDCAT: - (Field catalog with field descriptions)

Same as IT_FIELDCAT in REUSE_ALV_LIST_DISPLAY.

4. REUSE_ALV_COMMENTARY_WRITE: - (this module is used for list body comment block output)

IMPORTING

VALUE(IT_LIST_COMMENTARY) TYPE SLIS_T_LISTHEADER

IT_LIST_COMMENTARY: - (Comment block)

Internal table with the following fields:

o TYP: Possible values:

- (H)eader: - List header

- only the contents of INFO are

output (KEY is ignored)

- usually one line = one entry

Attributes: - left-justified

- bold

- followed by empty line

- (S)election: - Important header information, e.g. currency of amounts in the list

- display format:

KEY(bold) INFO(normal)

Ex.:

- KEY- -


INFO-----

Currency DEM Ctrl area curr.

Material FGS_TEST Test material

- Usually several entries (one entry per line)

Attributes: - left-justified

- Bold (KEY=on/INFO=off)

- Followed by empty line

- (A)ction: - Action info (see LIBS)

- Direct output via table

- Only the contents of INFO are

Output (KEY is ignored)

- Usually one entry

Attributes: - left-justified

- Normal intensity

o KEY: String with keyword character output in combination with TYP = 'S'.

o INFO: Information output in header, formatted by type.

5. REUSE_ALV_EVENTS_GET: - (this module returns table of possible events for a list type)

IMPORTING

VALUE(I_LIST_TYPE) TYPE SLIS_LIST_TYPE DEFAULT 0

EXPORTING

VALUE(ET_EVENTS) TYPE SLIS_T_EVENT

EXCEPTIONS

LIST_TYPE_WRONG

I_LIST_TYPE: -(List type (0,1,2,3))

0 = simple list (REUSE_ALV_LIST_DISPLAY)

1 = hierarchcal-sequential list (REUSE_ALV_HIERSEQ_LIST_DISPLAY)

2 = simple block list (REUSE_ALV_BLOCK_LIST_APPEND)

3 = hierarchical-sequential block list (REUSE_ALV_BLOCK_LIST_HS_APPEND)

ET_EVENTS: - (Table of events to perform)

The event table is returned with all possible CALLBACK events 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.

The function module REUSE_ALV_EVENT_NAMES_GET gets the names of these

constants (call in test mode).

6. REUSE_ALV_BLOCK_LIST_INIT: - (This module is used for the initialization of blocks & called first before calling REUSE_ALV_BLOCK_LIST_APPEND or REUSE_ALV_BLOCK_LIST_HS_APPEND)

IMPORTING

VALUE(I_CALLBACK_PROGRAM) LIKE SY-REPID

VALUE(I_CALLBACK_PF_STATUS_SET) TYPE SLIS_FORMNAME

DEFAULT SPACE

VALUE(I_CALLBACK_USER_COMMAND) TYPE SLIS_FORMNAME

DEFAULT SPACE

VALUE(IT_EXCLUDING) TYPE SLIS_T_EXTAB OPTIONAL

I_CALLBACK_PROGRAM: -

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_PF_STATUS_SET: -

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_USER_COMMAND: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_EXCLUDING: -

Same as in REUSE_ALV_LIST_DISPLAY

7.REUSE_ALV_BLOCK_LIST_APPEND: -(this behaves same as REUSE_ALV_LIST_DISPLAY)

IMPORTING

VALUE(IS_LAYOUT) TYPE SLIS_LAYOUT_ALV

VALUE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV

VALUE(I_TABNAME) TYPE SLIS_TABNAME

VALUE(IT_EVENTS) TYPE SLIS_T_EVENT

VALUE(IT_SORT) TYPE SLIS_T_SORTINFO_ALV OPTIONAL

VALUE(I_TEXT) TYPE SLIS_TEXT40 DEFAULT SPACE

TABLES

T_OUTTAB

EXCEPTIONS

PROGRAM_ERROR

MAXIMUM_OF_APPENDS_REACHED

IS_LAYOUT: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT: -

Same as in REUSE_ALV_LIST_DISPLAY

I_TABNAME: -

IT_EVENTS: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_SORT: -

Same as in REUSE_ALV_LIST_DISPLAY

I_TEXT: -

T_OUTTAB: -

Same as in REUSE_ALV_LIST_DISPLAY

8.REUSE_ALV_BLOCK_LIST_HS_APPEND: -(this behaves same as REUSE_ALV_HIERSEQ_LIST_DISPLAY)

IMPORTING

VALUE(IS_LAYOUT) TYPE SLIS_LAYOUT_ALV

VALUE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV

VALUE(IS_KEYINFO) TYPE SLIS_KEYINFO_ALV

VALUE(I_HEADER_TABNAME) TYPE SLIS_TABNAME

VALUE(I_ITEM_TABNAME) TYPE SLIS_TABNAME

VALUE(IT_EVENTS) TYPE SLIS_T_EVENT

VALUE(IT_SORT) TYPE SLIS_T_SORTINFO_ALV OPTIONAL

VALUE(I_TEXT) TYPE SLIS_TEXT40 DEFAULT SPACE

TABLES

T_OUTTAB_HEADER

T_OUTTAB_ITEM

EXCEPTIONS

PROGRAM_ERROR

IS_LAYOUT: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

IT_FIELDCAT: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

IS_KEYINFO: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

I_HEADER_TABNAME: -

Same as I_TABNAME_HEADER in REUSE_ALV_HIERSEQ_LIST_DISPLAY

I_ITEM_TABNAME: -

Same as I_TABNAME_ITEM in REUSE_ALV_HIERSEQ_LIST_DISPLAY

IT_EVENTS: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

IT_SORT: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

I_TEXT: -

T_OUTTAB_HEADER: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

T_OUTTAB_ITEM: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

9. REUSE_ALV_BLOCK_LIST_DISPLAY: - (This module is called display blocks after appending then.)

IMPORTING

VALUE(I_INTERFACE_CHECK) DEFAULT SPACE

VALUE(IS_PRINT) TYPE SLIS_PRINT_ALV OPTIONAL

VALUE(I_SCREEN_START_COLUMN) DEFAULT 0

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

EXCEPTIONS

PROGRAM_ERROR

I_INTERFACE_CHECK: -

Same as in REUSE_ALV_LIST_DISPLAY

IS_PRINT: -

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_START_COLUMN: -

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_START_LINE: -

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_END_COLUMN: -

Same as in REUSE_ALV_LIST_DISPLAY

I_SCREEN_END_LINE: -

Same as in REUSE_ALV_LIST_DISPLAY

E_EXIT_CAUSED_BY_CALLER: -

Same as in REUSE_ALV_LIST_DISPLAY

ES_EXIT_CAUSED_BY_USER: -

Same as in REUSE_ALV_LIST_DISPLAY

10.REUSE_ALV_LIST_LAYOUT_INFO_GET: - (this module is used to read current ALV list information)

XPORTING

VALUE(ES_LAYOUT) TYPE SLIS_LAYOUT_ALV

VALUE(ET_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV

VALUE(ET_SORT) TYPE SLIS_T_SORTINFO_ALV

VALUE(ET_FILTER) TYPE SLIS_T_FILTER_ALV

VALUE(ES_LIST_SCROLL) TYPE SLIS_LIST_SCROLL

VALUE(ES_VARIANT) LIKE DISVARIANT

STRUCTURE DISVARIANT

XCEPTIONS

NO_INFOS

PROGRAM_ERROR

ES_LAYOUT: -

Same as IT_LAYOUT in REUSE_ALV_LIST_DISPLAY

ET_FIELDCAT: -

Same as IT_FIELDCAT in REUSE_ALV_LIST_DISPLAY

ET_SORT: -

Same as IT_SORT in REUSE_ALV_LIST_DISPLAY

ET_FILTER: -

Same as IT_FILTER in REUSE_ALV_LIST_DISPLAY

ES_LIST_SCROLL: -

Structure with fields which describe the current list scroll status:

o lsind

See the documentation of the system field SY-LSIND

o cpage

See the documentation of the system field SY-CPAGE

o staro

See the documentation of the system field SY-STARO

o cursor_line

Current cursor row position in the list (not in the internal output

Table)

o cursor_offset

current cursor column position in the list (not in the internal output table)

ES_VARIANT: -

Same as IS_VARIANT in REUSE_ALV_LIST_DISPLAY

11.REUSE_ALV_LIST_LAYOUT_INFO_SET: -(this module is used to set the current ALV list information)

IMPORTING

VALUE(IS_LAYOUT) TYPE SLIS_LAYOUT_ALV OPTIONAL

VALUE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV OPTIONAL

VALUE(IT_SORT) TYPE SLIS_T_SORTINFO_ALV OPTIONAL

VALUE(IT_FILTER) TYPE SLIS_T_FILTER_ALV OPTIONAL

VALUE(IS_LIST_SCROLL) TYPE SLIS_LIST_SCROLL OPTIONAL

IS_LAYOUT: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_SORT: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_FILTER: -

Same as in REUSE_ALV_LIST_DISPLAY

IS_LIST_SCROLL: -

Same as ES_LIST_SCROLL in REUSE_ALV_LIST_LAYOUT_INFO_GET

12.REUSE_ALV_POPUP_TO_SELECT: -(This module is used to List in popup to choose one or more entries (or display only))

IMPORTING

VALUE(I_TITLE) OPTIONAL

VALUE(I_SELECTION) DEFAULT 'X'

VALUE(I_ZEBRA) DEFAULT SPACE

VALUE(I_SCREEN_START_COLUMN) DEFAULT 0

VALUE(I_SCREEN_START_LINE) DEFAULT 0

VALUE(I_SCREEN_END_COLUMN) DEFAULT 0

VALUE(I_SCREEN_END_LINE) DEFAULT 0

VALUE(I_CHECKBOX_FIELDNAME) OPTIONAL

VALUE(I_LINEMARK_FIELDNAME) OPTIONAL

VALUE(I_SCROLL_TO_SEL_LINE) DEFAULT 'X'

VALUE(I_TABNAME)

VALUE(I_STRUCTURE_NAME) LIKE DD02L-TABNAME OPTIONAL

VALUE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV OPTIONAL

VALUE(IT_EXCLUDING) TYPE SLIS_T_EXTAB OPTIONAL

VALUE(I_CALLBACK_PROGRAM) LIKE SY-REPID OPTIONAL

VALUE(I_CALLBACK_USER_COMMAND) TYPE SLIS_FORMNAME

OPTIONAL

EXPORTING

VALUE(ES_SELFIELD) TYPE SLIS_SELFIELD

VALUE(E_EXIT)

TABLES

T_OUTTAB

EXCEPTIONS

PROGRAM_ERROR

I_TITLE: - (Dialog box title)

Title to be displayed as the popup title.

I_SELECTION: - ((X) = Selection possible, ( ) = Display)

I_SELECTION = 'X' => the user can select entries in the displayed internal table.

I_ZEBRA: - (Line output with alternating color)

I_ZEBRA = 'X' => List rows are output in alternating colors for better readability. This option should be used when the list is relatively wide.

I_SCREEN_START_COLUMN: -

Column coordinate of the top left-hand corner of the popup.

If no coordinates or only the coordinates of the top left-hand corner are specified in the interface, the module calculates the optimal coordinates using the table information. The coordinates need not normally be specified in the interface parameters.

You can position the popups by specifying the top left-hand corner, without specifying its size.

I_SCREEN_START_LINE: -

Row coordinate of the top left-hand corner of the popup.

I_SCREEN_END_COLUMN: -

Column coordinate of the bottom right-hand corner of the popup.

I_SCREEN_END_LINE: -

Row coordinate of the bottom right-hand corner of the popup.

I_CHECKBOX_FIELDNAME: - (Output table checkbox field name)

If the table output in the popup has checkboxes at the beginning of the rows (e.g. for multiple selection), the internal table must contain a field containing the value of the checkbox.

Assign the name of this field to the parameter I_CHECKBOX_FIELDNAME.

I_LINEMARK_FIELDNAME: - (Line selection color information field name)

Name of the internal output table field containing the color code.

A complete list row is colored individually by color coding in a column of the internal output table. The name of this field is assigned to this parameter.

The internal output table field must be of type CHAR(3).

The coding must have the following syntax:

'Cxy':

C = color (each code must begin with 'C')

x = color number ('1'-'9')

y = highlight ('0' = off, '1' = on)

Note: the color of the key columns is not affected.

I_SCROLL_TO_SEL_LINE: - (Scroll to default selection if necessary)

Prerequisite:

A row has been color highlighted and its index in the internal output table is greater than the number of entries which can be displayed in the popup without scrolling.

When the popup is called, the cursor should be immediately positioned on, or scrolled to, this row.

Prerequisite: color code the highlighted row with 'C50'

See also the documentation of the importing parameter

I_LINEMARK_FIELDNAME

I_TABNAME: - (Table name with chosen values)

Name of the internal output table in the calling program

I_STRUCTURE_NAME: - (Internal output table structure name)

Same as I_STRUCTURE_NAME in REUSE_ALV_LIST_DISPLAY

IT_FIELDCAT: -

Same as in REUSE_ALV_LIST_DISPLAY

IT_EXCLUDING: -

The optional IMPORTING parameter IT_EXCLUDING is an internal table.

This is only used when the caller wants to deactivate standard functions.

The function codes of these standard functions are entered in this table.

At most the following functions are active in the standard and can be deactivated using IT_EXCLUDING:

o Function code: &ETA (Detail)

o Function code: &SC (Find)

o Function code: &SC+ (Find next)

o Function code: &OUP (Sort ascending)

o Function code: &ODN (Sort descending)

o Function code: &ILT (Filter)

o Function code: &OL0 (Display variant)

o Function code: &CRB (Horizontal scroll: First column)

o Function code: &CRL (Horizontal scroll: Previous column)

o Function code: &CRR (Horizontal scroll: Next column)

o Function code: &CRE (Horizontal scroll: Last column)

o Function code: &AC1 (Cancel)

Only for active checkboxes:

o Function code: &ALL (Select all)

o Function code: &SAL (Deselect all)

I_CALLBACK_PROGRAM: -

Same as in REUSE_ALV_LIST_DISPLAY

I_CALLBACK_USER_COMMAND: -

Same as in REUSE_ALV_LIST_DISPLAY

ES_SELFIELD: -

The structure SELFIELD contains the following information about the current cursor position

o tabname : internal output table name

o tabindex : internal output table index

o fieldname: field name

o value : field contents

Multiple selection using checkboxes puts an 'X' in the

I_CHECKBOX_FIELDNAME field in the corresponding row in the internal

table.

E_EXIT: - ('X' = Cancel by user)

Flag is set when the user leaves the popup with the 'Cancel' function.

T_OUTTAB: -

Internal table of any structure which contains the data to be output in list form.

Only the fields named in the field catalog and in the I_CHECKBOX_FIELDNAME parameter are used for the list output. Other internal table fields are ignored.

13.REUSE_ALV_VARIANT_DEFAULT_GET: -(This module is used to read default display variant)

IMPORTING

VALUE(I_SAVE) DEFAULT SPACE

CHANGING

VALUE(CS_VARIANT) LIKE DISVARIANT

STRUCTURE DISVARIANT

EXCEPTIONS

WRONG_INPUT

NOT_FOUND

PROGRAM_ERROR

I_SAVE: - (Variant can be saved)

Same as in REUSE_ALV_LIST_DISPLAY

CS_VARIANT: - (Variant information)

Same as in REUSE_ALV_LIST_DISPLAY

WRONG_INPUT: - Inconsistent input parameters

NOT_FOUND: - Variant not found

PROGRAM_ERROR: - Program errors

14.REUSE_ALV_VARIANT_F4: -(This module is used to display variant selection popup)

IMPORTING

VALUE(IS_VARIANT) LIKE DISVARIANT

STRUCTURE DISVARIANT

VALUE(I_TABNAME_HEADER) TYPE SLIS_TABNAME OPTIONAL

VALUE(I_TABNAME_ITEM) TYPE SLIS_TABNAME OPTIONAL

VALUE(IT_DEFAULT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV

OPTIONAL

VALUE(I_SAVE) DEFAULT SPACE

EXPORTING

VALUE(E_EXIT)

VALUE(ES_VARIANT) LIKE DISVARIANT

STRUCTURE DISVARIANT

EXCEPTIONS

NOT_FOUND

PROGRAM_ERROR

IS_VARIANT: -

Same as in REUSE_ALV_LIST_DISPLAY

I_TABNAME_HEADER: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

I_TABNAME_ITEM: -

Same as in REUSE_ALV_HIERSEQ_LIST_DISPLAY

IT_DEFAULT_FIELDCAT: -

Same as in REUSE_ALV_LIST_DISPLAY

I_SAVE: -

Same as in REUSE_ALV_LIST_DISPLAY

E_EXIT: - Dialog cancelled by user

ES_VARIANT: -

Same as in REUSE_ALV_LIST_DISPLAY

15.REUSE_ALV_VARIANT_EXISTENCE: - (this module is used to check existence of a display variant)

IMPORTING

VALUE(I_SAVE) DEFAULT SPACE

CHANGING

VALUE(CS_VARIANT) LIKE DISVARIANT

STRUCTURE DISVARIANT

EXCEPTIONS

WRONG_INPUT

NOT_FOUND

PROGRAM_ERROR

I_SAVE: -

Same as in REUSE_ALV_LIST_DISPLAY

CS_VARIANT: -

Same as in REUSE_ALV_LIST_DISPLAY

<b>reward points if helpful,

Regards

Raghunath.S</b>

Read only

Former Member
Read only

Former Member
0 Likes
764

hi,

<b>The commonly used ALV functions used for this purpose are;</b>

REUSE_ALV_COMMENTARY_WRITE -


>List body comment block output

REUSE_ALV_EVENTS_GET -


>Returns table of possible events for a list type

REUSE_ALV_EVENT_NAMES_GE----> Returns table of constant names of possible events for a list type

REUSE_ALV_FIELDCATALOG_MERGE----> Create field catalog from dictionary structure or internal table

REUSE_ALV_HIERSEQ_LIST_DISPLAY------> Hierarchical sequential list output

REUSE_ALV_LIST_DISPLAY-----> Output a simple list (single line or several lines)

REUSE_ALV_GRID_DISPLAY----> Output a simple list (single line or several lines)

REUSE_ALV_LIST_LAYOUT_INFO_GET----> Read current ALV list information

REUSE_ALV_LIST_LAYOUT_INFO_SET-----> Set current ALV list information

REUSE_ALV_LIST_WIDTH_GET

REUSE_ALV_POPUP_TO_SELECT------> List in dialog box to choose one or more entries (or display only)

REUSE_ALV_VARIANT_DEFAULT_GET----> Read default layout (description only, w/o field catalog)

REUSE_ALV_VARIANT_EXISTENCE----> Checks whether a display variant exists

REUSE_ALV_VARIANT_F4----> Display variant selection dialog box

<b>follow thse links for sample programs and functionalities of each and every FM.</b>

http://www.sap-img.com/abap/what-is-alv-programming.htm

http://www.sap-img.com/abap-function.htm

regards,

Ashokreddy

Read only

0 Likes
764

hi thanks bose for responding to my query