cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:UDF

Former Member
0 Kudos

H i Guys,

I have requirement like to send mail through UDF if Some condition fail in Mapping

Please give answer urgently

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Refer my wiki [ Mail without email adapter? Part - I|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=90570965].. to send email from UDF...

~SaNv...

Former Member
0 Kudos

Hi Santhosh,

But it giving error as Package does not exist

Thnaks

former_member200962
Active Contributor
0 Kudos

if i am not wrong you need to compile the java code given at the end of the wiki and then import it in the Imported Archives....and then include it in the UDF imports section.....

santhosh_kumarv
Active Contributor
0 Kudos

Did u import the [mail.zip|http://sapnw.googlecode.com/files/mail.zip] as Imported archive and activate...?

~SaNv...

Former Member
0 Kudos

Did you checked the below blog for doing the same using UDF

/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Rajesh

Former Member
0 Kudos

Hi Santhosh,

I have imported Mail.Zip and wrote UDF which is present in screen shot how to use with below java code

Thanks

Former Member
0 Kudos

Hi,

Have you find a solution ?

Because I tried to do this wiki in a PI 7.1 and I have the same issue.

https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=90570965

I created the Imported Archive "IA_Mail" inside a namespace N1 and Folder F1. Activation is ok.

In my existing Function Library (defined in namespace N1 and Folder F2),

- I added the UdF of this wiki,

- inside the tab "Archived Used", I added a line with my Imported Archive "IA_Mail"

- inside the tab "Import instructions", I added at the line 7 the sentence "mail.sdn.*"

No problem here, the Function Library is well activated.

Then I used this UdF inside my Message Mapping (defined in Namespace N1 and Folder F3).... but when I try to activate the Message Mapping, I have the following error:

Java Area import, Line 7:

package mail.sdn does not exist import mail.sdn.*; ^ Note: /usr/sap/XYZ/aaaaaaaa/j2ee/cluster/server0/./temp/classpath_resolver/Mapb067fb3075f711deb809d28fa0003002/source/com/sap/xi/tf/_MM_File_2_File_.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /usr/sap/XYZ/aaaaaaaa/j2ee/cluster/server0/./temp/classpath_resolver/Mapb067fb3075f711deb809d28fa0003002/source/com/sap/xi/tf/_MM_File_2_File_.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error

So even if Function Library is well activated, it seems that something is bad !

Have you an explanation ?

Thanks

Mickael

Edited by: Mickael Huchet on Jul 21, 2009 1:48 PM

Former Member
0 Kudos

Hi Michal,

mail.sdn.* is not a standard libary. It is user defined package, inside that package created the java code to using send a mail. So check once again, which package are you used in your code, and imported that java code under "Imported Archives" folder.

Regards

Vijaykumar

Former Member
0 Kudos

Hi,

I used the package defined in the wiki... That's all.

Maybe there is a problem with the Imported Archive of this wiki... I will check that...

Regards.

Mickael

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>H i Guys, I have requirement like to send mail through UDF if Some condition fail in Mapping

check those conditions in receiver determination and send mail using mail adapter

>>>Please give answer urgently

please read rules of engagement for forums or we will block your threads

Regards,

Michal Krawczyk

former_member181962
Active Contributor
0 Kudos

Hi Jayan,

Why do you want to use a UDF for sending mails?

YOu can simply configure Alerts right?

http://www.saptechies.com/xi-alerts--step-by-step/

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

I am writing UDF for Alert in this alert i have to specify reason for mapping fail,reason is like "Sequence failed in mapping for some fields"

Thanks