Common ALV format parameters =============================================== ================================== Author: andy-lau1984 (http://andy-lau1984.itpub.net)
Posted on: 2007.09.06
Type: SAP ABAP
Source: http://andy-lau1984.itpub.net/post/33236/392754
---------------------------------------------------------------
Call function module:
Call function 'reuse _ alv_grid_display'
Exporting
I _interface_check =''Interface consistency check
I _callback_program = sy-repidCurrentProgramName
Is_layout = LayoutOutput style
It_fieldcat = fieldcat []Field definition description table
I _callback_pf_status_set = 'pf _ status_set'Trigger event call subroutine
I _callback_user_command = 'user _ command'Mouse event operation subroutine
It_events = I _events []Exit program trigger event
I _callback_html_top_of_page = 'alv _ top_of_page 'ALVOutput header settings
I _grid_settings = wl_lvc_s_glayPrint header settings
It_sort = sortable []Sorting settings
Tables
T_outtab = ig_out
Exceptions
Program_error = 1
Others = 2.
Common attributes: (assign value)''The content must be in uppercase)
1.Fieldcat
Data: fieldcat type slis_t_fieldcat_alv with header line.
It_fieldcat = fieldcat []
Attribute (Used to define information about each column in a form)
Fieldcat-Col_pos = n.Output Column
Fieldcat-Tabname = 'fieldname '.Corresponding field name of the inner table
fieldcat -seltext_s/M/L = ' column name '. output column text ( _ S : short text _ L : long text)
Fieldcat-Emphasize = 'cx 10 '.Highlighted columns with colors (WhereX =(1-7) Same colorFormat)
Fieldcat-hotspot = 'x '.Display as hotspot Trigger a mouse trigger event
Fieldcat-Currency = 'currkey '.TableTcurxCurrency name in
Fieldcat-Quantity (3)Measurement Unit
Fieldcat-QfieldnameField name of the measurement unit
Fieldcat-Round = n.Rounded to decimal places NBit
Fieldcat-Exponent = n.The power index of a floating point isN
Fieldcat-Key = 'x '.Keyword Field
Fieldcat-Icon = 'x '.Output as icon
Fieldcat-Symbol = 'x '.Output as a symbol
Fieldcat-Checkbox = 'x '.Output as check box
Fieldcat-Just =Space, 'R', 'l', 'C'.Alignment Mode
Fieldcat-Lzero = 'x '.Output leading zero
Fieldcat-No_sign = 'x '.Output suppression symbol
Fieldcat-No_zero = 'x '.Hide zero for output
Fieldcat-Edit_mask =Space, mask..The output isMask.
Fieldcat-Fix_column = 'x '.Fixed Column
Fieldcat-Do_sum = 'x '.Total column value sum
Fieldcat-No_out = 'x '.No column output
Fieldcat-Tech = 'x '.This field is a technical field
Fieldcat-Outputlen = NThe character width of a column isN
Fieldcat-Decimals_out = NThe number of digits that can control the decimal point isN
Fieldcat-datatype = C, I, n... Define data types
2.Layout
Data: Layout type slis_layout_alv.
Is_layout = Layout
Attribute(Used to defineALVFormat and attributes of a form)
Info_fieldname = 'line _ color '.Set special line color
(SetLine_colorAdd to inner table field, write'Cx10'To Special rowsLine_color, XIs the color value)
Colwidth_optimize = 'x '.Optimize column width settings
No_colhead = 'x '.Column name not displayed
No_vline= 'X '.Do not show vertical lines between columns
Zebra
F2code = '& ETA '.Set the function code of the trigger pop-up detail window. Double-click
No_vlineThis is used to set the column delimiter.
Detail_initial_lines
Detail_popupWhether to display the Details window
Detail_titlebarSet the title bar of the pop-up window
Totals_text
Totals_only
Group_change_edit
Header_text