CharlieShen

新人,大家多关照啦@_@

  博客中心 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 登录 ::
  3994 随笔 :: 0 文章 :: 20 评论 :: 0 Trackbacks
Cached @ 2025/4/28 15:54:29Control ASP.skins_cogitation_controls_blogstats_ascx
<2007年9月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

留言簿(14)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜

Cached @ 2025/4/28 15:54:29Control ASP.skins_cogitation_controls_singlecolumn_ascx
一般列表显示(Normal List Display)
人间烟火发表评论于 2007-7-25 14:50:18,回复此帖
TABLES : mara.

SELECT-OPTIONS: s_matnr FOR mara-matnr.

TYPE-POOLS: slis.

DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
ernam LIKE mara-ernam,
ersda LIKE mara-ersda,
labor LIKE mara-labor,
END OF itab.

DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
xevents TYPE slis_t_event,
ls_event TYPE slis_alv_event,
slis_ev_top TYPE slis_formname VALUE 'TOP_OF_PAGE'.

DATA: v_repid LIKE sy-repid.

START-OF-SELECTION.

v_repid = sy-repid.

SELECT matnr ernam ersda labor
INTO TABLE itab
FROM mara
WHERE matnr IN s_matnr.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = xevents
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

READ TABLE xevents WITH KEY name = slis_ev_top
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_top TO ls_event-form.
APPEND ls_event TO xevents.
ENDIF.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'ITAB'
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
i_bypassing_buffer = 'X'
i_buffer_active = ' '
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
i_buffer_active = ' '
i_callback_program = v_repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
* IS_LAYOUT =
it_fieldcat = i_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
* IS_VARIANT =
IT_EVENTS = xevents
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

*&--------------------------------------------------------------------*
*& Form top_of_page
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM TOP_OF_PAGE.

WRITE:/ 'Top of page event triggered’.
WRITE:/ ‘This report gives the material details'.

ENDFORM. "top_of_page
分享按钮发布于: 2007-09-05 08:30 CharlieShen 阅读(231) 评论(0)  编辑 收藏