cancel
Showing results for 
Search instead for 
Did you mean: 

conctnating field in a segment

Former Member
0 Kudos

hai friends

iam facing a big problem

iam configuring idoc to file configuration

idoc id matmas

in this under the E1MARCM segment iam added one

zsegemnt(ZEQMAT) in this ART field is repeting many times

depending on ART field multiple ZEQMAT will be creating

what iam doing is

while sending to file i need to club all these segments in to one ZEQMART under the E1MARCM.

i writen one UDF .

in that what happening is it is concatinating all the ART values irrespective of E1MARCM.(means second E1MARCM values(ART)allso comming into one ART.

plese helpme what can i do

iam using SP11.

please help me

with regradrs

srikanth vipparla.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

iam using fllowing code to identify the segemnts

it is working but only first segment art value is comming .

pls tell me where is the problem in my code

Vector v = new Vector();

String temp="";

for( int i = 0; i < a.length ; i++){

if(!v.contains(a<i>))

v.add(a<i>);

}

for (int i=0;i<v.size();i++){

temp="";

String s = (String)v.get(i);

for(int j= 0;j<a.length;j++){

if(s.equals(a[j]))

temp+=b[j];

//j++;

}

result.addValue(temp);

//i++;

}

with regards

srikanth vipparla

Edited by: srikanth vipparla on May 30, 2008 8:50 AM

ranjit_deshmukh
Active Participant
0 Kudos

Hi,

make use of FormatByExample and format your ART input according to E1MARCM

if you so so your input to udf will be something like:

ResultList.CC

123

456

789

ResultList.CC

123

456

789

ResultList.CC

or while putting the value in the resultList format it according to ur req.

Ranjit

GabrielSagaya
Active Contributor
0 Kudos

ART->myudf>TargetField

you can opt advanced UDF by selecting context

function myudf(String a[],ResultList result, Container container)

{

String res="";

for (int i=0;i<a.length;i++)

res=res+a[<i>];

result.addValues(res);

}

Former Member
0 Kudos

by using ur function it is concatinating all the ART fields in the file

if the E1MARCM is chenged then it should concatiante sapretly

can u help me on this

with regars

srikanthvipparla

Former Member
0 Kudos

Hi srikanth,

when you are doing the mapping ART>udf>Target, just change the context of ART to E1MARCM.

now use that udf in Cache mode context.

--Sankar Choudhury

Former Member
0 Kudos

you mean that inder E1MARCM i have ZEQMAT segment in side this i have this ART field.

for this if i put context as u are mentioned i am not getting any out put.

plese help me.

wicth udf can i use ?

means

i writen one udf that one or else one of the friend is sujested one udf that one .

pls help me .

with regards

srikanth vipparla