on 02-15-2011 6:49 PM
dear all,
I would like to get the count of messages to particular Interface processed in a day and send an email at the end of every day
Is this possible in XI to do? please suggest me some thing to do
Regards
>> Is this possible in XI to do? please suggest me some thing to do
I dont find any mechanism for this. What I do is... GO to SXMB_MONI and isolate the interfaces and sender services. It's a crude count, but itworks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavana,
You can achieve this by using an ABAP code. Please find below code which gives the output as:
PI Message Count
25 Message Interfaces 1
25 Message Interfaces 2
25 Message Interfaces 3
25 Message Interfaces 4
100 Records Received
You can automate sending this report in mail using a small ABAP Code.. check with your ABAPer he should be able to help.
&----
*& Report ZPI_MESSAGES_COUNT
*&
&----
*&
*&
&----
REPORT zpi_messages_count.
TYPES : BEGIN OF gty_filter_t,
ob_system TYPE ait_sndr,
ob_name TYPE rm_oifname,
END OF gty_filter_t.
DATA : im_filter TYPE sxi_msg_select,
pids TYPE sxms_sel_options,
pid TYPE sxmsselopt,
gt_msg TYPE sxmsmsgtab,
gt_fil TYPE TABLE OF gty_filter_t,
gs_fil TYPE gty_filter_t,
gs_fil_t TYPE gty_filter_t,
gs_msg TYPE SXMSMSGLST,
gv_lines TYPE int4,
cnt TYPE i.
PARAMETERS : s_st_dat TYPE sxi_msg_select-exedate OBLIGATORY,
s_ed_dat TYPE sxi_msg_select-exe2date OBLIGATORY,
n_hits TYPE int4 OBLIGATORY.
START-OF-SELECTION.
im_filter-exedate = s_st_dat.
im_filter-exe2date = s_ed_dat.
pid-sign = 'E' .
pid-option = 'EQ'.
pid-low = 'CENTRAL_BACK'.
APPEND pid TO pids.
CLEAR pid.
pid-sign = 'E' .
pid-option = 'EQ'.
pid-low = 'RECEIVER_BACK'.
APPEND pid TO pids.
CLEAR pid.
pid-sign = 'E' .
pid-option = 'EQ'.
pid-low = 'SENDER_BACK'.
APPEND pid TO pids.
CLEAR pid.
pid-sign = 'E' .
pid-option = 'EQ'.
pid-low = 'PE_ADAPTER'.
APPEND pid TO pids.
CLEAR pid.
pid-sign = 'E' .
pid-option = 'EQ'.
pid-low = 'PE_PROCESS'.
APPEND pid TO pids.
CLEAR pid.
im_filter-pids = pids.
CALL FUNCTION 'SXMB_SELECT_MESSAGES_NEW'
EXPORTING
im_filter = im_filter
im_number = n_hits
im_adapter_or = '0'
im_process_mode = '0'
IMPORTING
ex_msgtab = gt_msg
EX_RESULT =
EX_FIRST_TS =
EXCEPTIONS
persist_error = 1
missing_parameter = 2
negative_time_range = 3
too_many_parameters = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DESCRIBE TABLE gt_msg LINES gv_lines.
SORT gt_msg BY ob_system.
LOOP AT gt_msg INTO gs_msg.
MOVE-CORRESPONDING gs_msg TO gs_fil.
APPEND gs_fil TO gt_fil.
CLEAR gs_fil.
ENDLOOP.
LOOP AT gt_fil INTO gs_fil.
gs_fil_t = gs_fil.
cnt = cnt + 1 .
AT END OF OB_SYSTEM .
WRITE 😕 cnt, gs_fil_t-ob_name .
CLEAR cnt.
ENDAT.
ENDLOOP.
WRITE 😕 gv_lines, 'Records Received'.
Hi Phani,
I also have the same requirement and used the same FM to get proxy messages. When I am running the FM through batch job, not getting the output in gt_msg table (in above code).
Whereas when I run it in foreground, getting the data into gt_msg table. Please let me know where I missssed.
Thanks,
Srinivas.D
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.