on 03-17-2009 1:49 PM
Hello gurus,
I have a question about alert mechanism in PI. I have sender & receiver SAP systems using proxies. Can I throw any alerts on PI server when an error happens in these proxy systems? Or do I need to define seperate alerts in those systems and make the settings seperately there?
If central alerting is possible and those systems will raise the alert and throw it there, how can I set it?
Thanks,
Gökhan
Well, it is bad new then. What is the use of the "central monitoring" features of PI if I cannot see what's happening even in other SAP systems? Yes, I know I can monitor the messages, but as long as I can't define alerts, that doesn't help much.
How do you monitor your sender/receiver systems then? How do you get notified when a message fails at those systems?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gökhan,
There is one simple way to do this. If you want to send an alert message in PI in case of error on Sender / receiver R/3 system.
Alert system indirectly using function module "SALERT_CREATE_API" or "SALERT_CREATE_LOCAL" to raise an alert. You can call this function module using RFC destination pointing towards your XI system in sender / receiver system in proxy code. This way you can capture errors.
You do not need to create separate alert category. You can used same alert category and rules.
Let me know if you need more details.
Thanks & Rgds,
Nilesh
Hi,
Check out this RFC wrapper function module...which you can call in proxy for validations/ errors.
FUNCTION z_fi_raise_alert.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(I_INTERFACE_ID) TYPE STRING
*" VALUE(I_ERROR) TYPE STRING
*" VALUE(I_ALERTCAT) TYPE STRING
*"----
----
Work area declaration
----
DATA : gwa_container TYPE swcont,
gwa_latest_file TYPE ztab_latest_file.
----
Internal Table Declaration
----
DATA : gi_container TYPE STANDARD TABLE OF swcont.
----
Global Variable declaration
----
DATA : gv_latest_filename TYPE char100,
gv_alertcategory TYPE salrtdcat,
gv_tab_index TYPE swc_index VALUE '000000',
gv_error TYPE char100,
gv_interface_id TYPE char50.
----
Constants declaration
----
CONSTANTS : gc_interfaceid TYPE swc_elem VALUE 'INTERFACE_ID',
gc_fieldnames TYPE swc_elem VALUE 'FIELD_NAMES',
gc_filename TYPE swc_elem VALUE 'FILE_NAME',
gc_interfaceid_len TYPE swc_length VALUE '50',
gc_fieldnames_len TYPE swc_length VALUE '255',
gc_filename_len TYPE swc_length VALUE '100',
gc_type TYPE swc_type VALUE 'C',
gc_file_duplicate TYPE string VALUE 'FILE_DUPLICATE_ALERT'.
gv_error = i_error.
gv_alertcategory = i_alertcat.
gv_interface_id = i_interface_id.
IF gv_alertcategory EQ gc_file_duplicate.
SELECT SINGLE latest_filename
FROM ztab_latest_file
INTO gv_latest_filename
WHERE interface_id EQ gv_interface_id
AND latest_filename EQ gv_error.
If filename is present in Table ZTAB_LATEST_FILE then file has been read already.
Raise alert for Duplicate file is read.
IF sy-subrc EQ 0.
Create global_container variable for Interface Id
gwa_container-element = gc_interfaceid.
gwa_container-tab_index = gv_tab_index.
gwa_container-elemlength = gc_interfaceid_len.
gwa_container-type = gc_type.
gwa_container-value = gv_interface_id.
APPEND gwa_container TO gi_container.
CLEAR : gwa_container.
gv_tab_index = gv_tab_index + 1.
Create global_container variable for File Name
gwa_container-element = gc_filename.
gwa_container-tab_index = gv_tab_index.
gwa_container-elemlength = gc_filename_len.
gwa_container-type = gc_type.
gwa_container-value = gv_error.
APPEND gwa_container TO gi_container.
ELSE.
Update Table with the latest read filename.
gwa_latest_file-interface_id = gv_interface_id.
gwa_latest_file-latest_filename = gv_error.
MODIFY ztab_latest_file FROM gwa_latest_file.
ENDIF.
ELSE.
Raise alert for mandatory field validation
Create global_container variable for Interface Id
gwa_container-element = gc_interfaceid.
gwa_container-tab_index = gv_tab_index.
gwa_container-elemlength = gc_interfaceid_len.
gwa_container-type = gc_type.
gwa_container-value = gv_interface_id.
APPEND gwa_container TO gi_container.
CLEAR : gwa_container.
gv_tab_index = gv_tab_index + 1.
Create global_container variable for Field Names
gwa_container-element = gc_fieldnames.
gwa_container-tab_index = gv_tab_index.
gwa_container-elemlength = gc_fieldnames_len.
gwa_container-type = gc_type.
gwa_container-value = gv_error.
APPEND gwa_container TO gi_container.
ENDIF.
Raise Alert with the error description
IF NOT gi_container[] IS INITIAL.
CALL FUNCTION 'SALERT_CREATE'
EXPORTING
ip_cat = gv_alertcategory
TABLES
it_container = gi_container
EXCEPTIONS
alert_category_unknown = 1
alert_no_recipients = 2
alert_error_unknown = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
REFRESH : gi_container.
CLEAR : gwa_container.
ENDIF.
ENDFUNCTION.
Hope this will help.
Nilesh
dear gokhan,
if you are using a sender / receiver abap proxy.
and if it fails then you can use a standard function module that would send e-mails to any person mentioned in that proxy.
u can easily find any std Fm that sends e-mails
i think this would help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have sender & receiver SAP systems using proxies. Can I throw any alerts on PI server when an error happens in these proxy systems?
It depends, if your application system is the system where server proxy (based on inbound message interface) is created, you can have your ABAP program to call exception class in the application system, to send application error to local integration engine,the alert can be triggered.
I need to define seperate alerts in those systems and make the settings seperately there?
In above case, you do not need to, you just define your alert in your PI system.
Regards.
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can I throw any alerts on PI server when an error happens in these proxy systems? - No it is not possible.......in PI you will get alerts of errors occuring on PI system and not on other systems....
Or do I need to define seperate alerts in those systems and make the settings seperately there? - You can define alert categories in your other SAP systems but in order to call those alerts, you will have to code it in your ABAP proxy.
Regards,
Rajeev Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.