ALV-表头数据
2017-04-12 本文已影响32人
Mmm_余安
例图.png
EXPORTING
I_CALLBACK_PROGRAM = I_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'F_TOP_OF_PAGE' "表头数据
IS_LAYOUT = GS_LA
IT_FIELDCAT = GT_F[]
IT_SORT = I_SORT
I_SAVE = 'A'
TABLES
T_OUTTAB = GT_X
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.```
```DATA: LT_LISTHEADER TYPE SLIS_T_LISTHEADER,
LS_LISTHEADER LIKE LINE OF LT_LISTHEADER.
LS_LISTHEADER-TYP = 'H'.
LS_LISTHEADER-INFO = '供应商收货清单报表'.
APPEND LS_LISTHEADER TO LT_LISTHEADER.
LS_LISTHEADER-TYP = 'S'.
DATA S TYPE STRING.
S = GT_X-NAME2.
CONCATENATE '工厂:' S INTO LS_LISTHEADER-INFO.
APPEND LS_LISTHEADER TO LT_LISTHEADER.
LS_LISTHEADER-TYP = 'A'.
DATA A TYPE STRING.
CONCATENATE S_BUDAT-LOW'-' S_BUDAT-HIGH INTO A.
CONCATENATE '期间:' A INTO LS_LISTHEADER-INFO.
APPEND LS_LISTHEADER TO LT_LISTHEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' "添加图片
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = LT_LISTHEADER.```