<?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: CPI: SubString Function Issue while mapping target field in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176329#M4553604</link>
    <description>&lt;P&gt;Hello Pacan, &lt;/P&gt;&lt;P&gt;If above solutions are not working then write a custom function ro handle both cases(it would be tiny and could be easily written) . Will keep a note on this query and get back to you in case any difference in CPI function  behavior compared to SAP PI/PO.&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Sriprasad shivaram Bhat&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 18:16:15 GMT</pubDate>
    <dc:creator>Sriprasadsbhat</dc:creator>
    <dc:date>2020-06-22T18:16:15Z</dc:date>
    <item>
      <title>CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaq-p/12176322</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I working on a mapping where I need to restrict the char length of the source field.&lt;/P&gt;
  &lt;P&gt;If the character length is less than the character count defined in the substring function, the mapping fails with String out of index&lt;/P&gt;
  &lt;P&gt;The same mapping workings in PI. But it failed in CPI.&lt;/P&gt;
  &lt;P&gt;Is it a normal behavior or I am doing wrong with my mapping or any other ways to achieve this simple mapping in CPI?&lt;/P&gt;
  &lt;P&gt;Any pointers would be of great help.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1819612-substring.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1819613-substring-error.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 15:57:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaq-p/12176322</guid>
      <dc:creator>babruvahana</dc:creator>
      <dc:date>2020-06-22T15:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176323#M4553598</link>
      <description>&lt;P&gt;Is the normal behaviour&lt;/P&gt;&lt;P&gt;Concatenate after string some blank values and then use trim function&lt;/P&gt;&lt;P&gt;If node doesn't exist force with standard function mapwithdefault&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 16:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176323#M4553598</guid>
      <dc:creator>jorgeh</dc:creator>
      <dc:date>2020-06-22T16:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176324#M4553599</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;jorgehnga&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response. &lt;/P&gt;&lt;P&gt;I did the following change, but still, it is failing with the same error. Do I need to change anything else?&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1819615-substring-trim.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 16:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176324#M4553599</guid>
      <dc:creator>babruvahana</dc:creator>
      <dc:date>2020-06-22T16:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176325#M4553600</link>
      <description>&lt;P&gt;Add the trim function after substring not before&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 17:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176325#M4553600</guid>
      <dc:creator>jorgeh</dc:creator>
      <dc:date>2020-06-22T17:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176326#M4553601</link>
      <description>&lt;P&gt;I did the changes, but no luck. Mapping still fails when the character length is less than the character count defined in the substring function.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 17:42:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176326#M4553601</guid>
      <dc:creator>babruvahana</dc:creator>
      <dc:date>2020-06-22T17:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176327#M4553602</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;babruvahana&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Use function if&lt;B&gt;S&lt;/B&gt; instead of function if.&lt;/P&gt;&lt;P&gt;Function 'if' evaluates all expressions before assigning the value. Function 'ifS' evaluates the condition first and then evaluates the required expression.&lt;/P&gt;&lt;P&gt;You are getting the error because when length is less than 30 the expression substring is evaluated anyhow.&lt;/P&gt;&lt;P&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/1090369"&gt;SAP Note 1090369&lt;/A&gt; explains the difference. In your PI system, the note might not have been applied, therefore it worked.&lt;/P&gt;&lt;P&gt;In general, always use if&lt;STRONG&gt;S&lt;/STRONG&gt; and if&lt;STRONG&gt;S&lt;/STRONG&gt;WithoutElse instead of if and ifWithoutElse.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 17:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176327#M4553602</guid>
      <dc:creator>bhalchandrasw</dc:creator>
      <dc:date>2020-06-22T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176328#M4553603</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;babruvahana&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Is the IF (or IF$) even required here? Same goes for LENGTH.&lt;/P&gt;&lt;P&gt;Can't you CONCAT 30 spaces at the end of the input string, then take the first 30 characters of the resulting string with SUBSTRING and then TRIM the result of SUBSTRING?&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Mon, 22 Jun 2020 18:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176328#M4553603</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-06-22T18:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176329#M4553604</link>
      <description>&lt;P&gt;Hello Pacan, &lt;/P&gt;&lt;P&gt;If above solutions are not working then write a custom function ro handle both cases(it would be tiny and could be easily written) . Will keep a note on this query and get back to you in case any difference in CPI function  behavior compared to SAP PI/PO.&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Sriprasad shivaram Bhat&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 18:16:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176329#M4553604</guid>
      <dc:creator>Sriprasadsbhat</dc:creator>
      <dc:date>2020-06-22T18:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176330#M4553605</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;jorgehnga&lt;/SPAN&gt; , &lt;SPAN class="mention-scrubbed"&gt;bhalchandra.wadekar&lt;/SPAN&gt;, &lt;SPAN class="mention-scrubbed"&gt;mateuszadamus&lt;/SPAN&gt;, &lt;SPAN class="mention-scrubbed"&gt;sriprasadshivaramabhat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The issue has been resolved by : con-cat{empty space} - substring - trim - if&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Before writing a custom function I just deployed and ran the iFlow, it worked. &lt;/P&gt;&lt;P&gt;Display Queue failed when the character length is less than the character count defined in the substring function.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;The issue seems to be with the Display queue rather than the SUBSTRING function. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan G&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 09:36:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176330#M4553605</guid>
      <dc:creator>babruvahana</dc:creator>
      <dc:date>2020-06-24T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: CPI: SubString Function Issue while mapping target field</title>
      <link>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176331#M4553606</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Somehow it is working fine for me, can find the below screen show which is working fine for me. &lt;/P&gt;&lt;P&gt;May be you can provide your input to check .&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 17:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cpi-substring-function-issue-while-mapping-target-field/qaa-p/12176331#M4553606</guid>
      <dc:creator>former_member666312</dc:creator>
      <dc:date>2020-06-24T17:43:06Z</dc:date>
    </item>
  </channel>
</rss>

