*&---------------------------------------------------------------------*
*& Report ZAFL_VIEWER
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zafl_viewer.
DATA: _log TYPE zafl_log.
INCLUDE zafl_macros.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-t00.
SELECT-OPTIONS: s_fm FOR _log-fname NO INTERVALS NO-EXTENSION.
SELECT-OPTIONS: s_guid FOR _log-guid.
SELECT-OPTIONS: s_cf1 FOR _log-cust_field1.
SELECT-OPTIONS: s_cf2 FOR _log-cust_field2.
SELECT-OPTIONS: s_cf3 FOR _log-cust_field3.
SELECT-OPTIONS: s_status FOR _log-status NO INTERVALS.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-t01.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(20) TEXT-t02 FOR FIELD p_dstart.
PARAMETERS: p_dstart TYPE edidc-upddat DEFAULT sy-datum.
SELECTION-SCREEN COMMENT 35(20) TEXT-t03 FOR FIELD p_dend.
PARAMETERS: p_dend TYPE edidc-upddat.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(20) TEXT-t04 FOR FIELD p_tstart.
PARAMETERS: p_tstart TYPE edidc-updtim DEFAULT '000000'.
SELECTION-SCREEN COMMENT 35(20) TEXT-t05 FOR FIELD p_tend.
PARAMETERS: p_tend TYPE edidc-updtim DEFAULT '235959'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
* Block: Number Of Hits.
SELECTION-SCREEN BEGIN OF BLOCK no_of_hits WITH FRAME TITLE TEXT-t06.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) FOR FIELD pv_nofhs.
PARAMETERS pv_nofhs TYPE i DEFAULT 1000 MODIF ID nh2.
SELECTION-SCREEN POSITION 40.
PARAMETERS pc_nhnl AS CHECKBOX USER-COMMAND nh1.
SELECTION-SCREEN COMMENT 47(30) TEXT-t07 FOR FIELD pc_nhnl.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK no_of_hits.
TYPES: ty_time_cond TYPE RANGE OF timestamp.
TYPES BEGIN OF ty_log.
TYPES date TYPE sy-datum.
TYPES time TYPE sy-uzeit.
TYPES time_zone TYPE sy-zonlo.
INCLUDE TYPE zafl_log.
TYPES END OF ty_log.
DATA: gt_log TYPE STANDARD TABLE OF ty_log.
DATA: gr_alv TYPE REF TO cl_salv_table.
DATA:gv_s TYPE i,gv_e TYPE i,gv_c TYPE i.
*----------------------------------------------------------------------*
* CLASS lcl_handle_events DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
on_user_command FOR EVENT added_function OF cl_salv_events
IMPORTING e_salv_function,
on_link_click FOR EVENT link_click OF cl_salv_events_table
IMPORTING row column.
ENDCLASS. "lcl_handle_events DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_handle_events IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_handle_events IMPLEMENTATION.
METHOD on_user_command.
PERFORM handle_user_command USING e_salv_function.
ENDMETHOD. "on_user_command
"on_double_click
METHOD on_link_click.
DATA: value TYPE string.
DATA: fm_name TYPE rs38l_fnam.
FIELD-SYMBOLS:
<row> LIKE LINE OF gt_log
,<value> TYPE any
.
READ TABLE gt_log INDEX row ASSIGNING <row>.
IF sy-subrc = 0.
ASSIGN COMPONENT column OF STRUCTURE <row> TO <value>.
IF sy-subrc = 0.
value = <value>.
ENDIF.
ENDIF.
IF column = 'FNAME'.
fm_name = value.
SET PARAMETER ID 'LIB' FIELD fm_name.
CALL TRANSACTION 'SE37' AND SKIP FIRST SCREEN.
ELSE.
cl_demo_output=>display_json( <value> ).
ENDIF.
ENDMETHOD. "on_single_click
ENDCLASS. "lcl_handle_events IMPLEMENTATION
INITIALIZATION.
START-OF-SELECTION.
* DATA(gr_events) = NEW lcl_handle_events( ).
DATA gr_events TYPE REF TO lcl_handle_events.
CREATE OBJECT gr_events.
PERFORM get_data.
PERFORM display.
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_data.
DATA: s_ts TYPE ty_time_cond.
CLEAR :gv_s,gv_e,gv_c.
FIELD-SYMBOLS:<fs_log> LIKE LINE OF gt_log.
PERFORM get_time_cond USING p_dstart
p_dend
p_tstart
p_tend
s_ts.
CASE pc_nhnl.
WHEN 'X'.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE gt_log
* UP TO pv_nofhs ROWS
FROM zafl_log
WHERE guid IN s_guid
AND fname IN s_fm
AND cust_field1 IN s_cf1
AND cust_field2 IN s_cf2
AND cust_field3 IN s_cf3
AND status IN s_status
AND timestamp IN s_ts .
WHEN ''.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE gt_log
UP TO pv_nofhs ROWS
FROM zafl_log
WHERE guid IN s_guid
AND fname IN s_fm
AND cust_field1 IN s_cf1
AND cust_field2 IN s_cf2
AND cust_field3 IN s_cf3
AND status IN s_status
AND timestamp IN s_ts .
ENDCASE.
LOOP AT gt_log ASSIGNING <fs_log> WHERE timestamp IS NOT INITIAL.
<fs_log>-time_zone = sy-zonlo.
CONVERT TIME STAMP <fs_log>-timestamp
TIME ZONE <fs_log>-time_zone
INTO DATE <fs_log>-date
TIME <fs_log>-time.
IF <fs_log>-status = 'S'.
gv_s = gv_s + 1.
ELSEIF <fs_log>-status = 'E'.
gv_e = gv_e + 1.
ENDIF.
gv_c = gv_c + 1.
ENDLOOP.
ENDFORM. "get_data
*&---------------------------------------------------------------------*
*& Form get_time_cond
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->SDATE text
* -->EDATE text
* -->STIME text
* -->ETIME text
* -->RESULT text
*----------------------------------------------------------------------*
FORM get_time_cond USING sdate TYPE dats
edate TYPE dats
stime TYPE uzeit
etime TYPE uzeit
result TYPE ty_time_cond.
DATA:start_date TYPE dats
,end_date TYPE dats
,start_timestamp TYPE timestamp
,end_timestamp TYPE timestamp
,ls_result TYPE LINE OF ty_time_cond
.
IF sdate IS INITIAL AND edate IS INITIAL.
RETURN.
ENDIF.
start_date = sdate.
end_date = edate.
IF end_date IS INITIAL.
end_date = start_date.
ENDIF.
IF start_date IS INITIAL.
start_date = end_date.
ENDIF.
start_timestamp = start_date && stime.
end_timestamp = end_date && etime.
* MOVE 'IBT' TO result.
ls_result-sign = 'I'.
ls_result-option = 'BT'.
ls_result-low = start_timestamp.
ls_result-high = end_timestamp.
APPEND ls_result TO result.CLEAR ls_result.
* result = value #( SIGN = 'I' OPTION = 'BT' (
* LOW = start_timestamp
* HIGH = end_timestamp
* )
* ).
ENDFORM. "get_time_cond
*&---------------------------------------------------------------------*
*& Form DISPLAY
*&---------------------------------------------------------------------*
* text
*---
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
接口文档2.zip (55个子文件)
down
R960849.ED1 123KB
dictionary
zafl_log.html 6KB
zafl_config.html 5KB
zafl_viewer
dictionary
zafl_log.html 6KB
zafl_config.html 5KB
zafl_viewer.txt 18KB
zafl_macros.txt 7KB
K960849.ED1 384B
zcl_afl_json
class-zcl_afl_json.txt 2KB
ZCL_AFL_JSON.jpg 66KB
public_methods
generate_int_new.txt 542B
generate_new.txt 538B
zafl_macros
dictionary
zafl_log.html 6KB
zafl_config.html 5KB
zafl_macros.txt 7KB
zui2_json
class-zui2_json.txt 11KB
protected_methods
dump_int.txt 537B
escape.txt 535B
get_symbols.txt 540B
generate_int_ex.txt 544B
dump_type.txt 538B
pretty_name.txt 540B
dump_type_ex.txt 541B
dump_symbols.txt 541B
is_compressable.txt 544B
restore_type.txt 541B
edm_datetime_to_ts.txt 547B
get_fields.txt 539B
restore.txt 536B
pretty_name_ex.txt 543B
局部定义.txt 7KB
zui2_json.jpg 67KB
public_methods
serialize.txt 535B
string_to_xstring.txt 543B
raw_to_string.txt 539B
generate.txt 534B
xstring_to_string.txt 543B
bool_to_tribool.txt 541B
class_constructor.txt 543B
constructor.txt 537B
deserialize_int.txt 541B
generate_int.txt 538B
dump.txt 530B
string_to_raw.txt 539B
tribool_to_bool.txt 541B
serialize_int.txt 539B
deserialize.txt 537B
zcl_afl_utilities
dictionary
zafl_log.html 6KB
zafl_config.html 5KB
class-zcl_afl_utilities.txt 2KB
ZCL_AFL_UTILITIES.jpg 64KB
public_methods
fm_authority_check.txt 3KB
get_distinct_count.txt 1KB
re_process.txt 7KB
is_prd.txt 904B
共 55 条
- 1
资源评论
Jasson
- 粉丝: 175
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功