Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV Functions

Hi,

Could anybode explain the following functions in detail?

1. REUSE_ALV_VARIANT_DEFAULT_GET

2. REUSE_ALV_VARIANT_F4

3. REUSE_ALV_VARIANT_EXISTENCE

4. REUSE_ALV_EVENTS_GET

5. REUSE_ALV_COMMENTARY_WRITE

6. REUSE_ALV_FIELDCATALOG_MERGE

7. REUSE_ALV_LIST_DISPLAY

8. REUSE_ALV_GRID_DISPLAY

9. REUSE_ALV_POPUP_TO_SELECT

I would be very much thankful for your contribution.

Regards,

Mallika

Tags:
Former Member
replied

Hi

<b>1. REUSE_ALV_VARIANT_DEFAULT_GET</b>

Read default display variant (description only, w/o field catalog)

Provides the default variant for the list specified in the structure parameter CS_VARIANT of a program

<b>2. REUSE_ALV_VARIANT_F4</b>

Display variant selection dialog box

Possible entries help, if the variant is defined explicitly as an input field on a screen. The selection must be specified by at least partially filling the parameter structure IS_VARIANT.

<b>3. REUSE_ALV_VARIANT_EXISTENCE</b>

Checks whether a display variant exists

This function module checks the existence in the database of a display variant passed in the interface.

<b>4. REUSE_ALV_EVENTS_GET</b>

Returns table of possible events for a list type

This table can be passed to the ALV display module with the form name.

<b>5. REUSE_ALV_COMMENTARY_WRITE</b>

List body comment block output

List header information is output according to its type. The output information is put in an internal table. Output attributes are assigned to each line via the TYP field.

This module outputs formatted simple header information at TOP-OF-PAGE.

Example

List <-- Type 'H'

Currency DEM Controlling area currency <-- Type 'S'

Material FGS_TEST Test material <-- Type 'S'

Action info <-- Type 'A'

-


Column headers -


-


List -


<b>6. REUSE_ALV_FIELDCATALOG_MERGE</b>

Create field catalog from dictionary structure or internal table

Supports the creation of the field catalog for the ALV function modules based either on a structure or table defined in the ABAP Data Dictionary, or a program-internal table.

The program-internal table must either be in a TOP Include or its Include must be specified explicitly in the interface.

The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:

Performance is affected since the code of the table definition must always be read and interpreted at runtime.

Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used.

If the field catalog contains more than 90 fields, the first 90 fields are output in the list by default whereas the remaining fields are only available in the field selection.

If the field catalog is passed with values, they are merged with the 'automatically' found information.

<b>7. REUSE_ALV_LIST_DISPLAY</b>

Output a simple list (single line or several lines)

This module outputs an internal table with any structure as a formatted one-line or multiple-line list.

<b>Principle:</b>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.

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 be displayed.

The application must take this consideration into account.

<b>8. REUSE_ALV_GRID_DISPLAY</b>

Output of a simple list (single-line)

The function module outputs an internal table with whatever structure in the form of a formatted single- oder multi-line list.

<b>Process:</b>

Passing an internal table with the set of information to be output

Passing a structure with general layout specifications for list layout

Passing a field catalog in the form of an internal table

The field catalog describes the fields to be output in the list.

All interactions performed on the list refer directly to the internal output table. Sorting the list, for example, also involves a resorting of the internal output table passed (since it was passed by reference).

An important factor determining the usability of the tool or of various generic functions (totals, subtotals) is the expected amount of data to be displayed.

The application is responsible for critically testing this aspect and consider

<b>9. REUSE_ALV_POPUP_TO_SELECT</b>

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

Module for displaying or selecting table entries in internal tables in a popup (single or multiple selection is possible).

<b>Principle:</b>

pass an internal table with the superset of information to be output

pass list layout detail flags

pass a field catalog in the form of an internal table

The field catalog describes the fields to be output in the list.

<b>Further information</b>

The module uses the function module 'REUSE_ALV_LIST_DISPLAY' internally. The documentation of this module contains further information about the field catalog.

<b>Reward if usefull</b>

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question