Alv Grid
Alv Grid
Alv Grid
1. Building blocks of ALV are Data internal table, Field catalog (int. table of
type LVC_T_FCAT), Layout structure (of type LVC_S_LAYO), Event handler
(event handler class is required to handle events generated from ALV
instance) and Additional data (for sorting, filtering, button deactivation etc).
2. There are three steps to generate ALV Automatic, SemiAutomatic and
Manual Generation.
3. Generating Field catalog
a. Field REF_FIELD is filled in , if the field in the data internal table is diff.
from that in Data Dictionary.
b. Field CHECKBOX needs to be filled in, if you want to display
checkboxes in the output.
c. Field DO_SUM is used to perform column summing .
d. Field EMPHASIZE is used for setting pre-defined colors for
emphasizing. It is in Cxyz format. X color number , Y intensified
display on/off , Z inverse display on/off.
e. Field HREF_HNDL defines the handle to which the URL is linked. You
must maintain the target address to this table of type LVC_S_HYPE.
f. Field NO_OUT is used to hide key fields.
g. Field KEY is used to keep a field as key and to freeze the field during
horizontal scrolling.
h. Field NO_MERGING, if set, will prevent cells of same value to be
merged during sorting.
i. Field STYLE can be used to display columns like buttons, link etc. It
should be mapped to constants like MC_STYLE..
j. Field JUST (applicable to CHAR & NUMC) for justifying the output (L, R
or C).
k. Field LZERO(applicable to only NUMC) is used for displaying Leading
zeroes.
l. Field NO_SIGN is used to high negative signs.
m. Field NO_ZERO is used for keeping cells empty incase of zero values.
4. If you are passing values in parameter I_STRUCTURE_NAME and filling the
field catalog table for method SET_TABLE_FOR_FIRST_DISPLAY, priority goes
to the former.
5. Handling Layout:
a. Field CWIDTH_OPT is used to optimize column width.
b. Field SEL_MODE enables you to select single/multiple rows/columns
(space = default, simple selection, with no buttons, A = multiple
row/column selection using buttons, B = same as space, C= multiple
rows/columns with no buttons, D = cell selection ).
c. Method GET_SELECTED_CELLS, GET_SELECTED_CELLS_ID are used for
identifying selected cells. GET_SELECTED_ROWS give information