cancel
Showing results for 
Search instead for 
Did you mean: 

mapping issue

Former Member
0 Kudos

Hello,

I have this source segment.

This segment appear with occurrence 0 to 999<E1EDP05 SEGMENT="">

<ALCKZ/>

<KSCHL/>

<KOTXT/>

<BETRG/>

<KPERC/>

<KRATE/>

<UPRBS/>

<MEAUN/>

<KOBTR/>

<MENGE/>

<PREIS/>

<MWSKZ/>

<MSATZ/>

<KOEIN/>

<CURTP/>

<KOBAS/>

</E1EDP05>

I need to map all the fields to the same segment in target but only if the field <KOTXT> in the source is "Item net price".

In all source message has only one segment with the value "item net price"

This segment appear with occurrence 1 to 1<E1EDP05 SEGMENT="">

<ALCKZ/>

<KSCHL/>

<KOTXT/>

<BETRG/>

<KPERC/>

<KRATE/>

<UPRBS/>

<MEAUN/>

<KOBTR/>

<MENGE/>

<PREIS/>

<MWSKZ/>

<MSATZ/>

<KOEIN/>

<CURTP/>

<KOBAS/>

</E1EDP05>

Elad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Elad:

Try this:

For Parent node:


  <KOTXT> -> RemoveContext---->
                                  equalsS -> If-Then --> E1EDP05
  Constant ("Item net price")->                 /
                                               /
                                        <KOTXT> 

For child node, e.g. <ALCKZ>


  <KOTXT> -> RemoveContext---->
                                  equalsS -> If-Then --> SplitByValue[ValueChange]-><ALCKZ>
  Constant ("Item net price")->                 /
                                               /
                                        <ALCKZ> 

Regards.

Liang

Former Member
0 Kudos

Hello Liang

Thank you for you answers (I think we are in the good way).

The result of your mapping is:

<E1EDP01 SEGMENT="">

<E1EDP05 SEGMENT="">(with all the sons, the true one)

<E1EDP05 SEGMENT="">( with all the sons, true but from the next E1EDP01)

<E1EDP01 SEGMENT="">

<E1EDP05 SEGMENT="">(only the name without any constant)

Thank you again

Elad

Former Member
0 Kudos

Hi, Elad:

I have a question for you: what are list of sub-elements for segment "E1EDP01"

In other word, does E1EDP01 also contain same elements that are under E1EDP05 ?

Sorry, E1EDP01 is the parent node of the E1EDP05. Just noticed, in this case, context handling is also needed for E1EDP05:

Rather than using "RemoveContext" Just right click on <KOTXT>, rise context to one level up to:E1EDP01, take out the "RemoveContext", same for the child node mapping.

Regards.

Liang

Edited by: Liang Ji on Mar 24, 2009 4:28 PM

Former Member
0 Kudos

Hello,

What are you mean with "context handling is also needed for E1EDP05"

Thank you

Elad

Former Member
0 Kudos

Hi, Elad:

Do not use "RemoveContext" function anymore, just partially remove context, in your way, rise the context level to E1EDP01:

For Parent node:


  <KOTXT> (raise Context level to E1EDP01)---->
                                                  equalsS -> If-Then --> E1EDP05
  Constant ("Item net price")----------------->                 /
                                                               /
                                        <KOTXT> (raise Context level to E1EDP01)

For child node, e.g. <ALCKZ>


  <KOTXT>(raise Context level to E1EDP01)---->
                                                equalsS -> If-Then --> SplitByValue[ValueChange]-><ALCKZ>
  Constant ("Item net price")---------------->                 /
                                                              /
                                       <ALCKZ>(raise Context level to E1EDP01) 

Regards.

Liang

Former Member
0 Kudos

Now is look like that:

<E1EDP01 SEGMENT="">

<E1EDP05 SEGMENT="">(without any sons)

<E1EDP01 SEGMENT="">

<E1EDP05 SEGMENT="">(without any sons)

Answers (2)

Answers (2)

SudhirT
Active Contributor
0 Kudos

Hi,

try like this,

kotxt-equals-constant(item net)ifwithoutelse-then kotxt-target parent segment with multi occurence.

thanks.

Former Member
0 Kudos

Hello,

I continue with this issue,

I'll try this 2 recommendation without succeed.

If I map the parent segment E1EDP05 with "if without else" I received the error:

Cannot produce target element /Invoice_MT/Customer/Invoice_Rec_DT/E1EDP01/E1EDP05. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

If I map with "if without else" all the sons I received 5 times the parent segment.

Elad

Former Member
0 Kudos

Hello,

change the context for your source node while mapping and use If without else

Regards,

sreenivas.

Former Member
0 Kudos

Hello,

Thank you for your answer,

I'm not really understand what are you meaning.

Elad

Former Member
0 Kudos

Hi,

just put a 'if-without else' condition to each field you have to map with the condition KTOXT = 'item...'

It will map the right values.

Regards,

Jamal