cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Occurance for Mail XSD

Former Member
0 Kudos

Hi,

I have Idoc to JDBC to Mail scenario. I have to do some JDBC lookups and send data to the Oracle and if any values are null, I have to send an email with JDBC fields names. Since the email might might occur in some cases and not in some other. I need to change the occurrence of the Mail XSD from 1 to 0...1. Since this is the root node, i'm not able to edit the XSD.

I have downloaded the Standard Mail XSD from servie.sap.com.

Can somebody help me on this.

Regards,

Ram

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello Ram,

Cant you acheive your sceanrio by triggering the alerts using LOOKUP..

we can atrigger a alert in the same lookup of jdbc based on the condition of output or in case of error too...

I hope you can do in this way

Rajesh

Edited by: Rajesh on Jul 16, 2009 10:39 AM

Former Member
0 Kudos

Satish,

Thanks for the reply.

I already tried this. This is the message structure after changing the MM occurrence 0..1.

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema targetNamespace="http://sap.com/xi/XI/SplitAndMerge" xmlns:xi="http://sap.com/xi/XI/Mail/30" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/SplitAndMerge">

This is the error in RWB

Error in CC Monitoring:

"expecting start tag: Mail, but found Messages at state 1"

Regards,

Ram

former_member200962
Active Contributor
0 Kudos

occurence change (or any workaround suggested above) is not supported by the mail xsd.....you cannot do as it is done in case of IDOC (change the XSD or in MM/ IM)....

Regards,

Abhishek.

Former Member
0 Kudos

Hi Satish,

I tried doing this is Altova XML spy. But since this is a root node. It did not allow me to import the change.

Hi Vamshi,

I'm using the same XSD. Here the Occurrence of Mail(node) is 1. I need to change this to 0..1

Regards,

Ram

Former Member
0 Kudos

Ram,

Go to message mapping and go to Messages tab. Then you cahnge the occurrence to 0.1.

Regards,

---Satish

Former Member
0 Kudos

Hi,

Use this XSD file

<xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30"

xmlns:xi="http://sap.com/xi/XI/Mail/30"

xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="Mail">

<xs:annotation>

<xs:documentation>Mail package for XI Mail Adapter</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="Subject" type="xs:string" minOccurs="0" />

<xs:element name="From" type="xs:string" minOccurs="0" />

<xs:element name="To" type="xs:string" minOccurs="0" />

<xs:element name="Reply_To" type="xs:string" minOccurs="0" />

<xs:element name="Content_Type" type="xs:string" minOccurs="0" />

<xs:element name="Date" type="xs:dateTime" minOccurs="0" />

<xs:element name="Message_ID" type="xs:string" minOccurs="0" />

<xs:element name="X_Mailer" type="xs:string" minOccurs="0" />

<xs:element name="Content" minOccurs="0">

<xs:annotation>

<xs:documentation>any type</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

<xs:attribute name="encoding" type="xs:string" />

</xs:complexType>

</xs:element>

<xs:element name="MailReceipt">

<xs:annotation>

<xs:documentation>Mail Receipt for XI Mail Adaper</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="Server" type="xs:string" />

<xs:element name="Format" type="xs:string" />

<xs:element name="UseMailPackage" type="xs:boolean" />

<xs:element name="Encoding" type="xs:string" />

<xs:element name="Subject" type="xs:string" minOccurs="0" />

<xs:element name="From" type="xs:dateTime" minOccurs="0" />

<xs:element name="To" type="xs:string" minOccurs="0" />

<xs:element name="Date" type="xs:dateTime" minOccurs="0" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

REgards

Former Member
0 Kudos

Ram,

You may unable to do it in PI because it is an external definiton. Did you tried by exporting the xsd into altova xml spy or in notepad. Once when you done save and import once again into IR.

Regards,

---Satish