Skip to Content
author's profile photo Former Member
Former Member

Problem with condition IF THEN in Message MApping

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" ?>

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 24, 2005 at 10:43 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2008 at 02:02 PM

    Hi Rekha,

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

    Kind Regards,

    D

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.