cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to call mail adapter in a UDF

Former Member
0 Kudos

Hi,

In my mapping if I find that, a field length is more than 50 I need to mail this field in the body of a mail. Can I call the receiver mail adapter in a UDF similar to RFC/JDBC adapter?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Rakesh,

Use Enhanced receiver Determination,

there you can check you conditions,as per condition you cal receivers.

Createte Two communication channels one is Mail another IDOC.

call service as per Your Condition.

Cheers,

Raj

Former Member
0 Kudos

My condtion is to check mutliple field lengths and any of them is more tham 40 char, I need to end only those in mail in addition to the idoc. I do not think I can have such a condition placed in enhanced receiver determination.

Any more ideas? or suggesions?

Former Member
0 Kudos

Hi,

You can check all your field lengths within an UDF you can return a perticular value if any of your fields exceeding the length. Else return some other value. Depending on the returned value , you can use the same for your enhanced receiver determination.

Regards,

Reyaz

Former Member
0 Kudos

Reyaz,

Thanks for the input. But the receiver detemination condition is based on the sender message type but not the receiver message type. By the time the receiver is determined, the message mapping would not have been executed.

VijayKonam
Active Contributor
0 Kudos

You can use a simple BPM where you will populate the flag or some value in your source message format itslef. Means, you need to define mapping so that you will know if you have to send mail. execute this mapping in BPM and them in the receiver determination step in ID use this populated field for the condition check.

Hope it helps.

VJ

Former Member
0 Kudos

Is your scenario contains mapping apart from this?

If not then you can use mailadapter message type provided by SAP.

i dont think you have mapping other than as you want to pass this directly to content right?

Its possible to access body in UDF.

/people/samuel.chandrasekaran2/blog/2008/10/06/xi-mail-adapter-dynamically-building-attachment-and-message-body-content-using-a-simple-udf

Rajesh

VijayKonam
Active Contributor
0 Kudos

Is your scenario any thing additional than this? Id this addtional?

VJ

Former Member
0 Kudos

My scenario is File to IDOC. this is needed as a special requirement. I know I can do this using BPM. Trying to find out if I can do this in a more simple way.