Web Dynpro for ABAP(4):SAP List Viewer in Web Dynpro ABAP


3.8SAP List Viewer in Web Dynpro ABAP

SAP List Viewer (ALV),Component: SALV_WD_TABLE。

ALV可以自定义内容:

Filters

Sorting across multiple columns

Displaying calculations and subtotals

Display in Crystal Reports with predefined Crystal Report layouts

Configurable print version in PDF format

Export of data to Excel

Hierarchical display of table

示例:

WDT_ALV

ALV使用步骤

1. Used Components子页签,创建Component Use;

2.View中使用ALV Component;

3.将ALV View嵌入到ViewContainerUIElement这个View组件;

4. ALV Configuration Model

配置ALV显示列,配置ALV Layout,配置ALV Function等;

Package: SALV_WD_CONFIG

类CL_SALV_WD_CONFIG_TABLE结构图:

 

Table Settings(IF_SALV_WD_TABLE_SETTINGS);

Column Settings (IF_SALV_WD_COLUMNS_SETTINGS);

Field Settings (IF_SALV_WD_FIELD_SETTINGS);

ALV Standard Functions Settings (IF_SALV_WD_STD_FUNCTIONS);

Settings for Application-Specific Functions (IF_SALV_WD_FUNCTION_SETTINGS);

5.初始化ALV Component usage,wd_this->wd_cpuse_xxxx(component name)

示例代码1:

* create an instance of ALV component
  DATA:lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
  lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
  IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
    lr_salv_wd_table_usage->create_component( ).
  ENDIF.

示例代码2:wd_this->alv_config_table类型为CL_SALV_WD_CONFIG_TABLE

* get ALV component
  DATA:lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
  wd_this->alv_config_table = lr_salv_wd_table->get_model( ). 

示例代码3:配置alv

* set visible row count
  DATA:lr_table_settings TYPE REF TO if_salv_wd_table_settings.

  lr_table_settings ?= wd_this->alv_config_table.
  lr_table_settings->set_visible_row_count( '3' ).
* hide column CURR_ISO
  DATA:lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_column          TYPE REF TO cl_salv_wd_column.
  lr_column_settings ?= wd_this->alv_config_table.
  lr_column = lr_column_settings->get_column( 'CURR_ISO' ).
  lr_column->set_visible( if_wdl_core=>visibility_none ).

ALV Config:Standard Functions Settings

使用接口:IF_SALV_WD_STD_FUNCTIONS,设置Standard Function。

设置Sorting

方法:

SET_SORT_COMPLEX_ALLOWED

SET_SORT_HEADERCLICK_ALLOWED

IS_SORT_HEADERCLICK_ALLOWED

设置Filters

方法:

SET_FILTER_COMPLEX_ALLOWED

SET_FILTER_FILTERLINE_ALLOWED

设置Print with PDF

方法:

SET_PDF_ALLOWED

设置Export to Excel

方法:

SET_EXPORT_ALLOWED

设置List Display with Crystal Reports

方法:

SET_CR_INPLACE_ALLOWED

设置Visibility of the Settings Dialog Box

方法:

SET_DIALOG_SETTINGS_ALLOWED

设置Personalization of the Column Display

方法:

SET_COLUMN_SELECTION_ALLOWED

设置Personalization of View

方法:
SET_DISPLAY_SETTINGS_ALLOWED

设置Save and Select View by User

方法:

SET_VIEW_LIST_ALLOWED

设置Quick-Saving Views

方法:

SET_VIEW_QUICK_SAVE_ALLOWED

设置Calculation

方法:

IF_SALV_WD_STD_FUNCTIONS~SET_AGGREGATION_ALLOWED

设置Display as Business Graphic

方法:

IF_SALV_WD_STD_FUNCTIONS~SET_GRAPHIC_ALLOWED

设置Export to BEx Analyzer

方法:

IF_SALV_WD_STD_FUNCTIONS~BEX_ANALYZER_ALLOWED

设置BI Broadcasting

方法:

