on 04-29-2008 8:56 AM
ahi friends
iam doing fail to idoc secinario in that
iam using split function(UDF) for splitting.
it is working good
my problem is
iam using MATMAS03 .
in that
E1MACM segment is repeting multiple times .
in E1MARCM segment i have 1 z segment ane some standard segments.
when E1MARCM segment is repeted then in that first segemnt is getting all the values (eleiments and segments).
but from next segment onwords
E1MARCM sement is comming with eliments
but iam not getting the segments.
pls help me on this .
with regards
srikanth vipparla.
Hi Srikanth
Apply Same logic at sub_seg Node also so that it will create that many nodes as e3 field and you would be able to see the sub_seg for nex seg . If yet not cleare Please revert back .
Reward points if Helpful
Thanks
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please Mapp the Segments which is after E1MARCM segment with the Source Segments of same Occurence Value.
Ex: 0.....1 -
Mapp to 0.....1
0....Unbounded to 0.....unbounded
I think in Your target IDOC structure you have the Segments with 0....1 occurence after E1MARCM segment .
So mapp those Target segments which is having 0..1 with the segment which is present in Source structure with 0...1 Occurence.
Regards
Seshagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think there is a context problem in your mapping. Check the queue output just before the target node, if all are in one context then again use the splitByValue function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for replay
iam alredy check this .
i will explain with example.
source:
<seg>
<e1>test</e1>
<e2>test</e2>
<sub_seg>
<e3>te,tt,yy,tu<e3>
<e4>tr<e4>
</sub_seg>
<seg>
<seg>
<e1>test</e1>
<e2>test</e2>
<sub_seg>
<e3>r1,r2,r3,r4u<e3>
<e4>tr<e4>
</sub_seg>
<seg>
target:
<seg>
<e1>test</e1>
<e2>test</e2>
<sub_seg>
<e3>te<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>tt<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>yy<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>tu<e3>
<e4>tr<e4>
</sub_seg>
<seg>
<seg>
<e1>test</e1>
<e2>test</e2>
<sub_seg>
<e3>r1<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>r2<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>r3,<e3>
<e4>tr<e4>
</sub_seg>
<seg>
like this i need ouput
but iam getting like this
<seg>
<e1>test</e1>
<e2>test</e2>
<sub_seg>
<e3>tt,<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>ty,<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>yy<e3>
<e4>tr<e4>
</sub_seg>
<sub_seg>
<e3>tu<e3>
<e4>tr<e4>
</sub_seg>
</seg>
<seg>
<e1>test<e1>
<e2>test<e2>
</seg>but i need sub eliments also inthat segment.
pls help to me
with regards
sriokanth vipparla
<seg>
Edited by: srikanth vipparla on Apr 29, 2008 10:48 AM
when i try with point to point mapping it is working
but when i included the UDF it is not working
iam using this code at udf
String[] result1=a[0].split(",");
for (int x=0; x<result1.length; x++)
result.addValue(result1[x]);
i think
when E1MARCM segment s repeting a[0]
also inkrimeted a[1].
if is correct then
tell me how to increment the a value
pls help me
with regards
srikanth vipparla.
Hi,
when E1MARCM segment s repeting a[0]
also inkrimeted a[1].
if is correct then
tell me how to increment the a value
Yes you are right for multiple occurance of a you have to increment 0 to 1, you can do this in following way.
for (int y=0; y<a.length; y++)
{
String[] result1=a[y].split(",");
for (int x=0; x<result1.length; x++)
result.addValue(result1[x]);
}
After UDF you have to use SplitByValue before map to target field.
I think this will solve your problem.
Regards,
Rohit
Reward points if helpful.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.