<?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: Split data into header and line items.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224316#M1009243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mayank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood it correctly do you want to arrange the rows in the internal table like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header record 1st row&lt;/P&gt;&lt;P&gt;Item record     2nd row&lt;/P&gt;&lt;P&gt;Item record     3rd row&lt;/P&gt;&lt;P&gt;Item record     4th row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header record  5th row&lt;/P&gt;&lt;P&gt;Item record      6th row&lt;/P&gt;&lt;P&gt;Item record      7th row&lt;/P&gt;&lt;P&gt;Item record      8th row&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or do you want to merge each header and its items in to one row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2008 19:54:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-17T19:54:31Z</dc:date>
    <item>
      <title>Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224315#M1009242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to split data in an internal table based on a condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;record type   &lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;P&gt;H&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;P&gt;L  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to split this data and group as HLLL and HLLL.&lt;/P&gt;&lt;P&gt;H,L denotes header and line items..&lt;/P&gt;&lt;P&gt;Any ideas on how can we do it....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 19:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224315#M1009242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T19:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224316#M1009243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mayank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood it correctly do you want to arrange the rows in the internal table like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header record 1st row&lt;/P&gt;&lt;P&gt;Item record     2nd row&lt;/P&gt;&lt;P&gt;Item record     3rd row&lt;/P&gt;&lt;P&gt;Item record     4th row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header record  5th row&lt;/P&gt;&lt;P&gt;Item record      6th row&lt;/P&gt;&lt;P&gt;Item record      7th row&lt;/P&gt;&lt;P&gt;Item record      8th row&lt;/P&gt;&lt;P&gt;................................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or do you want to merge each header and its items in to one row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 19:54:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224316#M1009243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224317#M1009244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats correct....&lt;/P&gt;&lt;P&gt;Thats the way i want it.....separate rows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mayank Sharma on Jul 17, 2008 9:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 19:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224317#M1009244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T19:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224318#M1009245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mayank, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your program where from are you pulling those header and item records? And how and where are they stored?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paste the definition of the header and item structures here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 20:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224318#M1009245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T20:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224319#M1009246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are reading this data from a file on the application server, &lt;/P&gt;&lt;P&gt;then you need to use the open dataset, read dataset and close dataset statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are reading the file from presentation server, you need to use the function module 'GUI_UPLOAD'.&lt;/P&gt;&lt;P&gt;This FM will load the data into an internal table. It will create exactly the same number of rows in the internal table as those present in the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at the internal table, check the first character, if  its 'H' it means header, else line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Sushil Joshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 20:01:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224319#M1009246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T20:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into header and line items....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224320#M1009247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can achieve it by using nested internal table means table with table..like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: ty_item type standard table of itemdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ty_data,&lt;/P&gt;&lt;P&gt;        header type headerdata,&lt;/P&gt;&lt;P&gt;        item   type ty_item, &amp;lt;&amp;lt;  it is an internal table&lt;/P&gt;&lt;P&gt;       end of ty_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: i_data type standard table of ty_data. &amp;lt;&amp;lt;  Nested table&lt;/P&gt;&lt;P&gt;data: w_data type ty_data.&lt;/P&gt;&lt;P&gt;data: w_item type itemdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say i_file contains header and line item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at i_final into w_final.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; if w_final-rectyp = 'H'.&lt;/P&gt;&lt;P&gt;   if sy-tabix &amp;lt;&amp;gt; 1.&lt;/P&gt;&lt;P&gt;    append w_data to i_data.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;   l_rectyp = w_final-rectyp.&lt;/P&gt;&lt;P&gt;   w_data-header = w_final-headerdata.&lt;/P&gt;&lt;P&gt; else.&lt;/P&gt;&lt;P&gt;  w_item = w_final-itemdata.&lt;/P&gt;&lt;P&gt;  append w_item to w_data-item.&lt;/P&gt;&lt;P&gt; endif. &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt; append w_data to i_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 20:15:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/split-data-into-header-and-line-items/m-p/4224320#M1009247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T20:15:05Z</dc:date>
    </item>
  </channel>
</rss>