IF_SALV_WD_STD_FUNCTIONS~BI_BROADCASTING_ALLOWED

设置Display Table as Hierarchy

方法:

IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED

设置Row Number Display

方法:

IF_SALV_WD_STD_FUNCTIONS~SET_COUNT_RECORDS_ALLOWED

设置是否显示DISPLAY AS

方法:

IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_AS_ALLOWED

设置允许fixed column功能

Fixing Columns to Right and Left Table Side方法

方法:

SET_FIXED_COLS_LEFT_ALLOWED

IS_FIXED_COLS_LEFT_ALLOWED

SET_FIXED_COLS_RIGHT_ALLOWED

IS_FIXED_COLS_RIGHT_ALLOWED

设置SORT功能

设置Sort,通过接口:IF_SALV_WD_SORT
获取、创建、删除sort condition

方法:

GET_SORT_RULE

CREATE_SORT_RULE

DELETE_SORT_RULE

设置初始化顺序

方法:

SET_INITIAL_SORT_ORDER

GET_INITIAL_SORT_ORDER

设置group,是否允许group

方法:

SET_GROUPING_ALLOWED

IS_GROUPING_ALLOWED

设置allowed sort,是否 allowed sort

方法:

SET_SORT_ALLOWED

IS_SORT_ALLOWED

设置组Aggregation

方法:

SET_GROUP_AGGREGATION

GET_GROUP_AGGREGATION

设置是否允许group aggregation

方法:

SET_GROUP_AGGREGATION_ALLOWED

IS_GROUP_AGGREGATION_ALLOWED

设置Sort Rule,通过类CL_SALV_WD_SORT_RULE

Specify sort direction

方法:

SET_SORT_ORDER

GET_SORT_ORDER

Specify position of field within sort order

方法:

SET_SORT_POSITION

GET_SORT_POSITION

设置FILTER功能

通过接口:IF_SALV_WD_FILTER,设置Filter

获取、创建、删除filter rule

方法:

GET_FILTER_RULE

GET_FILTER_RULES

CREATE_FILTER_RULE

DELETE_FILTER_RULE

DELETE_FILTER_RULES

设置是否允许filter

方法:

SET_FILTER_ALLOWED

IS_FILTER_ALLOWED

设置filter rule类,对应类:CL_SALV_WD_FILTER_RULE

方法:

SET_LOW_VALUE

GET_LOW_VALUE

SET_HIGH_VALUE

GET_HIGH_VALUE

SET_OPERATOR

GET_OPERATOR

SET_INCLUDED

GET_INCLUDED

通过接口:IF_SALV_WD_FIELD_SETTINGS,设置filter

设置filter忽略大小写,是否filter忽略大小写。

方法:

SET_FILTER_IGNORING_CASE

IS_FILTER_IGNORING_CASE

设置group aggregation displayed

方法:

SET_GROUP_AGGR_DISPLAYED

GET_GROUP_AGGR_DISPLAYED

设置subtotal显示

方法:

SET_EXPAND_LEVEL

GET_EXPAND_LEVEL

SET_GROUP_AGGR_COLLAPSED

GET_GROUP_AGGR_COLLAPSED

设置Calculation功能

设置汇总,通过类:IF_SALV_WD_AGGR。

获取、创建、删除aggr rule

方法:

GET_AGGR_RULE

CREATE_AGGR_RULE

DELETE_AGGR_RULE

设置是否允许aggregation

方法:

SET_AGGREGATION_ALLOWED

IS_AGGREGATION_ALLOWED

设置aggr rule,通过类:CL_SALV_WD_AGGR_RULE

aggregation type:

Total:加总

Minimum:最小值

Maximum:最大值

Mean value:平均值

设置aggregation类型

方法:

SET_AGGREGATION_TYPE

GET_AGGREGATION_TYPE

通过接口:IF_SALV_WD_FIELD_SETTINGS,设置aggregation

设置Aggregation可用

方法:

SET_COUNT_RECORDS_ENABLED

