<?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 Splitting source record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956923#M1337035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not ABAP specilaist, I am trying to split source records(field xyz) to two fields (feild 1: xyz1, Field 2: xyz2) in target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically source data filed will have values starting with J and Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: J001,Z010 etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the transformation i want to split record based on the first character, for example if first character of source fields is J result will be J001 otherwise blank. if first character of source fields is Z result will be Z001 otherwise blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Aug 2009 17:15:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-11T17:15:30Z</dc:date>
    <item>
      <title>Splitting source record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956923#M1337035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not ABAP specilaist, I am trying to split source records(field xyz) to two fields (feild 1: xyz1, Field 2: xyz2) in target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically source data filed will have values starting with J and Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: J001,Z010 etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the transformation i want to split record based on the first character, for example if first character of source fields is J result will be J001 otherwise blank. if first character of source fields is Z result will be Z001 otherwise blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 17:15:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956923#M1337035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T17:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting source record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956924#M1337036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at the internal table where you have data into a work area.&lt;/P&gt;&lt;P&gt;  if workarea-fieldname+0(1) = 'J'.&lt;/P&gt;&lt;P&gt;        wa2-field1 = 'J001'.&lt;/P&gt;&lt;P&gt;   elseif workarea-fieldname+0(1) = 'Z'.&lt;/P&gt;&lt;P&gt;        wa2-field1 = 'Z010'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    append wa into itab2.&lt;/P&gt;&lt;P&gt;    clear wa.&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;let me know if you have any doubts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 17:57:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956924#M1337036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-11T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting source record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956925#M1337037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another solution might look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT lt_itab INTO ls_record.
  CASE ls_record-field+0(1).
    WHEN 'J'.
      ls_record-field = 'J001'.

    WHEN 'Z'.
      ls_record-field = 'Z100'.

    WHEN others.
      ls_record-field = space.
    ENDCASE.

  APPEND ls_record TO lt_itab2.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 18:07:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956925#M1337037</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-08-11T18:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting source record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956926#M1337038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was split the records using your code, But the date is appearing as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field A Field B Field C&lt;/P&gt;&lt;P&gt;J001                 £ 100&lt;/P&gt;&lt;P&gt;             Z001   £ 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the data to be appeared in as single record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reddy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 08:15:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-source-record/m-p/5956926#M1337038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-13T08:15:08Z</dc:date>
    </item>
  </channel>
</rss>

