on 06-15-2007 12:02 PM
Hello,
I have source structure
S1
I have target Structure
T1
S1 is mapped to T1
If T1 has value '10' I want to raise alert.
How can I do it
Regards
Hi Henry,
very easily:
1. open this blog by Bhavesh:
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
2. copy the code
3. add one if - If T1 has value '10' I want to raise alert.
4. and you're done
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Henry,
>>>Can I have your email id
it's in my business card on SDN
>>>> I can ask you things regarding alert!!!
but please ask here - SDN as you will get much faster response then from my mail
as I'm on holidays
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Hello Michal,
I am seeing this blog by Bhavesh. I am not doing any lookup.
I am doing simple mapping (S1 ---T1)
So what user defined fn I have to write to raise alert.
Will your blog -- /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
will help me in this
Regards
Hi
This is the UDF you have to write
import com.sap.aii.mapping.lookup.*;
import java.io.*;
// Business Service --BS_UDFALERT
// RFC Comm Channle -- CC_UDFALERT_RFC
Channel channel = LookupService.getChannel("BS_UDFALERT", "CC_UDFALERT_RFC" );
RfcAccessor accessor = LookupService.getRfcAccessor(channel);
String rfcxml ="<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:SALERT_CREATE xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><IP_APPLICATION_GUID/> <IP_CAT>ALRTFRMWRKTEST</IP_CAT> <IT_CONTAINER><item><ELEMENT>DOCNUMBER</ELEMENT> <TAB_INDEX>0</TAB_INDEX> <ELEMLENGTH>250</ELEMLENGTH> <TYPE>C</TYPE> <VALUE>12345</VALUE> </item> </IT_CONTAINER></ns0:SALERT_CREATE>";
InputStream inputStream =new ByteArrayInputStream(rfcxml.getBytes());
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload rfcOutPayload = null;
rfcOutPayload = accessor.call(payload);
You are doing an RFC lookup within the UDF to trigger the alert
hope , it is clear
regards
krishna
Henry,
From ur mapping if u have to raise alert then u have to trigger this function module
SALERT_CREATE which Bhavesh is doing in the blog using RFC Look up
Instead u can also write a JCO call to the RFC directly but I think it is better way to have a RFC Communication channel and do RFC Lookup to trigger an alert
Regards
Kavitha
Hi
refer the following weblog
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
You can have an UDF which checks for the value and raises an alert accordingly
regards
krisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.