Skip to Content
Former Member
Aug 09, 2007 at 10:35 AM

problem in message mapping


Hi experts

I am doing an idoc to file scenario whose idoc structre is given below

EIMARM(parent segment)


EIMARMM(child segment)


EIVKEMM(child segmnet)


i have to generate datarecord for each VKORJ in E2MVKEM :If EAN11 is present in E2MARAM and if EAN11 is present in E2MARMM.

for ex:. if EIMVKEM segment come twice and EIMARMM SEGMENT 4 time then total 8 data records to be created.The E1MARM SEGMENT (first one) is the parent segment and it will come only once.

To achive this i used one if codition and one udf as follow

EAN1 [context change to upper level]....>exists ->ifWithoutElse

then take E1MARMM as one input to the UDF

and E!VKEM other input to the UDF

output of udf is mapped to the target

the udf is :Logic:for(int i=0; i<EIMVKEM.length; I++)


if( EIMVKEM.equals(ResultList.CC)) continue;

for(int j=0; j>< EIMARMM.length; j++)


if( EIMVKEM.equals(ResultList.CC)) continue;

result.addValue{“ “);



Its generating 8 data record for 6 E1MARMM (two E1MARMM not satisfying if condition so only 4 EIMARMM is going as input)and 2 EIVKEM but while taking value its taking value of those EIMARMM SEGMENT which doesnot satisfy that if condition also.i tried to change context or use some node function but didn't got the desired result.

Plz help me as its uregent I have tried my best to describe the situation but if u have any doubt also then plz ask and guide me to achieve the desired result