cancel
Showing results for 
Search instead for 
Did you mean: 

External Definitions(XSD)

Former Member
0 Kudos

Hi,Everyone

I am in trouble with the External Definitions. The situation is the i had uploaded the XSD documents from the local files in 'External Definitions'.I want to use the XSD document as 'Output Message' in Message Interfaces or as 'Source Message' in Message Mapping, now i can see the separated field but not the structure that containts the all fields of the XSD.

So i wish to know either how to convert the XSD or the other ways to make me see the structure. I also want to know more threads about using XSD.

I am waiting for your help, thanks

Best Wishes

Amanda

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi,

Also for that particular field in mapping, check mapping is done and check by giving test input and display Queue for that particular field

Regards,

Sudharshan

Former Member
0 Kudos

Hi,

Check whether the Namespace and Message Type that you see in the Test and in the input file that u give,exactly match. This may cause exception during run time.

Regards,

Sudharshan

Former Member
0 Kudos

Hi,

Just to cross check your scenario. once you have loaded your xsd, you will have an entry in External Definitions in the navigation window. Now in your message mapping either at the source or Target Message Type click the Question Mark (?)icon and choose the External Definition that u have uploaded. once this is done the structure of that XSD i.e message type will appear and check whether all your intended structures are present.

Regards,

Sudharshan

Former Member
0 Kudos

Hi amanda,

when ever u get an XSD, there could be many number of messages as u are seeing while selecting that particular external definition into message mapping. Normally how XSDs are prepared is like we include only those messages which are relevant to us under one element.

it is not necessary that u can see all the messages defined in XSD into ur mapping..

Let us say u see like:


File
Record
Name
Age
Address
Street
City




Now while using the external definition in message mapping , if u select

Address

as ur message u ll see only

Address
    Street
    City



But if u select

File

, u might see;

File
   Record
    Name
    Age
    Address
      Street
      City

It totally depends on how ur XSD is structured. So u need to select the appropriate message..

I hope it helps

Shailesh

Former Member
0 Kudos

OK, Thanks everyone

Now I have gotten the structure as what you see,thanks a lot.

But I have another question about Message Mapping,

The error message like this:

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_RM_CRM_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Während des Anwendungs-Mappings com/sap/xi/tf/_MM_RM_CRM_ wurde eine com.sap.aii.utilxi.misc.api.BaseRuntimeException geworfen: RuntimeException in Message-Mapping transformatio~.</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

I don't know how to solve this trouble.

I am waiting for your help

Best Wishes

Amanda

Former Member
0 Kudos

Amanda,

check the correctness of your mapping in the test tab in mesage mapping.you would have missed a maping of ur root nodes of the source nad target. Put dummy values for fields in the test tab and chk whether ur mapping is getting executed or not.

Priyanka

Former Member
0 Kudos

Thanks,Priyanka

I have 'Put dummy values for fields in the test tab' like what you said and mapping is successful, but the error message appears when i use the XML document provided by business partner. Do you know my meaning?

I am waiting for your help,thanks a lot.

Best Wishes

Amanda

Former Member
0 Kudos

Hi Amanda,

This kind of error occurs when ur XML file containing the Test Data and the XSD does not match in strucutre.Please check for the compatibility of both whether the test dat contains all values for XSD and that all nodes of XSD properly mapped.

If any conditions applied on the nodes for the incoming values that must also be checked.

Cheers,

Rashmi

Former Member
0 Kudos

Please check whether you have mapped the root nodes as well in the mapping.

Priyanka

Former Member
0 Kudos

OK,Thanks everyone

I will check the XML and the XSD document

Former Member
0 Kudos

hi,everyone

Go on talking above questions,

the message in the trace like this:

<Trace level="1" type="T">Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_RM_CRM_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; RuntimeException in Message-Mapping transformation: Cannot produce target element /ZCRMXIF_PARTNER_SAVE_M01. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</Trace>

thanks a lot and i am waiting for your help

Amanda

Former Member
0 Kudos

Dear,Rashmi

Would you like to tell me how to check whether the XSD and the XML is match or not ?

Best Wishes and thanks a lot

Amanda

Former Member
0 Kudos

Hi Amanda,

1. Check the occurence of the element <i>ZCRMXIF_PARTNER_SAVE_M01</i>.

2.Check whether u have a valid mapping for that particular element.If u have any conditions applied upon this element and if the incoming value doesnt satisfy this condition you will get such a error.

To check for XSD and XML compatibilty you can create an XML from the XSD with any of the XML editor like XML SPY or Stylus.

Cheers,

Rashmi

Former Member
0 Kudos

Hi Rashmi,

1AThe occurence of the element ZCRMXIF_PARTNER_SAVE_M01 is 1..1

2AThe mapping test in the Message Mapping is ok, there is no particular element

Can you give me more info ? thanks a lot

Amanda

former_member187339
Active Contributor
0 Kudos

Hi Amanda,

How is your target element ZCRMXIF_PARTNER_SAVE_M01 formed? Can you specify the mapping which is done? Is the element a child node of some node? If so then what is the mapping done on the parent node?

Also award points for helpful replies

Regards

Suraj

Former Member
0 Kudos

hi,Rashmi

Go on talking above questions,

I guess the error occured is in the mapping section,but i don't find where the fault occured.

With the IDOC as the target message whether i should configure particularly or not.

Would u like to give me help? thanks a lot

Best Wishes

Amanda

Former Member
0 Kudos

Hi Amanda,

When you are selecting ur XSd from the message mapping, you will get many nodes under'External Definitions'.From these you need to select ur root node (of the XSD).Only then you will get the structure as you expected in the 'source message' option in mapping. hope this helps.

Regards,

Priyanka

former_member187339
Active Contributor
0 Kudos

Hi Amanda,

After importing XSD into External Definition, go to the messages tab. Their either you can see one message or a number of messages. Just go thru your XSD and search for the field which has in itself reference to all the fields. For eg 'A' in this case :

<xs:element name="A">

<xs:complexType>

<xs:sequence maxOccurs="unbounded">

<xs:element ref="Trans" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="Trans">

<xs:complexType>

<xs:sequence>

<xs:element ref="Header" />

<xs:element ref="Detail" maxOccurs="unbounded" />

<xs:element ref="Summary" />

</xs:sequence>

</xs:complexType>

</xs:element>

Hope this will be helpful for you.

Regards

Suraj

Former Member
0 Kudos

Hi

The following threads can help you.

The following link might also help.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/7e5e3c754e476ee10000000a11405a/content.htm

Regards,

P.Venkataramanan

Former Member
0 Kudos

Hi Amanda,

Open your xsd in tools like XML spy and check for the well-formedness and go to the view where you can see the nodes and its childs associated. Check whether the one which you have uploaded is having the nodes that are needed.

Cheers

JK

Former Member
0 Kudos

Thanks,JK

The XSD document is provided by my external bussiness partner, i don't konw what you description clearly, can you give me some more info? Thanks a lot.

I am waiting for your help.