Skip to Content
author's profile photo Former Member
Former Member

Generate mail message only if value mapping fails

Hi All,

I have a scenario wherein I need to populate the default value NA if a VM lookup fails and send an email which lists all the values in a message for which the VM failed.

I tried achieving the same through 1:N mapping populating both the required target message and mail message from same source message. This setup works fine when the VM is absent. But the mail message gets generated, without any content, even if the VM is present. I have set the cardinality of the mail message in the mapping signature as 0 to 1.

Please suggest of a possible way to achieve the above.

Note: we are using PI 7.3

Regards,

Diptee

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2011 at 12:20 PM

    Hi Deepti,

    in your case mail adapter would always be called and it will generate mail. An option would be to call(Conditional based) RFC in message mapping to a function module which will send mail from abap stack. Again, it is not a better solution but you can try it.

    -Amol

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2011 at 12:38 PM

    Use enhanced determination and do lookup during mapping and decide the target messages including mail reciever.

    Please see this link (go through multiple inbound interfaces topic)

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?QuickLink=index&overridelayout=true

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Baskar,

      Thanks for the link.

      The solution with multiple service interfaces works fine when the VM is present; that is no alert email is generated.

      However, when the VM is absent, the message fails in error RoutingException: InterfaceDetermination did not yield any actual interface.

      Note: The multiplicity of my target interfaces are 1 for the required target message and 0..1 for the optional mail alert. The message mapping works fine when VM is absent, that is it generates both the target and the alert mail message.

      Regards,

      Diptee

  • author's profile photo Former Member
    Former Member
    Posted on Dec 09, 2011 at 06:58 AM

    Multiple alerts are being generated, reopening to find a solution for the same.

    Hi All,

    I am mapping a graphical variable to the send mail function.

    However, this works only when the graphical variable is created after the last source node which is being value mapped.

    This leads to multiple alerts when the parent node ofthe graphical variable is generated more than once.

    Please suggest a way out.

    Regards,

    Diptee

    Edited by: diptee s on Dec 9, 2011 12:29 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.