IS_COUNT_RECORDS_ENABLED

设置Aggregation行在最开始

方法:

SET_AGGR_BEFORE_ITEMS

IS_AGGR_BEFORE_ITEMS

ALV Config:Customer Functions Settings

通过接口:IF_SALV_WD_FUNCTION_SETTINGS,设置Customer自定义Function

设置Toolbar design

方法:

SET_DESIGN

GET_DESIGN

示例代码: 类CL_WD_TOOLBAR=>STANDARD

  constants:
    BEGIN OF E_DESIGN,
      STANDARD TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '00', " ToolBarDesign.standard
      EMPHASIZED TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '01', " ToolBarDesign.emphasized
      TRANSPARENT TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '02', " ToolBarDesign.transparent
    END OF E_DESIGN . 

创建,删除Function类对象,对应类:CL_SALV_WD_FUNCTION

方法:

CREATE_FUNCTION

DELETE_FUNCTION

Get all standard ALV functions: GET_FUNCTIONS_STD

Get specific standard ALV function: GET_FUNCTION_STD

Get all user-defined functions: GET_FUNCTIONS

Get specific user-defined function: GET_FUNCTION

Get all left-aligned standard ALV functions: GET_FUNCTIONS_LEFT_STD

Get all left-aligned self-defined functions: GET_FUNCTIONS_LEFT

Get specific left-aligned user-defined function: GET_FUNCTION_LEFT

Get all right-aligned standard ALV functions: GET_FUNCTIONS_RIGHT_STD

Get all right-aligned self-defined functions: GET_FUNCTIONS_RIGHT

Get specific right-aligned user-defined function: GET_FUNCTION_RIGHT

Function使用的Elements,例如:按钮、下拉框等

Button (CL_SALV_WD_FE_BUTTON)

ButtonChoice (CL_SALV_WD_FE_BUTTON_CHOICE)

DropDownByIndex (CL_SALV_WD_FE_DROPDOWN_BY_IDX)

DropDownByKey (CL_SALV_WD_FE_DROPDOWN_BY_KEY)

InputField (CL_SALV_WD_FE_INPUT_FIELD)

LinkToAction (CL_SALV_WD_FE_LINK_TO_ACTION)

LinkToURL (CL_SALV_WD_FE_LINK_TO_URL)

ToggleButton (CL_SALV_WD_FE_TOGGLE_BUTTON)

For optical separation between the individual UI elements:Separator (CL_SALV_WD_FE_SEPARATOR)

设置将创建的不同elements映射到Function

方法:

SET_EDITOR

GET_EDITOR

设置Function按钮或其他Elements的align,position

方法:

SET_ALIGNMENT

GET_ALIGNMENT

SET_POSITION

GET_POSITION

设置Function按钮是否显示,标准Function类:CL_SALV_WD_FUNCTION_STD

方法:

SET_ENABLED

GET_ENABLED

用户定义Function类:CL_SALV_WD_FUNCTION

方法:

SET_VISIBILITY

GET_VISIBILITY

设置Toolbar是否可见

接口:IF_SALV_WD_FUNCTION_SETTINGS

Activate/deactivate toolbar:SET_ENABLED

Get activation status:GET_ENABLED

Show/hide toolbar:SET_VISIBILITY

Get visibility:GET_VISIBILITY

Handling Events Functions:

标准Function,可以在执行之前或之后添加逻辑

方法:

ON_STD_FUNCTION_BEFO

ON_STD_FUNCTION_AFTE

用户自定义Function,需要实现Handling方法

方法:

ON_FUNCTION

在ALV显示的View中加入Event Handler,Event:ON_FUNCTION

ALV Config:Table Settings

类IF_SALV_WD_TABLE_SETTINGS

设置header, 这里header是指ALV的头部。通过接口:IF_SALV_WD_TABLE_SETTINGS, 创建、获取、删除header,对应类CL_SALV_WD_HEADER。

方法:

CREATE_HEADER

GET_HEADER

DELETE_HEADER

