on 02-09-2012 7:22 AM
Hi,
I am working on a message mapping.
Its IDoc to EDI message mapping.
There is one target node Root for which the mapping is done this way
E1EDK02-Qualf(Context-IDoc)-FixedValueMapping(for keys 001,002,012)-equalscreateifRoot
(1)
Now to accomodate a few business requirements we splitted the logic by duplicating the Root,that total no Root node =3,one for keys001,002,012,second for001,002,third for 012,but now instead of 3 Root node,6 root nodes are getting created?
Can you please guide me?
Thanks
Hi,
I am not 1005 clear about your requirement.
But try below mapping logic.
Create 3 root nodes at target and write a mapping logic like below.
use same mapping logic but in fix value table remove entries and compare with constant 001 like same way for 2nd root node 002 and 3rd root node 012.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> How can I implement it without fixed vale mapping?
Yes
for first node give the map condition like
E1EDK02-QualfEquals(001 and 002 and 012) createiftargetnode(1)
For second node
E1EDK02-QualfEquals(001 and 002) createiftargetnode(2)
For third node
E1EDK02-QualfEquals(012) createiftargetnode(3)
Regards,
VR
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
total no Root node =3,one for keys001,002,012,second for001,002,third for 012
Look at your mapping again. For key 001, root 1. and 2. are created. For key 002 - roots 1. and 2. And for key 012 - roots 1. and 3. The total is 6 roots You will have to modify the conditions if you require precisely 3 roots (create one root per one key, most probably).
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Repeat the target node for 3 times.
for first node give the map condition like
E1EDK02-Qualf-FixedMapping-Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf-FixedMapping-Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf-FixedMapping-Equals(012) createif--targetnode(3)
Regards,
Venkata Ramesh
Hi Venkata,
Thanks for your reply.
Repeat the target node for 3 times.
for first node give the map condition like
E1EDK02-Qualf-FixedMapping-Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf-FixedMapping-Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf-FixedMapping-Equals(012) createif--targetnode(3)
What should be the context for the field Qualf?IDoc?
Please help me.
Thanks
Dear Gayatri,
The actual mapping depends on your requirement. If you require different mapping rules for each of those three qualifiers, use:
E1EDK02-Qualfequals(001)createif--Root(1)
E1EDK02-Qualfequals(002)createif--Root(2)
E1EDK02-Qualfequals(012)createif--Root(3)
And provide detailed mappings under each node.
But if you want to map all three qualifiers exactly the same way, simply use one target root with:
E1EDK02-Qualf(Context-IDoc)-FixedValueMapping(for keys 001,002,012)-equalscreateifRoot
Hope this helps,
Greg
Hi,
Context should points to Idoc.
If the source field comes 001, 002 and 012 values then first node should populate the target node(1) so
https://picasaweb.google.com/bvramesh2006/February72012#5707050901322065970
For 2nd node use only 001 and 002 condition
for 3rd node use only 012 condition.
Regards,
VR
Hi Venkata,
Thanks for the reply.
E1EDK02-Qualf--Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf--Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf--Equals(012) createif--targetnode(3)
But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.
How can I achieve it?
Thanks
Hi,
Check this link
https://picasaweb.google.com/bvramesh2006/SDN?authkey=Gv1sRgCP-dmdSu8ZvA5wE#5707050901322065970
> But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.
You are checking the values not only for one occurance (chekcing values for next occurancess 001, 002 & 012) so if you use Fixed value then you may use UDF.
Regards,
VR
Hi Venkata,
Can you please provide me the UDF to achieve this?
E1EDK02-Qualf--Equals(001 and 002 and 012) createif--targetnode(1)
For second node
E1EDK02-Qualf--Equals(001 and 002) createif--targetnode(2)
For third node
E1EDK02-Qualf--Equals(012) createif--targetnode(3)
But the fixed value mapping has the value 1 for all the keys 001,002,012 and I need to compare the fixed mapping output with the value 1.
Thanks
Hi,
You need to write 3 udf for this, doing mapping is better than writing UDF.
For first node use this code //These 3 are queue type UDF and input parameter is inputStr
int count=0
for(int i=0; i<inputStr.length; i++)
{
if(inputStr<i>.equals(001))
count ++;
if(inputStr<i>.equals(002))
count ++;
if(inputStr<i>.equals(012))
count ++;
}
if(count==3) result.addValue("");
else result.addValue(ResultList.SUPPRESS);
For second node
int count=0
for(int i=0; i<inputStr.length; i++)
{
if((inputStr<i>.equals(001)) && (!(inputStr<i>.equals(012))))
count ++;
if((inputStr<i>.equals(002)) && (!(inputStr<i>.equals(012))))
count ++;
}
if(count==2) result.addValue("");
else result.addValue(ResultList.SUPPRESS);
For third node use 012 value (remove 001 & 002 conditions)
int count=0
for(int i=0; i<inputStr.length; i++)
{
if((inputStr<i>.equals(012)) && (!(inputStr<i>.equals(001))) && (!(inputStr<i>.equals(002))))
count ++;
}
if(count==1) result.addValue("");
else result.addValue(ResultList.SUPPRESS);
Regards,
VR
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.