on 06-06-2015 9:40 AM
Hi Everyone!
Im doing a File to XI Scenario. Im facing a couple of issues:
1. I have a folder from where i have to pick a file (.xml) that is throwing an error:
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_DEAL_REQUEST_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_DEAL_REQUEST. Values missing in queue context. Target XSD
I have tried a lot of options including testing my payload in ESR in test mode, there too im getting the same error. Am i doing some thing wrong or is there an issue with the xml that is being placed in the folder by 3rd party?
2. When i give the actual file name as value of File Name in IR, there is just 1 file in the folder, still PI cannot pick the file name. However, If i give "*" as value for Filename, then PI can pick the file.
Can anybody help me out with both these issues??
THIS IS THE EXACT XML THAT IM GETTING FROM 3RD PARTY:
Is there any issue with the formatting in xml ??
or could it be an issue of data type declaration in xml created in 3rd party software & DATA TYPE created by me in PI???
<?xml version="1.0"?>
-<DEAL>
<ACTION>I</ACTION>
<DEAL_NUMBER>DEALNO_00035</DEAL_NUMBER>
<DEAL_PACKAGE_CODE>AT-#-#</DEAL_PACKAGE_CODE>
<DEAL_VERSION_NO>1</DEAL_VERSION_NO>
<DEAL_GROUP_NO>GRP_00044</DEAL_GROUP_NO>
<DEAL_START_DATE>2014-03-01</DEAL_START_DATE>
<DEAL_END_DATE>2016-03-31</DEAL_END_DATE>
<DEAL_CURRENCY>RS</DEAL_CURRENCY>
<DEAL_ADVERTISER_ID>19182</DEAL_ADVERTISER_ID>
<ADVERTISER_NAME>abc solutions India pvt ltd</ADVERTISER_NAME>
<ADVERTISER_BRANCH_ID>2</ADVERTISER_BRANCH_ID>
<ADVERTISER_BRANCH_NAME>MUMBAI</ADVERTISER_BRANCH_NAME>
<ADVERTISER_PAYMENT_TYPE/>
<ADVERTISER_PAYMENT_DAYS/>
<AGENCY_INVOLVED>1</AGENCY_INVOLVED>
<DEAL_AGENCY_ID>18803</DEAL_AGENCY_ID>
<AGENCY_NAME>cccc</AGENCY_NAME>
<AGENCY_BRANCH_ID>2</AGENCY_BRANCH_ID>
<AGENCY_BRANCH>MUMBAI</AGENCY_BRANCH>
<AGENCY_PAYMENT_TYPE/>
<AGENCY_PAYMENT_DAYS/>
<AGENCY_COMMISION>0.00</AGENCY_COMMISION>
<SPEND_BASED_INCENTIVE_VALUE>40.00</SPEND_BASED_INCENTIVE_VALUE>
<DEAL_GROSS_VALUE>5614800.00</DEAL_GROSS_VALUE>
<DEAL_GROUP_GROSS_VALUE>5614800.00</DEAL_GROUP_GROSS_VALUE>
<DEAL_NET_VALUE>0.00</DEAL_NET_VALUE>
<DEAL_CATEGORY>PAID</DEAL_CATEGORY>
<SALES_REP_ID>18838</SALES_REP_ID>
<SALES_REP_NAME>abc test</SALES_REP_NAME>
<SALES_REP_MANAGER_ID>18814</SALES_REP_MANAGER_ID>
<SALES_REP_MANAGER_NAME>test 1</SALES_REP_MANAGER_NAME>
<DEAL_APPROVED_BY>abc.xyz</DEAL_APPROVED_BY>
<DEAL_ENTERED_BY>abc.xyz</DEAL_ENTERED_BY>
<DEALENTEREDON>2015-03-16T12:02:09.600</DEALENTEREDON>
<IS_UCI_AVAILABLE>0</IS_UCI_AVAILABLE>
<DEAL_REF_VALUE>5614800.00</DEAL_REF_VALUE>
-<TRANSACTIONS>
-<TRANSACTION>
<DEALTRANSACTIONID>268</DEALTRANSACTIONID>
<DEALTRANSACTIONSERIALNO>1</DEALTRANSACTIONSERIALNO>
<DEALPACKAGECODE>AT-DAT/TZ-#</DEALPACKAGECODE>
<DLT_CHL_TYPE>DC</DLT_CHL_TYPE>
<DLT_CHL_CODE>AT</DLT_CHL_CODE>
<DLT_MTY_ID>1</DLT_MTY_ID>
</TRANSACTION>
-<TRANSACTION>
<DEALTRANSACTIONID>300</DEALTRANSACTIONID>
<DEALTRANSACTIONSERIALNO>3</DEALTRANSACTIONSERIALNO>
<DEALPACKAGECODE>XXYYZZAA</DEALPACKAGECODE>
<DLT_CHL_TYPE>BC</DLT_CHL_TYPE>
<DLT_CHL_CODE>AA</DLT_CHL_CODE>
<DLT_MTY_ID>1</DLT_MTY_ID>
</TRANSACTION>
</TRANSACTIONS>
-<INCENTIVES>
-<INCENTIVE>
<DEALINCENTIVEID>129</DEALINCENTIVEID>
<DEALID>52</DEALID>
<DEALNO>1444</DEALNO>
<DLINC_INC_ID>4</DLINC_INC_ID>
<DLINC_INC_NAME>AGENCY COMMISSION</DLINC_INC_NAME>
<DLINC_INV_ID>20</DLINC_INV_ID>
<DLINC_INV_LOWER_VAL>0.00</DLINC_INV_LOWER_VAL>
<DLINC_INV_UPPER_VAL>0.00</DLINC_INV_UPPER_VAL>
<DLINC_PERCENTAGE>0.00</DLINC_PERCENTAGE>
<DLINC_DEAL_NETVALUE>5614800.00</DLINC_DEAL_NETVALUE>
</INCENTIVE>
</INCENTIVES>
</DEAL>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinnet,
In PI, did you create a data type, message type for this structure or did you receive the xsd file from third party(which you imported in to PI in external definition and using in message mapping).
If first one is the case, then in the payload I cannot see source message type name(MT...), due to this, in message mapping, PI is not able to matching with the message type that you have created and hence you might be getting the error.
For your confirmation, you can just take the xml from above from <Deal> to </Deal> and put it in test button by replacing the dummy <Deal> to </Deal> and keeping everything as it is, and go to tree view, if it is not showing any red marks, then the payload which you have given is matching with the structure you have defined.
Please check on this and let me know if you face any issues.
Regards
Vishnu
Hi Vineet,
You can just take the xml from above from <Deal> to </Deal> and put it in test button by replacing the dummy <Deal> to </Deal> and keeping everything as it is, and go to tree view, if it is not showing any red marks, then the payload which you have given is matching with the structure you have defined.
From this, you can see the xml coming from 3rd party is matching with the structure you have defined.
Regards
Vishnu
Below is the xsd document for the same:
Is there an issue with the xsd document???
<?xml version="1.0"?>
<!-- Generated using Flame-Ware Solutions XML-2-XSD v2.0 at http://www.flame-ware.com/Products/XML-2-XSD/ -->
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="DEAL">
<xs:complexType>
<xs:sequence>
<xs:element name="ACTION" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_NUMBER" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_PACKAGE_CODE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_VERSION_NO" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_GROUP_NO" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_START_DATE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_END_DATE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_CURRENCY" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_ADVERTISER_ID" type="xs:string" minOccurs="0" />
<xs:element name="ADVERTISER_NAME" type="xs:string" minOccurs="0" />
<xs:element name="ADVERTISER_BRANCH_ID" type="xs:string" minOccurs="0" />
<xs:element name="ADVERTISER_BRANCH_NAME" type="xs:string" minOccurs="0" />
<xs:element name="ADVERTISER_PAYMENT_TYPE" type="xs:string" minOccurs="0" />
<xs:element name="ADVERTISER_PAYMENT_DAYS" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_INVOLVED" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_AGENCY_ID" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_NAME" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_BRANCH_ID" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_BRANCH" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_PAYMENT_TYPE" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_PAYMENT_DAYS" type="xs:string" minOccurs="0" />
<xs:element name="AGENCY_COMMISION" type="xs:string" minOccurs="0" />
<xs:element name="SPEND_BASED_INCENTIVE_VALUE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_GROSS_VALUE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_GROUP_GROSS_VALUE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_NET_VALUE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_CATEGORY" type="xs:string" minOccurs="0" />
<xs:element name="SALES_REP_ID" type="xs:string" minOccurs="0" />
<xs:element name="SALES_REP_NAME" type="xs:string" minOccurs="0" />
<xs:element name="SALES_REP_MANAGER_ID" type="xs:string" minOccurs="0" />
<xs:element name="SALES_REP_MANAGER_NAME" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_APPROVED_BY" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_ENTERED_BY" type="xs:string" minOccurs="0" />
<xs:element name="DEALENTEREDON" type="xs:string" minOccurs="0" />
<xs:element name="IS_UCI_AVAILABLE" type="xs:string" minOccurs="0" />
<xs:element name="DEAL_REF_VALUE" type="xs:string" minOccurs="0" />
<xs:element name="TRANSACTIONS" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="TRANSACTION" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="DEALTRANSACTIONID" type="xs:string" minOccurs="0" />
<xs:element name="DEALTRANSACTIONSERIALNO" type="xs:string" minOccurs="0" />
<xs:element name="DEALPACKAGECODE" type="xs:string" minOccurs="0" />
<xs:element name="DLT_CHL_TYPE" type="xs:string" minOccurs="0" />
<xs:element name="DLT_CHL_CODE" type="xs:string" minOccurs="0" />
<xs:element name="DLT_MTY_ID" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="INCENTIVES" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="INCENTIVE" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="DEALINCENTIVEID" type="xs:string" minOccurs="0" />
<xs:element name="DEALID" type="xs:string" minOccurs="0" />
<xs:element name="DEALNO" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_INC_ID" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_INC_NAME" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_INV_ID" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_INV_LOWER_VAL" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_INV_UPPER_VAL" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_PERCENTAGE" type="xs:string" minOccurs="0" />
<xs:element name="DLINC_DEAL_NETVALUE" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="DEAL" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Hi Vineet,
I used your XSD and your Payload Xml to do some test, and for me no problem.
I create an external definition with your XSD, no error.
In my Service Inteface i use it for Outbound :
I have created a simple dt/mt for my inbound interface.
Look my Message Mapping :
And finaly operation mapping with test (i used your payload) :
I hope it will help you !
Did u copy paste the xml between <xml version> tags?
Im able to do the same if i copy paste between tags. However when i import the xml, PI cant understand it & gives raw source text in unreadable format. If u want i can mail you the xml file?
Try importing it through import xml option & you can also run the complete cycle.
You can tell me your mail id?
Thanxx Youri, the problem is solved.
Actually i was creating a data type manually by copying the fields from xml, so the message mapping was between - MT outbound request & MT inbound request.
Now, what i did was to import the xsd file as External Definition.
So now my existing mapping is between - ED outbound & MT inbound request.
Another issue i faced was with service interface - SI requires both the Request/Response (mine was synchronous scenario) with same category of message types ( MT/ED/IDOC/RFC ) for generating an ABAP proxy, so i created an External Definition for response too & gave it in my outbound SI.
However, my 2nd problem is still unsolved.
Hi Vineet,
1) regarding your first issue you need to modify your message mapping please send the screenshot of mapping of target node: MT_DEAL_REQUEST.
2) Please check if you are giving the file extension of the file name in the same case. Supposedly if its filename.TXT it should be mentioned same.
hope this helps,
thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mapping is fine in 1 case. I will explain to u my whole scenario.
Third-party is placing a xml file onto my folder. I have created a data type manually by copying their element names from xml. Is it an error-free way? I don't know.
The message type i created is fine when i test it manually in Operation mapping. But when in test mode i load my customer's xml file in it, then the same error comes: RUNTIME EXCEPTION.
How do i verify if the xml file given by the customer is valid & not corrupt.? As it is only when i test in Operational mapping (by loading Customer's xml file in ESR) that i get a runtime exception.
Should I request their xsd document also? & create my data type by importing their xsd into ESR??
What is the correct way to go about it?
They are many tools on Internet for XML Validation.
If you have the XSD it's better of course.
With XSD you can easily create your data type / message type for reading customer's XML. Import the XSD under External Definitions and after you can use this XSD as your Message Type in your mapping.
After in your mapping you keep the fields you need :
[XML File (dt from XSD] ===> [Mapping] ===> [My dt with the data that i need]
In ESR - Op Mappings - Test : What's the result ?
In Internal Source you put the XML from customer.
Message was edited by: Youri Catinat
This is the error im getting in SXMB_MONI:
Runtime exception occurred during application
mapping com/sap/xi/tf/_MM_DEAL_REQUEST_;
com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti
on: Cannot create target element
/ns0:MT_DEAL_REQUEST. Values missing in queue
context. Target XSD ~
what does this error imply?
Hi Vineet,
1. Regarding the message mapping issue, there is some issue in the mapping for the target node MT_DEAL_REQUEST. Can you check what is the source field which is mapped to it. Can you share screen shot of this field mapping with the sample test file.
2. Can you share us the file channel configuration to pick up the file.
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Already tried that but did not work.
Initially it was like
Source Directory: /india/Deal/CORE_to_SAP/
File name: Deal.xml
PI was unable to pick the file. I saw this in Message Monitoring in NWA. Also no message in SXMB_MONI. After I changed the file name to "*", PI still showed in message monitoring that it was unable to pick the file but in SXMB_MONI i got the above runtime exception. (point 1)
In Processing tab :
Processing Mode = Test
Test means : Files are not processed.
Only use this mode to test the configurations of the file/FTP adapter or the Integration Engine/PCK. It is not suitable for productive operation.
I never used this File Adapter but maybe you can try with Processing Mode Archive ...
Some informations : Configuring the Sender File Adapter - Advanced Adapter Engine - SAP Library
Best effort = Synchronous Message
If you don't need a Synchronous Interface you can indeed change the Quality of Service.
More informations here : Quality of Service - Enabling Application-to-Application Processes - SAP Library
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.