通过类:CL_SALV_WD_HEADER,header对应类,设置header信息。

设置text

方法:

SET_TEXT

GET_TEXT

设置image

方法:

SET_IMAGE_SOURCE

GET_IMAGE_SOURCE

设置image前置

方法:

SET_IMAGE_FIRST

GET_IMAGE_FIRST

设置tooltip

方法:

SET_TOOLTIP

GET_TOOLTIP

设置Scrollbar

Scollbar显示三种模式:

Never:不显示scrollbar

Always:总是显示scrollbar

Only when required:需要时显示

通过接口:IF_SALV_WD_TABLE_SETTINGS,设置Scollbar

设置水平scollbar可见

方法:

SET_FOOTER_VISIBLE

GET_FOOTER_VISIBLE

设置显示水平Scrollbar,可见列数

方法:

SET_SCROLLABLE_COL_COUNT

GET_SCROLLABLE_COL_COUNT

设置Scollbar横向,竖向初始位置

方法:

SET_FIRST_VISIBLE_ROW

GET_FIRST_VISIBLE_ROW

SET_FIRST_VISIBLE_SCROLL_COL

GET_FIRST_VISIBLE_SCROLL_COL

设置header and footer

设置header,footer是否可见

方法:

SET_TOP_OF_LIST_VISIBLE

GET_TOP_OF_LIST_VISIBLE

SET_END_OF_LIST_VISIBLE

GET_END_OF_LIST_VISIBLE

设置header,footer中elements的layout方式:

Single element:

See Elements Types and Their Classes (except for the element type Label)

Row-type layout:

CL_SALV_FORM_LAYOUT_FLOW

Table-type layout:

CL_SALV_FORM_LAYOUT_GRID

使用CL_SALV_FORM_LAYOUT_FLOW和CL_SALV_FORM_LAYOUT_GRID类中方法创建element。

方法:

CREATE_FLOW

CREATE_GRID

CREATE_TEXT(CL_SALV_FORM_TEXT)

CREATE_LABEL(CL_SALV_FORM_LABEL)

CREATE_HEADER_INFORMATION(CL_SALV_FORM_HEADER_INFO)

CREATE_ACTION_INFORMATION(CL_SALV_FORM_ACTION_INFO)

创建对应Element

使用类CL_SALV_FORM_LAYOUT_FLOW

设置对应Element位置

方法:

SET_ELEMENT

GET_ELEMENT_COUNT

SET_TOOLTIP

GET_TOOLTIP

使用类CL_SALV_FORM_LAYOUT_GRID

设置对应Element位置

方法:

SET_ELEMENT

ADD_ROW

GET_ROW_COUNT

SET_GRID_LINES

SET_TOOLTIP

GET_TOOLTIP

Elements对应类

CL_SALV_FORM_TEXT

CL_SALV_FORM_LABEL

CL_SALV_FORM_HEADER_INFO

CL_SALV_FORM_ACTION_INFO

方法:

SET_TEXT

GET_TEXT

SET_TOOLTIP

GET_TOOLTIP

SET_LABEL_FOR(CL_SALV_FORM_LABEL方法)

GET_LABEL_FOR(CL_SALV_FORM_LABEL方法)

设置Element属性方法

设置Column

类:CL_SALV_FORM_LAYOUT_GRID

方法:

GET_COLUMN

SET_COLUMN_COUNT

GET_COLUMN_COUNT

返回column对应类:CL_SALV_FORM_GRID_COLUMN

方法:

SET_WIDTH

GET_WIDTH

SET_H_ALIGN

GET_H_ALIGN

设置column width,设置水平align

需要将Component Controller or View的Context节点下创建TOP OF LIST->CONTENT节点,然后添加映射到ALV的对应TOL。

示例代码:

*Example for TOP_OF_LIST
DATA:
lr_node type REF TO if_wd_context_node,
lr_grid type REF TO cl_salv_form_layout_grid,
lr_text type REF TO cl_salv_form_text,
lr_label type REF TO cl_salv_form_label.

