cancel
Showing results for 
Search instead for 
Did you mean: 

Repeated Target Field

Former Member
0 Kudos

Hi all,

My scenario is IDOC to FILE(Article Master).

I have used a user defined segment for different characteristics. So i had mapped the same field of IDoc to 7 fields in taget structure.

I gave a condition in MM that if the field value exists it should get value in target or else it shold be "null". So when i checked the scenario the target fields which are mapped to the User-defined Idoc segment field are repeating.I used IF-ELSE condition for this.

*

Source Structure----


Target Structure

S1----


T1

- field1----


field1

- field2----


field2

- field3----


field3

- field4----


field4

S2

-XXXXX----


ABC

-


DEF

-


GHI

-LLLLL

*

HERE XXXXX is mapped to ABC,DEF. IF value exists in XXXX then it should get value from LLLLL Else it should be filled with <NULL>.

But the final target is like following:

field1 field2 field3 field4 ABC ABC ABC DEF DEF DEF GHI GHI GHI

-


thanks in advance.

Edited by: G SHANTHI on Aug 18, 2008 1:11 PM

Edited by: G SHANTHI on Aug 18, 2008 1:19 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi SHANTHi,

Could you please tell us the occurance of the segment XXX in the Idoc structure , and how many times the XXX segment occurs in the test IDoc instance of your example?

If it's occuring more than once and you are mapping the target segment ABC/DEF/GHI with XXX directly (even using if-else condition)............the output queue will have all the occurances of XXX and cause each of ABC,DEF,GHI to repeat that many time, even if the condition is false it will repeat with "NULL".

Can you give the Conditionla mapping logic for any of the target segment/field ABC/DEF/GHI?

Regards,

Suddha

Former Member
0 Kudos

Hi Guha,

The occurrence of the field XXXXX and LLLLL is 0 to 1. The target fields are repeating Three times each.

ie ABC ABC ABC DEF DEF DEF GHI GHI GHI

And the logic for this field is:

1. The XXXXX and Constant(ZXXX) equals then (IF-THEN-ELSE condition) the value LLLLL will fill target and to alse condition the constant(<NULL>) is mapped. then the output of IF-THEN-ELSE is mapped to ABC.

Thanks in advance.

Edited by: G SHANTHI on Aug 18, 2008 2:13 PM

Former Member
0 Kudos

Hi,

I Forgot u have else condition as well so use the ifthen else.

U have used constant with space value.

I dont think u will get any problem with that.

chirag

Former Member
0 Kudos

HI,

It was repeating three times in target structure.

My problem was not solved.

Give the condition i have to specify.

Former Member
0 Kudos

Hi shanthi,

Create a target field ABC,DEF,GHI for 0-Unbounded .

1.Right click the ABC ,DEF,GHI and duplicate the fields 3 times.

2. XXXXX>EqulesS>Constand(XXXX) >IF(Then)>Null--->Else -->LLLL.

Regards,

Prakasu

Former Member
0 Kudos

Hi,.

Try this

1) Input-XXXXX and constant with null value

2) Pass this to Equals function. output will be true or false.

3) Output of equals give it to Not function.

4) Output of not function give it to If without else.

5) use the LLLLL and give it to then.

6) Output of ifwithout else give it to Tareget.

chirag

Former Member
0 Kudos

HI chirag,

I tried with your mapping,. But it is not working.

If there i no value in XXXXX then the target field should be filled with "<NULL>'' else with Value of LLLL. This is my requirement.