cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Data in Alert Mail Body

former_member200568
Active Participant
0 Kudos

Dear All,

We are in process of setting up mail alerts for certain process in MII.

We have developed transaction logic & conditions for mail alert generation.

While generating alerts, it was observed that We can hard code the message in mail body of the alert.

Client requirement is to have dynamic values to be sent while sending the alerts.

Consider Below Example:

Suppose i want to raise the alert for Yield exceeded by 10 %. So if my current yield is 110 & limit was 100.

Alert Should also mention the exceeded value as well as what was the limit at that point.

So my alert should be:

Subject: Yield Alert ( We have configured successfully )

Body:

Daily Production (Litres/day) For Plant XYZ

Target Daily Production (Litres/day) ( Hard Coded )      :- 100 ( Dynamic Value to be appeared )

Actual Daily Production (Litres/day) :- 110 Yield above 10 % 19 Feb 2016 ( Dynamic Value to be appeared )

Regards,

Deep Dave

SAP MII Consultant

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Deep,

Consider you have Actual and target as transaction parameters and CalculatedResult as local parameter.

Then have this BLS expression in your Email Message:


"Daily Production (Litres/day) For Plant XYZ

Target Daily Production (Litres/day) ( Hard Coded )  :- " & Transaction.Target & "

Actual Daily Production (Litres/day) :- " & Transaction.Actual &" Yield above "& Local.CalculatedResult &" % 19 Feb 2016"

Transaction.Target will be '100'.

Transaction.Actual will be '110'.

CalculatedResult will be (Transaction.Actual - Transaction.Target)


Regards,

Sai Vellanki.

former_member200568
Active Participant
0 Kudos

This message was moderated.

saivellanki
Active Contributor
0 Kudos

Deep,

Hope this snip helps. Instead of Mail subject, I have mapped it to Tracer message to show you the output message.

Regards,

Sai Vellanki.

Answers (2)

Answers (2)

former_member200568
Active Participant
0 Kudos

Dear Sir,

Please refer below error when i am trying to assign the output of transaction with long text while raising the alert.

  • [WARN] Tried to set value for 'Raise_Alert_0.LongText', but couldn't. For legacy compatability, value was set to the type default.

Refer Screen Shot

Kindly suggest where i am going wrong.

Regards,
Deep Dave

Former Member
0 Kudos

Hi Deep,

Why don't you try maintaining the dynamic values in some Local variables and then map them in the message body of the mail?

Regards,

Saptaparna