Target Field Mapping error
i am having a source structure like
<a>
<b></b>
<c>
<1></1>
</c>
</a>
and target structure like
<x>
<y></y>
<z>
<9></9>
</z>
</x>
with
1. ofcourse the roots mapped to each other
2. an the element b is mapped to element y
3. element c is mapped to z
4. sub element 1 is mapped to sub element 9.
The minOccurs for c, z, 1 and 9 =0.
However, while execution of this mapping with the source element c missing in the payload a 'Cannot produce target element' error is encountered.
Can any one help find out why is this error being encountered when both the source and target feilds along with their subfields are optional (i.e. with minOccurs=0)?
ok there seems to be some confusion
my source structure is like
<a>
<b></b>
<c>
<1></1>
</c>
</a>
and target structure is like
<x>
<y></y>
<z>
<9></9>
</z>
</x>
and the mapping is as follows
a is mapped to x
a>b is mapped to x>y
a>c is mapped to x>z
a>c>1 is mapped to x>z>9
and both c and z have cardinatlity 0 to unbounded.
In this case if my source message does not have the element c, its processing leads to the said mapping error.
Edited by: diptee s on Mar 14, 2010 4:51 PM
Similar Messages
-
Hi Mapping Gurus,
my scenario is flat file (fixed length) to IDoc (inbound)
Source Structure is
- Recordset (1..unbounded)
-- POHeader (1.1)
--- Date1
--- Date2
I need to map the Date1 and Date2 fields to 2 occurrences of E1EDK03 segment each having different qualifiers
Target Field:
IDOC (1..unbounded)
E1EDK03
--IDDAT ("022") --> Date1
E1EDK03
--IDDAT ("002") ---> Date2
How can I achieve this using graphical mapping only?
I searched the forums and i'm still a little confused with context handling, so kindly help me outI need to map the Date1 and Date2 fields to 2 occurrences of E1EDK03 segment each having different qualifiers
IDOC (1..unbounded)
E1EDK03
--IDDAT ("022") --> Date1
E1EDK03
--IDDAT ("002") ---> Date2
You may even need to implement a if-logic to map Date1 to 022 and Date2 to 002. -
6 IF-THEN and OR conditions for one target field mapping
Hi Mapping experts,
I have a validation condition involving 2 source fields and 1 target field only, however the number of conditions is 6 (OR)
Source Fields:
TYPE
PONUM
Target Field:
BELNR
If TYPE = 1st value then BELNR = PONUM substring (0, 8) 0=start position, 8=character count
OR
If TYPE = 2nd value then BELNR = PONUM substring (2, 8)
OR
if TYPE = 3rd value then BELNR = PONUM substring (4, 8) .......... up to the 6th Validation Condition.
When I do this using graphical mapping only (multiple IF-THEN and OR's) the validation is successful only on the 1st IF-THEN statement, then it passes the substringed value to the 1st OR function..... When I "Display Queue" the 1st OR function the substringed value is taken as null (or:in1 <null>) Is this because OR function is expecting Input as "True or False" value only and not a string value?
For my requirement above, can I achieve this using graphical mapping only? or do I have to use UDF for this?
If it's better to use UDF for this, would anyone give me a jumpstart on the code? (I have no experience yet in UDFs)
Thanks, and hoping that somebody will respond accurately and completely.Create UDF with two inputs as TYPE & PONUM and use bleow code there..
String out = "";
if( TYPE.equals("1"))
out = PONUM.substring(0,8);
return out;
else if( TYPE.equals("2"))
out = PONUM.substring (2,8);
return out;
else if( TYPE.equals("3"))
out = PONUM.substring (4,8);
return out;
else if( TYPE.equals("4"))
out = PONUM.substring (4,8);
return out;
else if( TYPE.equals("5"))
out = PONUM.substring (4,8);
return out;
else if( TYPE.equals("6"))
out = PONUM.substring (4,8);
return out;
return "";
Note: change the substring range as per your need in above code.
Now do your mapping as shown below
TYPE ------>|
| -----> UDF ---> BELNR
PONUM----->| -
One (src)to many(target) field mapping
Hi,
I am new to XI.Is one to many field mapping possible in XI?
Plz send me the links with examples.Hi,
Yes it should be possible.
Follow this links
http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm -
Mapping error: cannot produce target element
Hello all,
I am trying to test a mapping. i have 3 messages in my source and one Msg in my target. when i test execute it
i get this msg:
1) compilation of mapping successful
2) cannot produce target elements/Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd.
I am not sure what the error might be, can somebody please advice..
Thanks in advanceHi Harika,
how many Elements do u have In your Source Message Type(for example you have 3 elements and how u want to see these elements in your Target Message Type, define that much elements in your Target Message Type and Mappe those)
1. usually people will go with one to one element mappaing, in such case define your souce and Target Message type Elements equal
other wise you can do one Source having 3 elements and you want to see only one output from them then use Standard Function like "Contacte" that will add the 3 elements in one.
if you are satisfied with this please provide points to me.
Ashok -
Hi,
I am required to have a IP recieve 3 IDOC types triggered from BD10 . It can trigger 3 or more IDOCs. For Eg.
1 ARTMAS (only 1) , 2 INFRECs and 1 LIKOND.
If anyone IDOC has come then after a waiting period of 1 minute it should come out of FORK.
My IP is like this.
In a FORK there are 4 branches.
1) ARTMAS receiver
2) Loop(infinite) with INFREC Receiver and a Container Operation to collect all IDOCs
3) Loop(infinite) with LIKOND Receiver and a Container Operation to collect all IDOCs
4) A wait Step with a container operation to initialize endtime variable
necesary branches: 4
The Fork Comes out when the end condition is met ie the End variable is Set or if all the IDOCS have come.
Corelation on MATNR.
Next I have the transormation and send step.
In the MM i have 3 Source and 1 Target.
Artmas 0-1 occurance
INFREC 0 - unbounded
LINKND 0-unbounded
I have created the Target with External Definition and have set the correct occurance in the XSD file
I have mapped the neceessary Segments from INFREC and LIKOND and all the Segments of ARTMAS to the Target structure.
In SXMBMONI it says error on Outbound side and
I see Mapping Exception when I seen in WORKFLOW.
Is my design Correct?
I have tested the Interface & Message Mapping they are correct
Request your help.
John Rajesh
<?xml version="1.0" encoding="utf-8" ?>
- <MappingTrace>
<Trace level="1" type="T">Mapping-Namespace:http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO</Trace>
<Trace level="1" type="T">Mapping-Name:IM_ARTMAS04_TO_ZARTMAS04_PUB01</Trace>
<Trace level="1" type="T">Mapping-SWCV:00000000000000000000000000000000</Trace>
<Trace level="1" type="T">Mapping-Type:JAVA</Trace>
<Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
<Trace level="3" type="T">Multi mapping required.</Trace>
<Trace level="3" type="T">Creating Java mapping com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.</Trace>
<Trace level="3" type="T">Load b8f12d30-2c45-11da-90af-ef160a892024, http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO, -1, com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.class.</Trace>
<Trace level="3" type="T">Search com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_.class (http://test.com/usa/SapRetail/ARTICLE_CLASSIFY/TESTDEMO, -1) in swcv b8f12d30-2c45-11da-90af-ef160a892024.</Trace>
<Trace level="3" type="T">Loaded class com.sap.xi.tf._MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
<Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
<Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_ARTMAS04_TO_ZARTMAS04_PUB_</Trace>
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns4:Messages/ns4:Message1/ZARTMAS04_PUB/IDOC. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:292) atCheck the following
1. Have u mapped the root level element?
2. Inside interface mapping, when u say read interface, is it diplaying both the interface.
Also check ur input
may be u r not providing proper input
Regards,
Prateek -
BPM Collect Pattern: N:1 Mapping error in trnsformation step
Dear All,
I am using collect pattern Payload Dependant.
I have one source data type and one target data type. Mapping is one to one.
Data type contains 3 fields, Value Name and Surname.
In Loop I have used condition when Counter is equal to value stop the loop.
I have used Transformation step as I am using N:1 mapping.
I have used abastrct to abastract message mapping.
Source message is 0 to unbounded.
In interface mapping target message occourance is 1. But in mapping program target message occourance is 0 to unbounded.
When I am running my scenario, Third party to IP is working fine. But in IP i am getting error in transformation step.
"com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:Collect_Receiver_MT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start"
Can anybody will help me to solve this problem?
Warm Regards,
GouriHave a look
http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
/people/kannan.kailas/blog/2005/12/07/posting-multiple-idocs-with-acknowledgement
Also have a look at these seminars,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c6d54e02
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37bec4706cc
Thanks -
Message Mapping error: RuntimeException in Message-Mapping transformation
Hi,
Being new to XI, I am struglling to sort out a basic mapping error. Appreciate if you could help out.
Its an File->XI->R/3 scenario.
My FCC successfully reads the File and creates an XML. However this XML is not transferred to the target XML structure which is exactly same except the root element name is different at top.
I tried various forum tips but I still am getting the error.
( When I Test the Message mapping in test mode..it seems fine, however if I copy the XML from SXMB_MONI, it then throws the above error)
I looked at the MM in text mode: below is the extract
/ns0:MT_REQUEST_TO_SAP/REQUEST_DETAILS/MSG_HEADER=/ns0:MT_REQUEST/REQUEST_DETAILS/MSG_HEADER=
/ns0:MT_REQUEST_TO_SAP/REQUEST_DETAILS/MSG_HEADER/SOURCE=/ns0:MT_REQUEST/REQUEST_DETAILS/MSG_HEADER/SOURCE=
/ns0:MT_REQUEST_TO_SAP/REQUEST_DETAILS/MSG_HEADER/DESTINATION=/ns0:MT_REQUEST/REQUEST_DETAILS/MSG_HEADER/DESTINATION=
/ns0:MT_REQUEST_TO_SAP/REQUEST_DETAILS/MSG_HEADER/MESSAGE_ID=/ns0:MT_REQUEST/REQUEST_DETAILS/MSG_HEADER/MESSAGE_ID=
As seen the name space in both starts with nS0 and end of each line has '=' sign. Is that ok.
I have run out of options and dont know , whats the problem. Please help.
The target and Source XML structures are exactly same as shown below
MT_REQUEST MT_REQUEST_TO_SAP
|__MSG_HEADER |__MSG_HEADER
|__SOURCE |__SOURCE
|__DESTINATION |__DESTINATION
|__MESSAGE_ID |__MESSAGE_ID
And the SXMB_MONI Trace shows the following error
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation:
Cannot produce target element /ns0:MT_REQUEST_TO_SAP.
Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at ..
Thanks
Shirin
Edited by: Shirin K on May 29, 2008 10:29 AMHi Prakasu,
As structure are exactly same, I have done 1:1 mapping. So all the fields in target structure are mapped, so no field has beeen left.
In this structure, I do not have any 1:n relation. So 1:1 mapping should be fine.
Apart from this could teher be any other reason.
Regards
Rajiv -
Mapping error in FCC to XML conversion
hiii friends,
im donig a simple fcc to xml conversion
my Sender msg type is like
TXT_mt
records 1.1
row 1.n
id 1
Name 1
address 1
My receiver msg type like
Xml_mt
records 1.1
row 1.n
id 1
Name 1
address 1
msg mapping like
records--->records
id--->id
Name-->Name
address-->address
**Im getting a mapping error like**
<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/_pepsi_fcc_file_mm_</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>During the application mapping com/sap/xi/tf/_pepsi_fcc_file_mm_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I ve checked my adapeters they r green.
Could u tell me the problem here and how to solve it???
Regards
BalajiHii Volker,
I have tried to understand the trace msg,. i got one interesting error message i hope it will tell the exact problem im facing,,,
<Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_pepsi_fcc_file_mm_</Trace>
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns:xml_mt/record/row. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram
My Sender CC contains the following FCC parameters
Document Name -
> txt_mt
Recordset Name -
> records
recordset Structure -
> row, *
row.fieldNames -
> id, Names,address
row.fieldSeparator -
> , (comma)
row.endSeparator--- > 'nl'
row.processConfiguration -
> FromConfiguration
my TXT_in.txt contain
100,balaji,chennai
200,raj,orissa
300,charakrat,bangalore
Regards,
Balaji
Edited by: Balaji Pichaimuthu on Jul 1, 2009 3:44 PM -
Hi Experts,
I have a File to File (FTP) scenario,
The source structure.....................Mapping.......................................target structure
PO ...................................................................................PO
|........Header...1.1.................................................................|.....Header.....1.1
|........Line........1.unbounded..................................................|....Line...........1.unbounded
|.........sno.........1.unbounded
|........Inst...........1.unbounded................................................|.....Inst............1.999
It caught an Mapping error, when i send a messge with below srtucture
PO
|........Header
|........Line
|........Line
|........Line
Error details:
RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:PO/Inst.
Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
Please suggest to resolve the error.
Thanks in advance.Hi,
In you source structure all fields are with occurance 1 -1 or 1- Unbounded.
But in source XML, if the filed <Inst> is missing its creating this kind of error. As the decided Source XML structure is not getting matched up.
Probably you could do one thing here either pass the blank space or any value such as 00 etc to Inst field. That will make this Inst available in source XML structure.
Or change the occurance of Inst to 0 - Unbounded. This will solve the problem.
Just for confirmation you could add </Inst> tag in your source XML while testing it in Test Tab of mapping.
(Make sure to add this tag in proper sequece only)
Thanks
Swarup -
hi
i got payload of response from webservice as below;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <m:requestResponse xmlns:m="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result xsi:type="xsd:string">20060911tt11</result>
</m:requestResponse>
when i test mapping with above contents in mapping test tab, i got mapping error as blow;
16:03:59 Start of test
Cannot produce target element /ns1:Rnumber_MT/rnum. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element /ns1:Rnumber_MT/rnum. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
16:03:59 End of test
source side in MM_response, comming from wsdl for MT.
result xsd:string
target side in MM_response, i created DT, MT.
Rnumber_MT
|__
rnum xsd:string
i sent data to webservice succesfully, and i can see return value as well, but mapping error.
please guide me.
thanks in advance
venjaminhi
in response procedure;
my scenario abap proxy 2 soap sync
1. response from webserivce --> r/3
there is no DT, MT due to coming from wsdl.
only i can see result xsd:string
2. data type for r/3
Rnumber_DT
rnum xsd:string
message type Rnumber_MT
Rnumber_MT
|_
rnum xsd:string
3. mapping for response
1. source (webservice)
external message : requestResponse
result xsd:string
2. target (r/3)
Rnumber_MT
|_
rnum xsd:string
i did map ,,, result ---> rnum..
here is payload for response from webservice....
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <m:requestResponse xmlns:m="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<result xsi:type="xsd:string">20060911tt11</result>
</m:requestResponse>
please help me
thanks in advance
venjamin -
Mapping Error: Cannot cast to float
Hello Everyone,
Has anyone seen this error in Message Mapping in XI? What did you do to resolve it?
13:59:10 Start of test
Compilation of JobPositionPublication2PositionOpening_M successful Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:284) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:220) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:41) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:220) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:352) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:60) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:309) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:194) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.IllegalArgumentException: Cannot cast to float. at com.sap.aii.mappingtool.flib3.Arithm.toFloat(Arithm.java:19) at com.sap.aii.mappingtool.flib3.Arithm.greater(Arithm.java:72) ... 27 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns1:PositionOpening/ns1:PositionProfile/ns1:PositionDetail. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Arithm method greater[, 0, com.sap.aii.mappingtool.tf3.rt.Context@8e6076]
13:59:12 End of testIf you are using a UDF, then the input and the output from the UDF is in the form of a string.If a float value is passed to the UDF,and if there are some arithmetic operations done on that float value then you need to convert the string to float - something like the below.
String s = "100.00";
try {
float f = Float.valueOf(s.trim()).floatValue();
System.out.println("float f = " + f);
} catch (NumberFormatException nfe) {
System.out.println("NumberFormatException: " + nfe.getMessage());
Then before returning the value to the target field,convert the value back to string like this -
Float.toString(float f)
In case you are using some other standard functions,do let us know of that as well so that we can suggest resolutions to this error.
thanks\
Priyanka -
Mapping Error: /ns0:Messages/ns0:Message1/ns1
Dear All,
I am using N:1 Mapping in BPM Collect pattern payload dependant.
System: SAP PI 7.0 SR2, SP 10.
Error is as follows:
"com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:Col_Receive_MT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start"
Input Payload:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:Col_Send_MT xmlns:ns1="http://RepeatCollectPattern">
<KeyNo>1</KeyNo>
<Name>ABC</Name>
</ns1:Col_Send_MT>
</ns0:Message1>
</ns0:Messages>
Can anybody will help me to solve this problem.?
-GouriI have followed Sample Collect pattern payload dependant pattern from SAPBASIS component.
In Interface Mapping,
Source Occourance: 0 to unbounded
Target occourance: 1
Mapping is 1: 1
Data Type:
Col_Send_MT Complex Type
KeyNo Occourance 1
Name Occourance 1
In Message mapping,
Source is : 0 to unbounded
Target is: 1
-Gouri -
1: N multi mapping -----Message Mapping Error
Hi,
I am doing this scenario
Various multi-mappings and Optimizing their Implementation in Integration Processes (BPM) in XI.
In the design part of the mapping.
How can I perform the message mapping
Step 1. We are controlling occurrence of Output Piyush_msg_out_3 by mapping it with element2 with message context.
Step 2.
We are using u201CUseOneAsManyu201D under category node functions (SP14). It has three inputs ;
1. Element which is going to be used for multiple times. In our case it is Element1 with message context.
2. The element which is going to define how many times it will be replicated. Important thing, context should be same.
3. Same as second input but with its own context in our case it is Element2.
For Step 1,
I have mapped piyush_msg_out_3 with Element2 (context is root)
For Step 2,
I have mapped
Element1(context root)----
|
Element2(context root)----
| useOneAsMany -
>Element1
Element2(context root)----
|
subelement------> subelement
I did not do root mapping.
when do the test I am getting the following error
Start of test
Compilation of MM_multimappingandoptimizing successful Cannot produce target element
/ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element
/ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
End of test
I thought error generated due to Parent Node condition fails, How do I map the Top node,
even though I mapped root------->root, I am getting the same error in the instance test
Please give me some suggestions
my message mapping is correct or do I need to change the context of the node or what should I have to do ?
thanks
manianHi Praveen,
I have checked the XSD tab of Source and Target message types. I can see the complete XSD.
Source Message Type XSD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:mlr:multimappingandoptimizing" targetNamespace="urn:mlr:multimappingandoptimizing">
<xsd:element name="piyush_msg_in_1" type="piyush_msg_in_1" />
<xsd:complexType name="piyush_msg_in_1">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
f1fd03a0cddd11ddc1c4001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="root">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e0cd1a11ddc6b0001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Element1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e1cd1a11dd8843001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Element2" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e2cd1a11dd8f7a001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="subelement" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e3cd1a11dd8ff2001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Target Message Type XSD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:mlr:multimappingandoptimizing" targetNamespace="urn:mlr:multimappingandoptimizing">
<xsd:element name="piyush_msg_out_3" type="piyush_msg_out_3" />
<xsd:complexType name="piyush_msg_out_3">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
058e2b60cdde11ddaffd001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="root">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d0cd1b11dd99ae001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Element1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d1cd1b11ddc07e001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Element2">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d2cd1b11dd9385001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="subelement" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d3cd1b11dda9d7001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
thanks
manian -
XI Flat File to JDBC Mapping Error
Hi,
I have been trying to insert some records from a flat file into a sybase database using the FILE adapter (with file content conversion) as a sender and the JDBC adapter as a reciever, but I keep getting mapping errors like:
RuntimeException during appliction Java mapping com/sap/xi/tf/_mm_hh_file__hh_sybase_nombres_</Trace>
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:mt_hh_sybase_nombres/STATEMENTNAME. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start
I have read through some blogs and I still can't figure out what is wrong.
Flat pipe separated file:
Hans|Robert|Hahn|Gallegos
Karina|Maria|Cordoba|Gutierrez
Datatype for this file looks like this:
Record 1
Row 1...Unbounded
Nombre 1
SegundoNombre 1
ApPaterno 1
ApMaterno 1
Because the FILE adapter uses Content conversion, the file translates to:
<?xml version="1.0" encoding="utf-8" ?>
<ns:hh_test xmlns:ns="http://me.com">
<Record>
<Row>
<Nombre>Hans</Nombre>
<SegundoNombre>Robert</SegundoNombre>
<ApPaterno>Hahn</ApPaterno>
<ApMaterno>Gallegos</ApMaterno>
</Row>
<Row>
<Nombre>Karina</Nombre>
<SegundoNombre>Maria</SegundoNombre>
<ApPaterno>Cordoba</ApPaterno>
<ApMaterno>Gutierrez</ApMaterno>
</Row>
</Record>
</ns:hh_test>
My database table looks like this:
Nombres
ApPaterno
ApMaterno
Datatype for this table looks like this:
STATEMENTNAME 1..Unbounded
nombres 1
action optional
TABLE 1
access 1
Nombres 1
ApPaterno 1
ApMaterno 1
MAPPINGS as follows:
Record ------> no mapping
Row ------> STATEMENTNAME
Constant ------> action
Constant ------> TABLE
Nombre + SegundoNombre ------> Nombres
ApPaterno ----> ApPaterno
ApMaterno ----> ApMaterno
How do I do the mapping ? I've been through a lot of blogs and threads but I haven't found an example like this, a flat pipe separeted multiline file with records to be inserted in a database.
Message was edited by:
Hans HahnHans,
The error shows you have an error in mapping. Also you have mapped constant for ACTION and TABLE. Here you have to hardcode the value INSERT or UPDATE etc for ACTION and the name of the table for TABLE.
Check this weblog where he has mentioned everything what you are looking for:
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Also once when you are done with mapping try to execute it in the test tab of mapping editor.
---Satish
Maybe you are looking for
-
Function module In Update Task is called more than once
Hi experts!! I had a requirement to Create a Customer ( i will call it B) when another Customer (A) is created (ON SAVE). I used a Badi to implement the requirement, and inside my Badi i have 2 Function Calls in Update Task. The first one to create
-
Does itunes check for duplicate purchases?
I got a new version of itunes and I cannot have my purchased next to my new purchases. Does itunes check for duplicates? Or are they happy to take your money?
-
Logical sql firing larger aggregate table instead of smaller one
Hi When we process a request containing one particular column alone along with some time dimension say month or year, the logical sql is firing larger aggregare table instead of smaller aggregate table. Please, help us in resolving this issue. The Or
-
Employee related data columns from hrms table
i am new to HRMS tables. i have to create employee report temporary table, columns are given below. Gender code Gender Description Grade code Grade Description Country name Nationality from which tables i can find these columns.i need employee tables
-
How do i hook up my hp photosmart printer to my hp pavilion dv7-1260us?
How do I hook up my hp photosmart printer to work online with my hp pavilion laptop dv7-1260us? I hooked it up and it will not relay to the printer to print. I have the USB cable hooked up and the main elec plug hooked up to the wall outlet. I also