Skip to Content
author's profile photo Former Member
Former Member

Report to show Number of sent and received messages

Hi,

We are on PI 7.1 EHP 1.

I'm wondering if there is a way to set up a daily report that will output the number of inbound and outbound messages by message type?

I know this can be done manually in the RWB but is there a way to automate it?

Thanks,

Gareth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 15, 2011 at 09:23 AM

    Yes, is possible using standard AbapStack function & tables.

    Check in SDN Forum, this is an old 3D.

    get-count-of-the-messages-to-particular-interface-

    &----


    *& 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'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.