<?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: Loop or group in Graphical mapping in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596785#M4724217</link>
    <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;harish.mistri&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Thanks for your help. Just one question, why so different mapping for ItemGroup and text fields if they came for fields in the same level of the source file?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jun 2022 08:05:15 GMT</pubDate>
    <dc:creator>novatojorge</dc:creator>
    <dc:date>2022-06-20T08:05:15Z</dc:date>
    <item>
      <title>Loop or group in Graphical mapping</title>
      <link>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaq-p/12596783</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;
  &lt;P&gt;I would like to ask you how can I manage this requeriment with the PI/PO graphical mapping.&lt;/P&gt;
  &lt;P&gt;I receive something like this:&lt;/P&gt;
  &lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;po_number&amp;gt;22&amp;lt;/po_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;line_number&amp;gt; 1 &amp;lt;/line_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;po_number&amp;gt;22&amp;lt;/po_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;line_number&amp;gt; 2 &amp;lt;/line_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;po_number&amp;gt;33&amp;lt;/po_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;line_number&amp;gt; 3 &amp;lt;/line_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;po_number&amp;gt;33&amp;lt;/po_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;line_number&amp;gt; 4 &amp;lt;/line_number&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;
  &lt;P&gt;So several equal lines, where we have a value repeated more than once that indicates the po number ( for example ) and the items of that po,every time the po_number changes I have to create a new entity of the target message&lt;/P&gt;
  &lt;P&gt;&amp;lt;JournalEntryCreateRequest&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;JournalEntry&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;OriginalReferenceDocumentType&amp;gt;22&amp;lt;/&amp;lt;OriginalReferenceDocumentType&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;ItemGroup&amp;gt;1/&amp;lt;ItemGroup&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt;helllo&amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;ItemGroup&amp;gt;2/&amp;lt;ItemGroup&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt;helllo&amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/JournalEntry&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/JournalEntryCreateRequest&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;JournalEntryCreateRequest&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;JournalEntry&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;OriginalReferenceDocumentType&amp;gt;33&amp;lt;/&amp;lt;OriginalReferenceDocumentType&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;ItemGroup&amp;gt;3&amp;lt;/ItemGroup&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt;helllo&amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;ItemGroup&amp;gt;4&amp;lt;/ItemGroup&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;text&amp;gt;helllo&amp;lt;/text&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/JournalEntry&amp;gt;&lt;/P&gt;
  &lt;P&gt;&amp;lt;/JournalEntryCreateRequest&amp;gt;&lt;/P&gt;
  &lt;P&gt;Could you help me?&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Jorge.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 14:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaq-p/12596783</guid>
      <dc:creator>novatojorge</dc:creator>
      <dc:date>2022-06-17T14:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loop or group in Graphical mapping</title>
      <link>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596784#M4724216</link>
      <description>&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;You can achieve this using graphical mapping and node functions. &lt;/P&gt;&lt;P&gt;First - Create JournalEntryCreateRequest for a unique PO number&lt;/P&gt;&lt;P&gt;mapping&lt;/P&gt;&lt;P&gt;PO Number --&amp;gt; Remove context --&amp;gt; Split by value (value change) --&amp;gt; Collapse context --&amp;gt; JournalEntryCreateRequest&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061617-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Second - JournalEntry and OriginalReferenceDocumentType&lt;/P&gt;&lt;P&gt;same mapping with additional split by value (each value)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061618-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Third - item&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061619-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Item Group - Line number&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061620-image.png" /&gt;&lt;/P&gt;&lt;P&gt;text&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061621-image.png" /&gt;&lt;/P&gt;&lt;P&gt;mapping result (text is modified with number at the end)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061622-image.png" /&gt;&lt;/P&gt;&lt;P&gt;hope this will help!!&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 06:27:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596784#M4724216</guid>
      <dc:creator>Harish</dc:creator>
      <dc:date>2022-06-20T06:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop or group in Graphical mapping</title>
      <link>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596785#M4724217</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;harish.mistri&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Thanks for your help. Just one question, why so different mapping for ItemGroup and text fields if they came for fields in the same level of the source file?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 08:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596785#M4724217</guid>
      <dc:creator>novatojorge</dc:creator>
      <dc:date>2022-06-20T08:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loop or group in Graphical mapping</title>
      <link>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596786#M4724218</link>
      <description>&lt;P&gt;Hi guys again.&lt;/P&gt;&lt;P&gt;I would like to ask you again because my requeriment has changed&lt;/P&gt;&lt;P&gt;Now I receive something like this:&lt;/P&gt;&lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;po_number&amp;gt;0000055664&amp;lt;/po_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ref1&amp;gt; N1 &amp;lt;/ref1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;line_number&amp;gt; 1 &amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;po_number&amp;gt;0000055664&amp;lt;/po_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;line_number&amp;gt; 2 &amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;po_number&amp;gt;33&amp;lt;/po_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ref1&amp;gt; N1 &amp;lt;/ref1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;line_number&amp;gt; 1&amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;record&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;po_number&amp;gt;33&amp;lt;/po_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ref1&amp;gt; N &amp;lt;/ref1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;line_number&amp;gt; 2 &amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/record&amp;gt;&lt;/P&gt;&lt;P&gt;And I want to convert it to a header and line strcture like this: &lt;/P&gt;&lt;P&gt;&amp;lt;header&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;Doc_number&amp;gt;0000055664&amp;lt;/Doc_number&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;Doc_type&amp;gt;N1&amp;lt;/Doc_type&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;items&amp;gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;line_number&amp;gt; 1&amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/Items&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;items&amp;gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;line_number&amp;gt; 2&amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;         &amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/Items&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;header&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;Doc_number&amp;gt;0000055665&amp;lt;/Doc_number&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;Doc_type&amp;gt;N1&amp;lt;/Doc_type&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;items&amp;gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;line_number&amp;gt; 1&amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/Items&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;items&amp;gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;       &amp;lt;line_number&amp;gt; 2&amp;lt;/line_number&amp;gt;&lt;/P&gt;&lt;P&gt;         &amp;lt;text&amp;gt; helllo &amp;lt;/text&amp;gt;&lt;/P&gt;&lt;P&gt;      &amp;lt;/Items&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;/header&amp;gt;&lt;/P&gt;&lt;P&gt;So a tipicall structure of header and items message. I have achieved close to everything, doc_number is splitting the header correctly and items are correctly generated, my problem is for example the Doc_type field because it can be repeated in different documents so i cannot do a Spit by value.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    For the header I have done this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094671-image.png" /&gt;&lt;/P&gt;&lt;P&gt;     and works fine because I generate a &amp;lt;header&amp;gt; for each doc_number&lt;/P&gt;&lt;P&gt;     For the doc_numer inside the header i have done this:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094672-image.png" /&gt;&lt;/P&gt;&lt;P&gt;And works fine because the last SplitByValue runs perfect because again the value of each document is different&lt;/P&gt;&lt;P&gt;   But for doc_type field I have done something similar but it doesnt work because the Doc_type could be the same in different document numbers so it is only generating 1 occurrence of doc_type:&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094675-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Here all the doc_type are N1 in both doc_numbers so:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094676-image.png" /&gt;&lt;/P&gt;&lt;P&gt;After the collapse context we have only 1 value&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094677-image.png" /&gt;&lt;/P&gt;&lt;P&gt;and after the SplitbyValue only one too:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2094678-image.png" /&gt;&lt;/P&gt;&lt;P&gt;And I need 2 occurrences, one for each document, If the doc_type of each document would be different it run ok.&lt;/P&gt;&lt;P&gt;Could somebody help me with this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/loop-or-group-in-graphical-mapping/qaa-p/12596786#M4724218</guid>
      <dc:creator>novatojorge</dc:creator>
      <dc:date>2022-09-14T09:25:37Z</dc:date>
    </item>
  </channel>
</rss>