CREATE OBJECT lr_grid.
lr_text = lr_grid->create_text( text   = '1.2 TEXT' row    = 1 column = 2 ).
lr_label = lr_grid->create_label(text   = '1.1 LABEL' row    = 1  column = 1  r_label_for = lr_text ).
lr_text = lr_grid->create_text( text   = '2.2 TEXT' row    = 2 column = 2 ).
lr_label = lr_grid->create_label(  text   = '2.1 LABEL'  row    = 2 column = 1 r_label_for = lr_text ).
lr_node = wd_context->get_child_node( name = 'TOP_OF_LIST' ).

CALL METHOD lr_node->set_attribute EXPORTING
value = lr_grid
name  = 'CONTENT'.

设置freezing layout

方法:

SET_FIXED_TABLE_LAYOUT

GET_FIXED_TABLE_LAYOUT

设置可见行数,是否显示empty row

方法:

SET_VISIBLE_ROW_COUNT

GET_VISIBLE_ROW_COUNT

SET_DISPLAY_EMPTY_ROWS

GET_DISPLAY_EMPTY_ROWS

设置ALV是否enable

方法:

SET_ENABLED

GET_ENABLED

设置ALV是否可见

方法:

SET_VISIBLE

GET_VISIBLE

设置ALV是否只读

方法:

SET_READ_ONLY

GET_READ_ONLY

设置ALV width

方法:

SET_WIDTH

GET_WIDTH

设置ALV output

方法:

SET_DESIGN

GET_DESIGN

设置empty table显示text

方法:

SET_EMPTY_TABLE_TEXT

GET_EMPTY_TABLE_TEXT

设置Accessibility Description

SET_ACC_DESCRIPTION

GET_ACC_DESCRIPTION

设置refresh刷新模式

GET_REFRESH_ON_DATA_CHECK

SET_REFRESH_ON_DATA_CHECK

GET_REFRESH_ON_DATA_CHANGE

SET_REFRESH_ON_DATA_CHANGE

两种模式值: IF_SALV_WD_C_TABLE_SETTINGS=>

REFRESH_AND_APPLY_SERVICES

REFRESH_DATA_ONLY

设置ALV columns or rows是否显示

四种模式:

1.Lines only between columns

2.Lines only between rows

3.Lines between columns and rows

4.No lines

SET_GRID_MODE

GET_GRID_MODE

示例代码:类CL_WD_TABLE=> E_GRID_MODE

  constants:
    BEGIN OF E_GRID_MODE,
      BOTH TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '00', " TableGridMode.both
      NONE TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '01', " TableGridMode.none
      VERTICAL TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '02', " TableGridMode.vertical
      HORIZONTAL TYPE WDY_UIE_LIBRARY_ENUM_TYPE VALUE '03', " TableGridMode.horizontal
    END OF E_GRID_MODE .

设置ALV显示hierachy

方法:

SET_DISPLAY_TYPE

GET_DISPLAY_TYPE

示例代码: IF_SALV_WD_C_TABLE_SETTINGS=>

  constants DISPLAY_TYPE type SALV_WD_CONSTANT value '99'. "#EC NOTEXT
  constants DISPLAY_TYPE_HIERARCHY type SALV_WD_CONSTANT value '02'. "#EC NOTEXT
  constants DISPLAY_TYPE_TABLE type SALV_WD_CONSTANT value '01'. "#EC NOTEXT

设置指定hierarchy column

接口:IF_SALV_WD_COLUMN_HIERARCHY

设置hierarchy是否展开

方法:

SET_HIERARCHY_COLUMN

IS_HIERARCHIY_COLUMN

接口:IF_SALV_WD_TABLE_HIERARCHY

设置最后一个层次列展开或收拢

方法:

SET_EXPANDED

IS_EXPANDED

方法:

SET_LAST_HIER_COLUMN_AS_LEAF

IS_LAST_HIER_COLUMN_AS_LEAF

注:通过类cl_salv_wd_config_table

