BW数据加载时间分析程序
Posted 我得意的笑了笑的
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BW数据加载时间分析程序相关的知识,希望对你有一定的参考价值。
REPORT zrpbw_001 MESSAGE-ID zbw01.
TYPE-POOLS:slis.
TABLES:rsreqdone,rsbkrequest,rsbkdtp,rsldpio,rsstatmanpart,rsmoniptab.
DATA:gt_done TYPE TABLE OF rsreqdone,
gs_done TYPE rsreqdone,
gt_rsbkdtp TYPE TABLE OF rsbkdtp,
gs_rsbkdtp TYPE rsbkdtp,
gt_rsldpio TYPE TABLE OF rsldpio,
gs_rsldpio TYPE rsldpio,
gt_rsldpiot TYPE TABLE OF rsldpiot,
gs_rsldpiot TYPE rsldpiot,
gt_part TYPE TABLE OF rsstatmanpart,
gs_part TYPE rsstatmanpart,
gt_request TYPE TABLE OF rsbkrequest,
gs_request TYPE rsbkrequest,
gt_iptab TYPE TABLE OF rsmoniptab,
gs_iptab TYPE rsmoniptab.
DATA:BEGIN OF gs_output,
rnr TYPE rsrequnr, "数据传输请求号
logdpid TYPE rslogdpid,
src TYPE rsbksrcnm,
srctlogo TYPE rsbksrctlogo,
tgt TYPE rsbktgtnm,
tgttlogo TYPE rsbktgttlogo,
bdate TYPE sy-datum,
btime TYPE sy-uzeit,
edate TYPE sy-datum,
etime TYPE sy-uzeit,
runtime TYPE p DECIMALS 3,
anz_recs TYPE rsnumrecord,
insert_recs TYPE rsnumrecord,
tstatus TYPE rsstatus,
END OF gs_output,
gt_output LIKE TABLE OF gs_output.
DATA:gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_fieldcat TYPE slis_fieldcat_alv,
gs_layout TYPE slis_layout_alv.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE t1.
SELECT-OPTIONS:s_bgdate FOR sy-datum DEFAULT sy-datum NO-EXTENSION OBLIGATORY. "开始日期
" p_endate TYPE sy-datum DEFAULT ‘99991231‘. "结束日期
SELECTION-SCREEN END OF BLOCK blk1.
INITIALIZATION.
t1 = ‘选择条件‘.
START-OF-SELECTION.
PERFORM get_data. "数据获取
PERFORM display_alv. "数据显示
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_data .
DATA:l_second TYPE i.
DATA:l_date TYPE sy-datum,
l_time TYPE sy-uzeit,
l_date_end TYPE sy-datum,
l_time_end TYPE sy-uzeit.
"由于后台表存放的时间是UTC时区时间,实际前台看到时间是UTC+8时区,两者相差8小时
l_date = s_bgdate-low - 1.
l_time = ‘160000‘.
IF s_bgdate-high IS NOT INITIAL.
l_date_end = s_bgdate-high.
l_time_end = ‘160000‘.
ELSE.
l_date_end = s_bgdate-low.
l_time_end = ‘160000‘.
ENDIF.
*抓取数据加载日志
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_done
FROM rsreqdone
WHERE ( datum EQ l_date AND uzeit GE l_time )
OR ( datum EQ l_date_end AND uzeit LE l_time_end )
OR ( datum GT l_date AND datum LT l_date_end ).
"删除DTP或者信息包为空的数据
DELETE gt_done WHERE logdpid IS INITIAL.