Simplified Version of SXMB_MONI With a Capability to Reterive data from payload in ALV
Summary
Introduction
Introducing the Important XI Tables
- Inbound message Interface
- Outbound message Interface
- Interface namespace
- Sending Business System
- Receiving Business System
- Interface Mapping
- Message Payload
- Message status
- SXMSPMAST: (Integration Engine: Message Queue (Master)) The table is the master table for the monitoring information. You can get the timestamp, interface status, message id, and many more information.
- SXMSPEMAS: (Integration Engine: Enhanced Message Queue (Master)) The table provides the namespaces, the business systems and message interfaces involved in the interface.
- SXMSMSTATT: (Exchange Infrastructure: Message Status Description) This table provides a message status description.
- SXMSMSTAT: (Exchange Infrastructure: Message Status) This table is helpful if you want to show the process status icon for the corresponding message state.
- SMPPMAP3: (Mapping Runtime: Mapping) The above table gives you the mapping name (if any) used in the interface. It also provides the details on the type of mapping (ABAP mapping, Java mapping, Generated Mapping, XSLT java mapping, XSLT ABAP mapping) used for an interface.
- SMPPREL3: (Mapping Runtime: Mapping Relation) the table gives an interface mapping details for an interface and its corresponding message interface.
• SXMSPERROR: XML Message Broker: Message Queue (Incorrect Entries)
• SXMSCLUP: XMB: Property Cluster
• SXMSPVERS: Integration Engine: Message Version
• SXMSAGGRAW: SAP XI Status Overview: Integration Engine Raw Data
• SXMSALERTLOGGER: XI Alert Logs
• SXMSAEADPMODCHN: XI: Adapter Module Chains
• SMPPSPLIT : XI Mapping: Merge and Split
Step 1: Create Transparent Tables/Structure/Table type using SE11
Create Structure ZSM_KEY
Create Structure ZSM_OTHER
Create Transparent Table ZSM_DATA.
Create Table Type ZSM_DATA_TAB for Table ZSM_DATA
Create Output Structure ZSM_DATA_OUTPUT
Create Transparent table ZSM_FILTER
Create Table Type ZSM_FILTER_TAB using ZSM_FILTER
Step 2: Create Function Module “ZSXMB_MONI_EXTRACT” using SE37
Importing Parameters
Exporting Parameters
Exceptions
FM Source code
Application to Fetch & Show the Fetched Monitoring Messages data
A. This program is composed of 3 Screens
- Create one screen that has a container(CC_SXMB) used to shows the initial Display of all the messages as per selection criteria in ALV Format.
- Second Screen that has a container(CC_PL) used to shows HTML viewer control.
- Third Screen that has a container (CC_ALV)used to shows extract form XML (payload) data in ALV format.
B. GUI Status/GUI Title.
C. Create Selection Screen as below
D. Declaration for all the variables/Internal Tables/Types
* C O N S T A N T D E C L A R A T I O N
*———————————————————————-
CONSTANTS:
BEGIN OF gc_log,
success TYPE symsgty VALUE ‘S’,
warning TYPE symsgty VALUE ‘W’,
error TYPE symsgty VALUE ‘E’,
END OF gc_log,
gc_exit TYPE sy–ucomm VALUE ‘EXIT’,
gc_canc TYPE sy–ucomm VALUE ‘CANC’,
gc_back TYPE sy–ucomm VALUE ‘BACK’,
gc_a TYPE char01 VALUE ‘A’,
gc_xmld TYPE char04 VALUE ‘XMLD’.
*———————————————————————-
* T Y P E D E C L A R A T I O N
*———————————————————————-*
TYPES :
ty_zsm_key TYPE SORTED TABLE OF zsm_key WITH UNIQUE DEFAULT KEY.
TYPES:
BEGIN OF ty_zsm,
msgguid TYPE zsm_data–msgguid,
pid TYPE zsm_data–pid,
msgstate TYPE zsm_data–msgstate,
exetimest TYPE zsm_data–exetimest,
adminuser TYPE zsm_data–adminuser,
ob_system TYPE zsm_data–ob_system,
ob_ns TYPE zsm_data–ob_ns,
ob_name TYPE zsm_data–ob_name,
ib_system TYPE zsm_data–ib_system,
ib_ns TYPE zsm_data–ib_ns,
ib_name TYPE zsm_data–ib_name,
END OF ty_zsm,
ty_t_zsm TYPE SORTED TABLE OF ty_zsm WITH NON-UNIQUE KEY msgguid pid,
ty_t_output TYPE STANDARD TABLE OF zsm_data_output
WITH NON-UNIQUE KEY msgdate msgtime msgguid pid.
* I N T E R N A L T A B L E D E C L A R A T I O N
*———————————————————————-*
DATA :
it_payload TYPE zsm_data_tab,
it_zsm_data TYPE ty_t_zsm,
it_output TYPE STANDARD TABLE OF zsm_data_output,
wa_payload TYPE zsm_data,
wa_output TYPE LINE OF ty_t_output.
*———————————————————————-
* V A R I A B L E D E C L A R A T I O N
*———————————————————————-*
DATA:
gv_error TYPE char01,
gv_log TYPE num5,
gv_ucomm TYPE sy–ucomm,
gv_lines TYPE int4.
*———————————————————————-
* A L V D E C L A R A T I O N
*———————————————————————-*
* ALV Internal Table Declaration
DATA: it_cellstyle TYPE STANDARD TABLE OF lvc_s_styl,
it_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,
it_exclude TYPE ui_functions,
it_row_no_top TYPE TABLE OF lvc_s_roid INITIAL SIZE 0,
wa_row_no_top TYPE lvc_s_roid.
* ALV Work Area Declaration
DATA : wa_fieldcat TYPE lvc_s_fcat,
wa_layout TYPE lvc_s_layo,
wa_result TYPE string.
DATA:
gv_layout TYPE disvariant.
*———————————————————————-
* X M L To Internal Table Conversion D E C L A R A T I O N
*———————————————————————-
* Declaring the table to contain the parsed data
DATA: it_xml_info TYPE STANDARD TABLE OF smum_xmltb.
* Declaring the work area for the internal table containing the parsed data
DATA: wa_xml_info TYPE smum_xmltb.
* Declaring the table to contain the returned messages from the parsing FM
DATA: it_return TYPE STANDARD TABLE OF bapiret2.
* Declaring the work area for the return table
DATA: wa_return TYPE bapiret2.
DATA :
it_fieldcatxml T