IF_SALV_WD_DRAG_AND_DROP~SET_DROP_ROW_NAME_FIELDNAME

IF_SALV_WD_TABLE_HIERARCHY~IS_EXPANDED

IF_SALV_WD_TABLE_HIERARCHY~IS_LAST_HIER_COLUMN_AS_LEAF

IF_SALV_WD_TABLE_HIERARCHY~SET_EXPANDED

IF_SALV_WD_TABLE_HIERARCHY~SET_LAST_HIER_COLUMN_AS_LEAF

调用方法可以进行设置。

设置Table display as

方法:

SET_DISPLAY_AS

GET_DISPLAY_AS

接口:IF_SALV_WD_C_TABLE_SETTINGS=>

DISPLAY_AS

DISPLAY_AS_CR

DISPLAY_AS_EXCEL

DISPLAY_AS_GRAPHIC

DISPLAY_AS_TABLE

DISPLAY_AS_TABLE_GRAPHIC

对应可选display as值

设置选择模式,select可以触发Event Handler: ON_LEAD_SELECT, ON_SELECT

方法:

SET_SELECTION_MODE

GET_SELECTION_MODE

设置是否可以选择行,行是否可选通过fieldname对应field控制

方法:

SET_ROW_SELECTABLE

GET_ROW_SELECTABLE

SET_ROW_SELECTABLE_FIELDNAME

GET_ROW_SELECTABLE_FIELDNAME

设置ALV Edit Mode

方法:

SET_EDIT_MODE

GET_EDIT_MODE

示例代码:设置批量编辑,显示默认值,

lv_value类对象:CL_SALV_WD_CONFIG_TABLE

lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_EDIT_MODE ( IF_SALV_WD_C_TABLE_SETTINGS=>EDIT_MODE_MASS ).

lv_value->IF_SALV_WD_MASS_EDIT_SETTINGS~SET_DEFAULT_VALUES_VISIBLE( ABAP_TRUE ).

设置ALV Data Check Times

方法:

SET_DATA_CHECK

GET_DATA_CHECK

参数:IF_SALV_WD_C_TABLE_SETTINGS=>

DATA_CHECK

DATA_CHECK_ON_CELL_EVENT

DATA_CHECK_ON_CELL_EVENT_VAL

DATA_CHECK_ON_CHECK_EVENT

对应attributes值,设定data check event触发时机。

设置ALV Drag & Drop

类CL_SALV_WD_CONFIG_TABLE,使用对应IF_SALV_WD_DRAG_AND_DROP接口方法。

设置创建、删除、获取drag source info,对应接口:IF_SALV_WD_DRAG_SOURCE_INFO

方法:

IF_SALV_WD_DRAG_AND_DROP~CREATE_DRAG_SOURCE_INFO

IF_SALV_WD_DRAG_AND_DROP~DELETE_DRAG_SOURCE_INFO

IF_SALV_WD_DRAG_AND_DROP~GET_DRAG_SOURCE_INFO

设置drag source info信息,data可以传递drag数据,可以在event中访问到;enable是否使能;tags,drag和drop匹配标记,可以使用*,实现drag对应多个drop,tags命名不要使用 (:)(,)(;) (\) (/) (.)

GET_DATA

GET_ENABLED

GET_TAGS

SET_DATA

SET_ENABLED

SET_TAGS

设置创建、删除、获取Drop target info信息

IF_SALV_WD_DRAG_AND_DROP~CREATE_DROP_ROW_TARGET_INFO

IF_SALV_WD_DRAG_AND_DROP~DELETE_DROP_ROW_TARGET_INFO

IF_SALV_WD_DRAG_AND_DROP~DELETE_DROP_ROW_TARGET_INFOS

IF_SALV_WD_DRAG_AND_DROP~GET_DROP_ROW_TARGET_INFO

IF_SALV_WD_DRAG_AND_DROP~GET_DROP_ROW_TARGET_INFOS

IF_SALV_WD_DRAG_AND_DROP~GET_DROP_ROW_NAME

