本文主要是介绍SAP PI系统关于接口清单和接口通量的自定义视图,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
根据实际业务需要,在SAP PI系统上做了两个视图:一个是基于IC的接口清单,另一个是按照接口每日统计的接口通量(包括访问量、数据包大小)。将这两部分数据通过接口推送到第三方云平台上进行PO数据大屏的展示。
drop view gd_ic_list;
/*创建intergrated configration List 视图 gd_IC_LIST
*/
create view gd_ic_list as (select A.FROMSRVC AS FROM_SERVICE, -- 发送方系统A.ACTIONNAME AS FROM_ACTIONNAME, -- 发送方接口IDA.ADAPTERTYPE AS FROM_ADAPTERTYPE, -- 发送方接口适配器类型B.TOSRVC AS TO_SERVICE, -- 接收方系统B.ACTIONNAME AS TO_ACTIONNAME, -- 接收方接口IDB.ADAPTERTYPE AS TO_ADAPTERTYPE, -- 接收方接口适配器类型c.text as IC_text -- IC Receiver Descriptionfrom XI_AF_CPA_BINDING as a inner join XI_AF_CPA_BINDING as bon a.A1_OBJECT_ID = B.A1_OBJECT_IDAND A.DIRECTION = 'I'AND B.DIRECTION = 'O'left join XI_DIR_TXTSHT_SYNC as con a.object_id = ABAP_LOWER( c.objectid ) -- 需要注意id 的大小写);/*删除接口通量视图 gd_XI_FLUX
*/
drop view GD_XI_FLUX;create view GD_XI_flux as (
-- 异步接口select to_date( sent_recv_time ) AS SEND_DATE, -- 时间戳转化为日期from_service_name , -- 发送方系统to_service_name , -- 接收方系统action_name as from_action_name, -- 发送方接口IDrecv_action_name as to_action_name, -- 接收方系统IDcount(*) as counts, -- to_decimal( ( sum(bytes_length / 1024 ) / 1024 ) ,10,3 )as length_mb -- 报文大小(MB)from bc_msgwhere to_service_name <> ' 'group by to_date( sent_recv_time ),from_service_name ,to_service_name ,action_name ,recv_action_nameUNION
-- 同步接口select to_date( a.sent_recv_time ) AS SEND_DATE, -- 时间戳转化为日期a.from_service_name , -- 发送方系统b.to_service_name , -- 接收方系统a.action_name as from_action_name, -- 发送方接口IDb.action_name as to_action_name, -- 接收方系统IDcount(*) as counts, -- to_decimal( ( sum( ( a.bytes_length + b.bytes_length ) / 1024 ) / 1024 ) ,10,3 )as length_mb -- 报文大小(MB)from bc_msg_log as a inner join bc_msg_log as bon a.msg_id = b.msg_idand a.to_service_name = ' 'and b.to_service_name <> ' 'and a.LOG_LOCATION not in ('AM','BI','MS')and b.LOG_LOCATION not in ('AM','BI','MS')group by to_date( a.sent_recv_time ),a.from_service_name ,b.to_service_name ,a.action_name ,b.action_name
)
这篇关于SAP PI系统关于接口清单和接口通量的自定义视图的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!