on 04-29-2008 2:34 PM
hai friends
iam doing fail to idoc scinario in that
iam sending file form dmd system to R3 system
idoc type is MATMAS03.
inthat
E!MARCM segmaet is repeting number of times
and
inside the E1MARCM segment
E1MARDM segment also repeting number of times depending on LGORT field.
the LGORT field can have multiple values separeted by ,(cama).
i was writen UDF for splitting
it working for only one segment .
when E1Marcm segment is repeted then that function is not working
pls helpme on this .
with regards
srikanth vipparla
hai friends
iam tryed with all options ur sugesteted.
but iam not able to create multiple e1marcm segments with split functionality
if i remove split functionality them it is creating multiple segments.
pls help me
with regards
srikanth vipparla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai friend for the same senario iam trying to concatinate the strings in sude the segemnt ine element is repeting many times
now iam tying to concatinate but in the out put iam getting only first string only
my code is like this
String q = s;
for(int i=1;i<a.length;i++)
{
s= s + "," + a<i>;
}
result.addValue(q);
pls can u help on this
with regards
srikanth vipparla
try if this UDF helps
String [ ] StrArray = LGORT.split(",") --- pass LGORT to this UDF
int len1 = LGORT.length;
for ( i=0;i<len1;i++) {
result.addValue(StrArray<i>);
}
you might have to use SplitByValue depending on your target structure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
iam writen code like this
it is working fine for one sgment
but it is not working when E1MARCM is repeted.
for(int y=0;y<a.length;y++)
{
StringTokenizer st = new StringTokenizer(a[y],", ");
while(st.hasMoreTokens())
{
result.addValue( st.nextToken());
}
}
and my mapping is like this in the maping program
for eliment.
if->lgort is true> then--> split(UDF)-->split by value--->lgort.
and for seg ment.
if->lgort is true> then--> split(UDF)---->E1MARDM.
it is working for segment .
but it is not working for next time when the E1MARCM is repeted.
E1MARDM is sub segment in E!MARCM.
pls help me .
with regards
srikanth vipparla
Edited by: srikanth vipparla on Apr 29, 2008 4:51 PM
Hi Srikanth,
In the UDF properties there will be three options, Value,Context or Queue. As you are using Result.addValue in the code...I am assuming that you are either using Conext or Queue.
Try by making the change from Context to Queue, and check the vice-versa also.
Still if it does not work ...try chaning the context of the Source field(by right click on the source filed) thats been mapped as input to the UDF.
All the best.
Regards,
Gopinath M.
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.