cancel
Showing results for 
Search instead for 
Did you mean: 

mapping error

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

henrique_pinto
Active Contributor
0 Kudos

answered in the other topic.

Please avoid creating duplicated topics for the same issue.

Regards,

Henrique.

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

hoe to change the context to queue.

pls tel me

with regards

srikant vipparla

Former Member
0 Kudos

Hi

Here we should change the context, so select the type as context when you are creating the UDF, then your problem will solve.

Former Member
0 Kudos

Hi Srikanth,

When you try to open the UDF window in Graphical mapping, Click the chang icon and choose the radio button Context. and then save the UDF and execute the mapping.

Regards,

Gopinath M.

Former Member
0 Kudos

iam using xi3.0 vertion

in that no redio buttons in udf functions.