SAP inbound RFC calls to function modules can be monitored
All incoming and outgoing data is converted into a function module in XML data and the XML is stored in the associated EPO Connector Service.
As a result, all the standard functions, such as the repeated function calls, are available locally, e.g. to debug the function.
Create an EPO Service EPOFM_MONITORING as an SAP Inbound Service.
There should be one entry with an operation = empty that can be entered in order to activate the monitoring for all SAP function models. The “Operation mandatory” checkbox should not be checked in the EPO Service.
There can be an entry made for each function module, as the operation has the same name as the function block.
In order to activate the monitoring for a function module, an INCLUDE must be inserted at the beginning and the end (optionally, also a couple of times before exits).
INCLUDE for request: /EPO1/FM_MONITORING_REQUEST with the following definition before that: DATA /epo1/fm_monitoring TYPE /epo1/fm_monitoring.
INCLUDE for response: /EPO1/FM_MONITORING_RESPONSE
In addition, further parameters can be set, and the INCLUDEs can be surrounded by IF statements. The parameters are documented at the beginning of the INCLUDE /EPO1/FM_MONITORING_REQUEST.
Example – from line 11 to 17 and from line 150 to 152
FUNCTION zbapi_goodsmvt_create.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(MATERIAL) TYPE MARA-MATNR OPTIONAL
*" VALUE(QUANTITY) TYPE BDCDATA-FVAL OPTIONAL
*" EXPORTING
*" VALUE(MESSAGE) TYPE STRING
*"----------------------------------------------------------------------
* EPO Connector Monitoring Interface Code Start +-+-+-
* DDIC structure /EPO1/FM_MONITORING defines the interface
DATA /epo1/fm_monitoring TYPE /epo1/fm_monitoring. "DO NOT CHANGE
* THIS LINE. Name /epo1/fm_monitoring is used in this include!
"/epo1/fm_monitoring-service = 'EPOFMMON_OEAMTC'. "EXC service!
INCLUDE /epo1/fm_monitoring_request.
* EPO Connector Monitoring Interface Code End +-+-+-
DATA gm_header TYPE bapi2017_gm_head_01.
* EPO Connector Monitoring Interface Code Start +-+-+-
INCLUDE /epo1/fm_monitoring_response.
* EPO Connector Monitoring Interface Code End +-+-+-
ENDFUNCTION.
The request and response data that are converted into an asXML are available for evaluation in the EPO message list.
Call via transaction /EPO1/MESSAGELIST.
To be able to call a function module with a saved interface data by using the EPO Connector, the transaction’s status, direction = I (Request, In) must be set from 53 to 50.
This is easy to accomplish with the help of the following transaction: /EPO1/SETSTATUS, by entering the desired transaction ID and changing the status to 50 in the EPO Connector menu, which is under the EPO Connector Administration.
After that, the function module can be called up and debugged locally by using the following transaction: EPO1/EPORTINPROC, along with the information of a transaction ID.
With the transaction /EPO1/SACT, the EPO Connector Services can be activated and deactivated on production systems. Additionally, the request and response data are saved when the monitoring service is activated.
The monitoring service can be activated or deactivated in edit mode.