on 07-11-2013 4:59 PM
Hi,
Source message node SRC1,SRC2
Target message node TAR1
If SRC1 value is "state", then SRC2 value should go to TAR1.
how to achieve it. Which standard function shall i use in PI message mapping for it. I need to use graphical mapping for it.
Regards
SOURCE STRUCTURE :
<Hi>
<S SRC1="1">
<TAR1>xyz</TAR1>
</S>
<S SRC1="2">
<TAR1>oiu</TAR1>
</S>
<S SRC1="3">
<TAR1>state</TAR1>
</S>
<S SRC1="4">
<TAR1>ghj</TAR1>
</S>
</Hi>
After graphical mapping output shud be :
Output shud be
<Hi>
<S SRC1="3">
<TAR1>state</TAR1>
</Hi>
Any help in it..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SAP,
there is no field called SRC2 in you input xml file.
and SRC1 is not having value "state" either.
i have created mapping based on your input xml file. please check.
do the logic for node S and one to one mapping for SRC1 and TAR1.
mapping test results
please let me know if i did not get you correct.
Regards,
Muniyappan.
Hi,
A simple if without else will do. Refer to:
http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
if you get only one message in the source structure then you can use remove context but if you get multiple message in the source structure then remove context is not a good option.
write the below UDF
for(int index=0; index< a.length; index++){
if(a[index] != ResultList.SUPPRESS){
result.addValue(a[index]);
}
}
Cheers
Hidayat
Hi,
You have IF boolen and equalsS string functions in graphical mapping to achieve this.
IF SRC1 equalsS to "state"(define this as constant) THEN
Asign SRC2 to target field TAR1.
Let me know if you want screen shot of it. Above logic ll solve your query.
Thanks,
Rajendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have shared source and target message below few posts-
I have done this mapping. It works when SRC1 element is having one value state.
but,if in XML ,SRC1 is having more than 1 value like state,count etc - then it fails -"
Values missing in queue context. Target XSD requires a value for this
element, but the target-field mapping does not create one. Check
whether the XML instance is valid for the source XSD, and whether the
target-field mapping fulfils the requirement of the target XSD
"
can u help in it
use standard if else mapping function to achive it. very simple.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.