<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Dynamically create target xml nodes based on the source fields in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742743#M4782785</link>
    <description>&lt;P&gt;The source structure is actually a csv file, with the first line the name of the fields (so name1, name2,...) fields and the second line are the values (value1, value2,...), the place and the number of the values can vary everytime.&lt;/P&gt;&lt;P&gt;So I would like to create the target fields dynamically, I made them now manually. So Im wondering if this is also possible dynamically and how to achieve that.&lt;/P&gt;&lt;P&gt;If you have an idea please let me know.&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 08:58:41 GMT</pubDate>
    <dc:creator>pi_consultant1</dc:creator>
    <dc:date>2023-10-19T08:58:41Z</dc:date>
    <item>
      <title>Dynamically create target xml nodes based on the source fields</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaq-p/12742741</link>
      <description>&lt;P&gt;HI Experts,&lt;/P&gt;
  &lt;P&gt;I have the following Source structure:&lt;/P&gt;
  &lt;P&gt;The Fields can be more than 5&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2215978-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Ive to create the following target structure:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2215980-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Can you advise how to dynamically create target XML nodes based on the source xml fields, starting from name4/value4?&lt;/P&gt;
  &lt;P&gt;Thank you in advance,&lt;/P&gt;
  &lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 06:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaq-p/12742741</guid>
      <dc:creator>pi_consultant1</dc:creator>
      <dc:date>2023-10-18T06:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create target xml nodes based on the source fields</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742742#M4782784</link>
      <description>&lt;P&gt;Is the input structure dynamic? From your example it doesn't looks 
like it so you can simply map it manually. For 
each new name/Value create new &lt;EM&gt;Test &lt;/EM&gt;instance on receiver side and map 
corresponding source &lt;EM&gt;Field &lt;/EM&gt;to &lt;EM&gt;Limscode&lt;/EM&gt;/&lt;EM&gt;Value. &lt;/EM&gt;To choose name use 
CopyValue(1) and for value use CopyValue(2) - both with context changed to &lt;EM&gt;Tests &lt;/EM&gt;level.&lt;/P&gt;&lt;P&gt;So something like:&lt;/P&gt;&lt;P&gt;Test(1)&lt;BR /&gt;Field4 (context Tests) ---&amp;gt; CopyValue(1) ---&amp;gt; Limscode&lt;BR /&gt;Field4 (context Tests) ---&amp;gt; CopyValue(2) ---&amp;gt; Value&lt;BR /&gt;&lt;BR /&gt;Test(2)&lt;BR /&gt;Field5 (context Tests) ---&amp;gt; CopyValue(1) ---&amp;gt; Limscode&lt;BR /&gt;Field5 (context Tests) ---&amp;gt; CopyValue(2) ---&amp;gt; Value&lt;BR /&gt;&lt;BR /&gt;Test(x) - add as many as you need for the input structure&lt;BR /&gt;Field(x+3)(context Tests) ---&amp;gt; CopyValue(1) ---&amp;gt; Limscode&lt;BR /&gt;Field(x+3) (context Tests) ---&amp;gt; CopyValue(2) ---&amp;gt; Value&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 19:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742742#M4782784</guid>
      <dc:creator>fprokopiuk</dc:creator>
      <dc:date>2023-10-18T19:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create target xml nodes based on the source fields</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742743#M4782785</link>
      <description>&lt;P&gt;The source structure is actually a csv file, with the first line the name of the fields (so name1, name2,...) fields and the second line are the values (value1, value2,...), the place and the number of the values can vary everytime.&lt;/P&gt;&lt;P&gt;So I would like to create the target fields dynamically, I made them now manually. So Im wondering if this is also possible dynamically and how to achieve that.&lt;/P&gt;&lt;P&gt;If you have an idea please let me know.&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 08:58:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742743#M4782785</guid>
      <dc:creator>pi_consultant1</dc:creator>
      <dc:date>2023-10-19T08:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically create target xml nodes based on the source fields</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742744#M4782786</link>
      <description>&lt;P&gt;OK understood, you can then try to follow this blog: &lt;A href="https://blogs.sap.com/2012/11/05/message-mapping-play-around-with-target-structure/" target="_blank"&gt;Message Mapping : Play around with target structure&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 22:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamically-create-target-xml-nodes-based-on-the-source-fields/qaa-p/12742744#M4782786</guid>
      <dc:creator>fprokopiuk</dc:creator>
      <dc:date>2023-10-19T22:33:05Z</dc:date>
    </item>
  </channel>
</rss>

