cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem...

Former Member
0 Kudos

Hi all,

Facing some mapping problem.

Condition:

If E1EDT43-POSNR = E1EDL24-POSNR and

E1EDT43-VBELN = E1EDL20-VBELN

then pass E1EDL24-VFDAT.

Context levels:

Idoc

--E1EDT20

---E1EDT37

-


E1EDT43-POSNR

Idoc

--E1EDT20

---E1EDL20

-


E1EDL24-POSNR

for first POSNR.. we are getting two values (900 and 901)

for second POSNR..we are getting four values (100,200,900,901)

We are comparing both POSNR values and we need to pass only the matched values.

here i need to pass 900 & 901 values only.

1. I tried by keeping both POSNR at context E1EDT20 .

2. Which equal sign I need to use?

Need help for this..Waiting for responses.

Thanks

Deepthi.

<Moderator note: Subject edited. Please use a meaningful subject and do not use 'Urgent'. See the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further info.>

Edited by: Mike Pokraka on Jul 25, 2008 8:48 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I will prefer you to go for advanced UDF in this case with cache parameter as Queue.

Here

E1EDT43-POSNR -


> a ___TestUDF___>>>> Target field

E1EDL24-POSNR -


> b

E1EDL24-VFDAT -


> c

Now as here you need to check for E1EDT43-VBELN = E1EDL20-VBELN

pass these values also to UDF

E1EDT43-VBELN -


> d

E1EDL20-VBELN -


> e

and add the condition in above code as

Try below code

try{

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

{

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

{

if(a<i>.equals(b[j]))

{

//// for E1EDT43-VBELN = E1EDL20-VBELN add condition here

if(d<i>.equals(e[j]))

{

result.addValue(c[j]);

result.addContextChange();

}

}

}

}

I hope this will give you the hint

Thanks

Swarup

Former Member
0 Kudos

Hi Swarup,

How many inputs I need to declare??

5 inputs?? (a,b,c,d,e)

Former Member
0 Kudos

Hi Swarup,

I am getting following error.

RuntimeException in Message-Mapping transformation: Exception:[java.lang.ArrayIndexOutOfBoundsException: Array index out of range:

out of range: 4] in class com.sap.xi.tf._MM_SHPMNT_TO_RECEIPTSmethod Condition$[com.sap.aii.mappingtool.tf3.CBufIter@41944194, com.sap.aii.mappingtool.tf3.CBufIter@42094209, com.sap.aii.mappingtool.tf3.CBufIter@427e427e, com.sap.aii.mappingtool.tf3.CBufIter@43034303, com.sap.aii.mappingtool.tf3.CBufIter@43784378

What might be the problem?

Thanks

Deepthi

Answers (0)