Skip to Content
avatar image
Former Member

two source fields in one target idoc structure

Hi Experts!

I have a problem.

I have a flat file with two fields desc1 and desc2. They have to be put into the field MAKTX of the table structure E1MAKTM. But not via concat or useOneAsMandy!

I need a new E1MAKTM structure for each desc1 and desc2 . So that i get following target structure:

<recordset>
.
.
.
-E1MAKTM
  - MAKTX = "content of desc1"
-E1MAKTM
  - MAKTX = "content of desc2"
.
.
.
</recordset>

I hope you understand what I am trying to do.

How can i solve this problem?

Thanks for your answers in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 04, 2008 at 02:05 PM

    Hi,

    right click on MAKTX and select duplicate subtree then you can map your two source values.

    Regards

    Patrick

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 02:17 PM

    Hi,

    Even though the occurrences are 1:1. Once u press duplicate subtree, it automatically becames 0:1.

    Interesting one, try it!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2008 at 06:23 AM

    Hi Thanks so far for your answers.

    Is there a possibility to dynamically duplicate the structures?

    So that i get automatically a duplicated target structure for each content filled source field?

    regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      >>Is there a possibility to dynamically duplicate the structures?

      >>So that i get automatically a duplicated target structure for each content filled source field?

      The solution that has give above would only do this.

      Even though you are duplicating the segement in the design time, you are mapping the desc1 and desc2 to the E1MAKTM root node(for MAKTX).

      During the runtime the node E1MAKTM will only be generated based on the number of occurance of the desc1 and desc2 in the source message.

      For example if there are 2 desc1 and 1 desc2 field then 3 E1MAKTM node will be generated.

      But make sure that the occurance of E1MAKTM is 0 to unbounded to achieve this.

      Thanks

      SaNv...

  • Sep 04, 2008 at 02:10 PM

    Hi,

    1. Check if the occurance of E1MAKTM is unbounded. If not change the occurance.

    2. Right click on the field and dupicate it.

    3. Map the field desc1 and desc2 to both E1MAKTM and MAKTX.

    Thanks

    SaNv..

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 08, 2008 at 06:29 AM

    Hi Udo,

    For dynamic creation of the node you can write one Udf taking desc1 and desc2 as the input and repeating the target segment E1MAKTM as many times these value repeats also chk the occurence of E1MAKTM.

    Thanks!

    Sudhir

    Edited by: sudhir tiwari on Sep 8, 2008 8:34 AM

    Add comment
    10|10000 characters needed characters exceeded