Escolar Documentos
Profissional Documentos
Cultura Documentos
• Uses typical list functions - such as sorting and filtering, without extra
programming effort.
• Basic calculations.
1)ALV can not display deep structures, so you need to flatten the
data i.e. linear structure.
4)In Grid Display, cells of sorted columns with same values can be
merged. It is not possible with ALV List Display.
5) In Grid Display, printing can only be done by switching
to list display.
• REUSE_ALV_VARIANT_F4
• REUSE_ALV_VARIANT_EXISTENCE
• REUSE_ALV_EVENTS_GET
• REUSE_ALV_COMMENTARY_WRITE
• REUSE_ALV_FIELDCATALOG_MERGE
• REUSE_ALV_LIST_DISPLAY
• REUSE_ALV_GRID_DISPLAY
• REUSE_ALV_POPUP_TO_SELECT
Type Pool – SLIS.
Sap standard tables types taken from the type pools are:
•SLIS_LAYOUT_ALV
•SLIS_T_FIELDCAT_ALV
•SLIS_T_LISTHEADER
•SLIS_T_EVENT
• Display variants are used to set the default properties of an ALV
output.
REUSE_ALV_VARIANT_DEFAULT_GET
REUSE_ALV_VARIANT_F4
REUSE_ALV_VARIANT_EXISTENCE
•
REUSE_ALV_FIELDCATALOG_MERGE
• Example:
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
X_FIELDCAT-COL_POS= 1.
X_FIELDCAT-FIELDNAME = ‘MATNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-SELTEXT_ M = ‘Material'.
•An event table is used for firing the user commands and
triggering the system dependent events such as TOP_OF _PAGE
, END_OF_PAGE etc.
REPREP_SEL_MODIFY
CALLER_EXIT
USER_COMMAND
TOP_OF_PAGE
TOP_OF_COVERPAGE
END_OF_COVERPAGE
FOREIGN_TOP_OF_PAGE
GROUPLEVEL_CHANGE
CONTEXT_MENU
FOREIGN_END_OF_PAGE
PF_STATUS_SET
LIST_MODIFY
TOP_OF_LIST
END_OF_PAGE
END_OF_LIST
AFTER_LINE_OUTPUT
BEFORE_LINE_OUTPUT
SUBTOTAL_TEXT
A layout is build for the report output list description USING
the structure of type SLIS_LAYOUT_ALV
We fill the structure to specify general layout options for the
grid. With this structure we can set:
• Display options
• Exceptions
• Totals
•Display variants (only for hierarchical-sequential lists)
• Color
• Other
•Example code :
I_LAYOUT-zebra = 'X'.
I_LAYOUT-hotspot_fieldname = FIELDNAME.
• The sort table is used to get the current sort criteria of the list
or set the criteria dynamically or before the list is displayed
for the first time.
HEADER DATA
ITEM DATA
ALV Hierarchical display
• Hierarchical display is used to display the Master
(Header) data and Transactional (Item) data in the same
ALV.
This looks like a simple report but this report has the features of
sorting and filtering only.
• REUSE_ALV_BLOCK_LIST_INIT
• REUSE_ALV_BLOCK_LIST_APPEND
• REUSE_ALV_BLOCK_LIST_DISPLAY
• REUSE_ALV_BLOCK_HS_LIST_APPEND
Block display contd.
REUSE_ALV_BLOCK_LIST_INIT
Parameters:
a. I_CALLBACK_PROGRAM
b. I_CALLBACK_PF_STATUS_SET
c. I_CALLBACK_USER_COMMAND
This function module is used to set the default GUI status etc. The
parameters are similar to the one used in REUSE_ALV_LIST_DISPLAY
or REUSE_ALV_GRID_DISPLAY
Block Display contd.
REUSE_ALV_BLOCK_LIST_APPEND
Export :
a. is_layout : layout settings for block
b. it_fieldcat : field catalog
c. I_tabname : internal table name with all possible
events
Tables :
a. t_outtab : internal table with output data.
This function module display the list with data appended by the
above function.
Sample output
BLOCK 1
BLOCK 2
BLOCK 3
RS_TREE_COMPRESS
RS_TREE_EXPAND
RS_TREE_CREATE
RS_TREE_CONSTRUCT
RS_TREE_LIST_DISPLAY