cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with condition IF THEN in Message MApping

Former Member
0 Kudos

Hi,

We are not getting correct ouput when we use condition IF THEN without else in message Mapping .We are sending data from File to XI to R/3.

We are using file adapter and IDOC adapter to create customer in R/3.

In message Mapping we are creating Segment E1KNB1M and E1KNBKM based on condition.

IF THEN Condition used in mapping is as below

find the length of Compnaycode with LENGTH function.Pass that value as one of the parameter to function GREATER.Pass second parameter to function GREATER a constant (0).Pass the result to If without else function.If this is true pass Item to IF THEN function and Map the result to E1KNB1M.

Our mapping is not giving desired output in below scenario:

Source XML

<?xml version="1.0" encoding="utf-8" ?>

<ns:CustomerMaster_Request_MT xmlns:ns="http://mazdausa.com/sapr3/fi/masterdata/customermaster">

<Idoc>

<Header>

<ID>H</ID>

<ACCTGRP>M002</ACCTGRP>

<CUSTNO>R51563</CUSTNO>

<NAME1>WAYNE MAZDA</NAME1>

</Header>

<Item>

<ID>L</ID>

<COMPCODE>US10</COMPCODE>

<BANKKEY>0000326</BANKKEY>

<BANKCNTRY>US</BANKCNTRY>

<BANKACCT>05893</BANKACCT>

</Item>

</Idoc>

- <Idoc>

- <Header>

<ID>H</ID>

<ACCTGRP>M002</ACCTGRP>

<CUSTNO>51563</CUSTNO>

<NAME1>WAYNE MAZDA</NAME1>

</Header>

</Idoc>

- <Idoc>

- <Header>

<ID>H</ID>

<ACCTGRP>M002</ACCTGRP>

<CUSTNO>V51563</CUSTNO>

<NAME1>WAYNE MAZDA</NAME1>

</Header>

- <Item>

<ID>L</ID>

<COMPCODE>US10</COMPCODE>

<BANKKEY>000326</BANKKEY>

<BANKCNTRY>US</BANKCNTRY>

<BANKACCT>0305893</BANKACCT>

</Item>

</Idoc>

</ns:CustomerMaster_Request_MT>

Here 3 Idoc are created under ZDEBMAS06.

First IDOC contain segment E1KNB1M and E1KNBKM as desired because first idoc in Source XML contains Item data.

Second IDOC contain segment E1KNA1M only as desired because second Idoc in Source XML does not contains item data.

Third IDOC does not contain Segment E1KNBKM and E1KNB1M which is not a desired output. It should contain these segments as third idoc in source XML have item data.

But we are getting right output in case we also have Item data under second IDOC in source XML.

Please let me know where I am doing wrong.

Thanks.

Rekha.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

have a look at this weblog:/people/venkat.donela/blog/2005/06/09/introduction-to-queues-in-message-mapping

and check your queues

this way you'll be able to see what's wrong with your mapping

Regards,

michal

Former Member
0 Kudos

Thanks Michal,

But I am getting below message when I am checking the queues in mapping.

Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"

Do you have any idea what is wrong?

Thanks.

Rekha

former_member203627
Participant
0 Kudos

Hi Rekha,

This is Hema, send me mail at hemmehta@yahoo.com.....I have lost your mail id.

Love

Hema (Was in IBM India)

Former Member
0 Kudos

Hi Rekha,

I am getting the same problem while checking display Queue in message mapping??

<i><b>Source code has syntax error: java.lang.NoClassDefFoundError: com/sun/tools/javac/Main Exception in thread "main"</b></i>

Any ideas to solve this problem...

Thanks,

Sekhar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rekha,

Were you able to solve this problem cause i am sort in a similar situation?

Kind Regards,

D