IF_SALV_WD_DRAG_AND_DROP~GET_DROP_ROW_NAME_FIELDNAME

IF_SALV_WD_DRAG_AND_DROP~SET_DROP_ROW_NAME

IF_SALV_WD_DRAG_AND_DROP~SET_DROP_ROW_NAME_FIELDNAME

ALV Config:Fields Settings

设置fields,通过接口:IF_SALV_WD_FIELD_SETTINGS,获取alv的fields, 类:CL_SALV_WD_FIELD,field对应类

方法:

GET_FIELD

GET_FIELDS

获取fieldname

方法:GET_FIELDNAME

ALV Config:Column Settings

使用接口IF_SALV_WD_COLUMN_SETTINGS获取,创建,删除column对象,对应类: CL_SALV_WD_COLUMN。

方法:

GET_COLUMN

GET_COLUMNS

CREATE_COLUMN

DELETE_COLUMN

DELETE_COLUMNS

设置column,对应类:CL_SALV_WD_COLUMN,column对象

获取column ID

方法:

GET_ID

设置column位置,默认位置都为0

方法:

SET_POSITION

GET_POSITION

设置固定column位置

方法:

SET_FIXED_POSITION

GET_FIXED_POSITION

设置cell design颜色

方法:

SET_CELL_DESIGN

GET_CELL_DESIGN

设置column水平align

方法:

SET_H_ALIGN

GET_H_ALIGN

设置column的accessibility description

方法:

SET_ACCESSIBILITY_DESCR

GET_ACCESSIBILITY_DESCR

设置column的explanation

方法:

SET_EXPLANATION

GET_EXPLANATION

设置获取、创建、删除column header对象,对应header类CL_SALV_WD_COLUMN_HEADER,column header。

方法:

GET_HEADER

CREATE_HEADER

DELETE_HEADER

设置Column Text

方法:

GET_TEXT

SET_TEXT

设置tooltip

方法:

SET_TOOLTIP

GET_TOOLTIP

设置DDIC绑定field

方法:

SET_PROP_DDIC_BINDING_FIELD

GET_ PROP_DDIC_BINDING_FIELD

设置DDIC data element 绑定field

方法:

GET_ PROP_DDIC_BINDING_ELEMENT

SET_ PROP_DDIC_BINDING_ELEMENT

设置header text换行

方法:

SET_HEADER_TEXT_WRAPPING

GET_HEADER_TEXT_WRAPPING

设置图片first

方法:

SET_IMAGE_FIRST

GET_IMAGE_FIRST

设置图片源

方法:

GET_IMAGE_SOURCE

SET_IMAGE_SOURCE

设置column显示为指定控件,对应类

Text:CL_SALV_WD_UIE_TEXT_VIEW

Button:CL_SALV_WD_UIE_BUTTON

Dropdown list box:CL_SALV_WD_UIE_DROPDOWN_BY_KEY

Image:CL_SALV_WD_UIE_IMAGE

InputField:CL_SALV_WD_UIE_INPUT_FIELD

ProgressIndicator:CL_SALV_WD_UIE_PROGR_INDICATOR

ToggleButton:CL_SALV_WD_UIE_TOGGLE_BUTTON

ValueComparison:CL_SALV_WD_UIE_VALUE_CMP

设置Text View,对应类CL_SALV_WD_UIE_TEXT_VIEW,相关属性

设置color或设置color值对应fieldname

方法:

SET_SEMANTIC_COLOR or SET_SEMANTIC_COLOR_FIELDNAME

GET_SEMANTIC_COLOR or GET_SEMANTIC_COLOR_FIELDNAME

设置font size和style

方法:

SET_DESIGN or SET_DESIGN_FIELDNAME

GET_DESIGN or GET_DESIGN_FIELDNAME

设置line break

方法:

SET_WRAPPING or SET_WRAPPING_FIELDNAME

GET_WRAPPING or GET_WRAPPING_FIELDNAME

设置选择状态

方法:

SET_SELECTION_STATE

GET_SELECTION_STATE