<?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>topic Re: String Processing with Pipe Separators==&amp;gt;  '|' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637386#M284141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kannan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)The string with pipe separator may get from an internal table.&lt;/P&gt;&lt;P&gt;2)Declare an work area for this internal table.&lt;/P&gt;&lt;P&gt;3) Move this string into work area by spliting at pipe symbol.&lt;/P&gt;&lt;P&gt;4)Now modify the required fields in the structure and concatenate the structre back to a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_STRING contains your original string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA WA_RECORD TYPE ITAB.&lt;/P&gt;&lt;P&gt;DATA ITAB1 TYPE ITAB OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;SPILT V_STRING AT '|' INTO TABLE ITAB1.&lt;/P&gt;&lt;P&gt;READ ITAB1 INDEX 1 INTO WA_RECORD.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD4 = 'NEW VALUE-4'.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD5 = 'NEW VALUE-5'.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD6 = 'NEW VALUE-6'.&lt;/P&gt;&lt;P&gt;CONCATENATE WA_RECORD-F1 .....  WA_RECORD-F15 INTO V_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2006 16:27:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-12T16:27:27Z</dc:date>
    <item>
      <title>String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637381#M284136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement as below. I have a long string to be updated based on the database values. The String: &lt;/P&gt;&lt;P&gt;1|10-1234 |009|||||KE| |HALB|M|051399||IN| ||||PRMS|||||||||||||||||||0001||15||0||||||||0|0|0|||||||||||||||||||||||KE||P ||20060729||||||||||||||00|||||NORM||||||||||||||||||||&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value 051399, 0 , 0 , 0 are to be modified with a values of different size. But the total no of pipe separators to be maintained. I need to update the value between the pipe separator but without affecting the exact location of the pipe separator as the data is processed further based on the '|' separator. Can you please suggest me a good solution for this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Kannan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 15:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637381#M284136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T15:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637382#M284137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;i&amp;gt; need to update the value between the pipe separator but without affecting the exact location of the pipe separator&amp;lt;/i&amp;gt; ..&lt;/P&gt;&lt;P&gt;this is not possible.&lt;/P&gt;&lt;P&gt;if you replace an existing text with some other text of different length, the position of the pipe will obviosly change.&lt;/P&gt;&lt;P&gt;Id the replaced string is smaller than the existing string, then it is possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split v_str at '|'into table itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab with key data = '0156789'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;itab-data = '987666'.&lt;/P&gt;&lt;P&gt;modify itab index sy-tabix.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;concatenate v_str2 itab-data into v_str2 separated by '|'.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravi Kanth Talagana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 15:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637382#M284137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T15:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637383#M284138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Ravi but if not wrong you want is that the number of pipes should not change ...correct ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can try the below logic.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        f1(10),&lt;/P&gt;&lt;P&gt;        f2(10),&lt;/P&gt;&lt;P&gt;....    f50(10),&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split lstr at '|' into table itab.&lt;/P&gt;&lt;P&gt;move lnewf10 to itab-f10.&lt;/P&gt;&lt;P&gt;move lnewf13 to itab-f13.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;concatenate itab-f1 itab-f2.....itab-f50 into lstr&lt;/P&gt;&lt;P&gt;separated by '|'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 16:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637383#M284138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T16:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637384#M284139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi / Anurag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I am sorry!. The position of the Separator '|' will get changed while updating the String but without affecting the number of the '|' Separator. I hope i made my question correct. Please let me know your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Kanan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 16:09:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637384#M284139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T16:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637385#M284140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have already passed our suggestions &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 16:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637385#M284140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T16:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: String Processing with Pipe Separators==&gt;  '|'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637386#M284141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kannan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)The string with pipe separator may get from an internal table.&lt;/P&gt;&lt;P&gt;2)Declare an work area for this internal table.&lt;/P&gt;&lt;P&gt;3) Move this string into work area by spliting at pipe symbol.&lt;/P&gt;&lt;P&gt;4)Now modify the required fields in the structure and concatenate the structre back to a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_STRING contains your original string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA WA_RECORD TYPE ITAB.&lt;/P&gt;&lt;P&gt;DATA ITAB1 TYPE ITAB OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;SPILT V_STRING AT '|' INTO TABLE ITAB1.&lt;/P&gt;&lt;P&gt;READ ITAB1 INDEX 1 INTO WA_RECORD.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD4 = 'NEW VALUE-4'.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD5 = 'NEW VALUE-5'.&lt;/P&gt;&lt;P&gt;WA_RECORD-FIELD6 = 'NEW VALUE-6'.&lt;/P&gt;&lt;P&gt;CONCATENATE WA_RECORD-F1 .....  WA_RECORD-F15 INTO V_STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 16:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/string-processing-with-pipe-separators-gt/m-p/1637386#M284141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-12T16:27:27Z</dc:date>
    </item>
  </channel>
</rss>

