on 11-14-2010 10:55 AM
Hi All,
I have a requirement to send the three values coming in the one source field to three different target fields.
E.g: Source field is "src1" and having the values 1,2 ,3 These values should be sent to the target fields such as
first target field "Trg1" should get the value as "1" and the second target field "Trg2" should get the value as "2".
third target field should getv value as "3"
I have used copyvalue function. it is working fine but if any value from "src 1" is blank.
I will have the runtime error as follow
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_WORKORDER_TO_ORDCHG_ORDERSO5_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_WORKORDER/StatementName2/TEST/acc
Will appreciate your advise on how to resolve this.
Regards,
FNG
Hi Ninad,
Thank you for your guidance !
I have managed to resolve the error.
What I did is as follows source1 -> copyvalue (0) -> then
source1 -> copyvalue (0) -> exist -> if --> target1
constant (blank) -> else
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The parent node for the source1 is coming as 0 to 99999
Source1 is coming as 0 to 1.
The scenario is an IDOC to JDBC. I
I am using a standard IDOC type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The parent node is existed.
Could your advise how should it be done with the parent node ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is the occurence of the source1 field , can you make it mandatory ( ie 1-1 ), Check its context , see proper values are coming in queue
Can you tell me the occurence of the node under which source1 field comes , because you need to put first condition there
regards
ninad
Edited by: Ninad Sane on Nov 15, 2010 9:32 AM
I have mapped as follows
sourc1 -> mapWithDefault [NIL} -> copyvalue [0] -> targt 1
sourc1 -> mapWithDefault [NIL} -> copyvalue [1] -> targt 2
sourc1 -> mapWithDefault [NIL} -> copyvalue [2] -> targt 2
No substring function used.
But still having error
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_WORKORDER_TO_ORDCHG_ORDERSO5_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_WORKORDER/StatementName2/TEST/acc
I noticed from the source xml structure in the inbound payload, when sourc1 is blank, the tag is not created.
so question is how to create sourc1 tag if the sourc1 is come as blank ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francesco
I have tried using MapWithDefault, but still having error.
Could you advise how the MapWIthDefault should be used with CopyValue, just to check I am doing correctly
in the mapping.
Regads
FNG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francesco
Thanks for your suggestion, I will try it out.
Regards
Freddy Ng
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try to use the copyValue with additionally the MapWithDefault function.
Regards
Francesco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.