设置图标:
2 3 4 5 6 7 8 9 10 | TYPE-POOLS:icon. LOOP AT git_alv ASSIGNING <lfs_alv>. CALL FUNCTION 'ICON_CREATE' EXPORTING name = icon_pdf "图标名字 info = 'PDF' IMPORTING result = <lfs_alv>-pdf_order EXCEPTIONS OTHERS = 0. ENDLOOP |
设置按钮
DATA: LV_STYLEROW TYPE LVC_S_STYL.
LOOP AT ITAB_ALVDATA INTO WA_ALVDATA.
“ITAB_ALVDATA为ALV内表
LV_STYLEROW-FIELDNAME = 'ZDISPLAY'.
LV_STYLEROW-STYLE. = CL_GUI_ALV_GRID=>MC_STYLE_BUTTON.
APPEND LV_STYLEROW TO WA_ALVDATA-CELLSTYLES.
ENDLOOP.