on 2016 Feb 12 9:37 AM
Hello EM experts,
We are trying to configure Alert framework for SMS/Email generation. As part of this requirement, we are trying to generate alerts when there is an overdue event. We are using EE monitor for this.
In the Alert container fields we are passing 3 new Container fields for day, date and time . We have defined control parameters in EM for these 3 container fields and mapped it to the container element under Assign Alert Category (SPRO activity: "Define Alert Framework Integration to SAP Event Management").
Now the issue is when it comes to our Custom FM which is copy of standard FM /SAPTRX/CREATE_ALERT with some custom code, it fails to retrieve the values for WCL Parameters (FM "/SAPTRX/QUERY_WCL_PARAMETER") and doesn't return these 3 new fields in IT_QUERY. Are we missing some config here? How can we pass the new fields to the container interface? Please advise.
Regards,
Neha
Request clarification before answering.
Hi Neha,
1. If you configure new control parameters day, date and time. Those control parameters will be filled upon creation of event handlers or when event message is reported to an event handler.
These control parameters mapping reside in IMG -> Event Management -> Event Handlers and Event Handler Data -> Parameters -> Define Parameter Mapping -> Define Mapping Profile -> Control Parameter Mapping -> Here you map App Sys. Parameter to SAP EM Parameter for control parameters.
2. If you are setting dynamically based on some other parameters to calculate days, date and time in these parameters. If yes, can you tell us how you are setting these data?
We will let you know how to fetch the data correctly.
Regards
GGOPII
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
you should check in function module
/SAPTRX/QUERY_WCL_PARAMETER
if the controlparameters are available:
line 116:
* Control Parameter
PERFORM map_eh_control_parameters(/saptrx/sapleh_bapis)
USING l_ehdata-cntrl
CHANGING lt_controlparameters.
Best regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Steffen,
Thanks for your reply.
Control parameters are only defined in the EM config, we are not extracting the information from application system (TM).
I have already debug this FM and the new control parameters are not coming up in the table. We need these fields only in EM for sending as part of the Alert.
Are we missing any config here?
Regards,
Neha
Hi Neha,
you said you want to store date and time in the control parameters.
Where do you want to create and fill it if they are not filled from the extraction in the TM system?
They can only be attached to an EH if they were either created in the extraction or later in the rule set.
Best regards,
Steffen
Hi Steffen,
Basically we need to pass dynamic Date, day and time to the alert framework.For this we are passing the values from custom FM using some logic. But since FM "/SAPTRX/QUERY_WCL_PARAMETER" is not returning the control parameters we have defined in EM Config, we are not able to proceed.
We just need the EM Attribute ID to which we can map the container Element defined in alert category. And the same we could retrieve in FM "/SAPTRX/QUERY_WCL_PARAMETER".
Is this the right approach or do you reckon any other approach for the same.
Regards,
Neha
Hi Neha,
then you should add the parameter during rule processing.
Check Activity Methods:
PARAMETER_CHANGE_NEW
PARAM_CHANGE_CUST
With them you can add new Control Parameters.
The activity must be processed before your alert activity. Then "/SAPTRX/QUERY_WCL_PARAMETER should find the parameters.
Another option is this BADI in the Alert Framework:
Best regards,
Steffen
Hi Neha,
In order for you to see the Control Parameters from /SAPTRX/QUERY_WCL_PARAMETER, you need to have them loaded onto your Event Handlers. Value or no value, these parameters should be available on Event Handler.
Once you have them in Event Handler ( control param tab), then they will be available for you in your ZFM /SAPTRX/CREATE_ALERT through /SAPTRX/QUERY_WCL_PARAMETER. Now in your custom FM /SAPTRX/CREATE_ALERT, you can modify the values dynamically for your alerts.
So, in short, just creating control parameters in EM config is not enough. You need to have them on Event Handlers and you can leave them blank.
Follow Steffen's thread on how to add them to Event Handlers.
Thanks,
Vishnu
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.