
A table has fields Article Description, Price, and Storage Quantity. The table should be displayed with two additional fields for:
The two fields can be defined in the structure on the local ABAP server. The field values are calculated in ABAP only for the visible area, and are therefore called Calculated Fields.
Embedding in the Program Flow
Application-specific columns can be inserted into the view of a database table within an application. The fields of these columns are filled with additional read operations from other database tables or external sources oe with application specific icons (@XX@). If required, the field contents can be evaluated from other fields in the table too. However, be aware that for performance reasons, calculations are first to be executed at database level. ALV services cannot be used on these columns (see below).
These columns are not part of the database table/view whose name was specified in the create method. The values of these additional columns are first created in the moment when they are displayed on the screen.
Interface: IF_SALV_IDA_CALC_FIELD_HANDLER
Example report for an in-container display: SALV_IDA_CALC_FIELDS_1