<?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: header data and item data into same internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869705#M1476996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Header data is in t_header table&lt;/P&gt;&lt;P&gt;  Item data  is in t_item table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can we display in XLS file like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header1 rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Item2 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Header2: rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 May 2010 13:01:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-12T13:01:30Z</dc:date>
    <item>
      <title>header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869703#M1476994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I WANT TO KNOW THE LOGIC TO POPULATE HEADER DATA AND ITEM DATA INTO SAME INTERNAL TABLE AND AGAIN DOWNLOAD THE SAME TO EXCEL FILE .Output file should be displayed like this format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header1  rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Item2  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Header2: rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;&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;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: Please do not use all upper case in the future.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on May 12, 2010 3:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 12:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869703#M1476994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T12:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869704#M1476995</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;If you could populate the internal table as such with your logic, you can directly use it to download instead of complicating the scenario with multiple calls to the download FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 12:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869704#M1476995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T12:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869705#M1476996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Header data is in t_header table&lt;/P&gt;&lt;P&gt;  Item data  is in t_item table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can we display in XLS file like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header1 rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Item2 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;Header2: rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.&lt;/P&gt;&lt;P&gt;Item1 : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 13:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869705#M1476996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T13:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869706#M1476997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use text fields, adjusting the length of each field  to the max length of either the header or item (whichever is greater for that field), and write to each field using left or right justification depending on what you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 13:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869706#M1476997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T13:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869707#M1476998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any specific logic you are using to group the header and item records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 13:30:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869707#M1476998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T13:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869708#M1476999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example there are 3 internal tables  it_header, it_items and it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; here  it_final having all the  header and item fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first populate the it_header, it_items  data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_items.&lt;/P&gt;&lt;P&gt;read table it_header key xyz_key = it_items-xyz_key.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   here move all the header field to the it_final like below&lt;/P&gt;&lt;P&gt;it_final-x = it_header-x.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;here move all the item fields to the it_final like below&lt;/P&gt;&lt;P&gt;it_final-x = it_itemsr-x.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOW   IT_FINAL WILL HAVE ALL THE HEADER AND ITEM DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 18:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869708#M1476999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: header data and item data into same internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869709#M1477000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example we have 3 internal tables  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt; it_header  2&amp;gt;it_items   3&amp;gt;it_final (which contains all the header and item fields)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once  it_header   it_items  are filled&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_header with key xyz = it_item-xyz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  here move all the header fields to it_final like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final -xfield  = it_header-xfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;  here move all the item fields to it_final like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final -yfield  = it_item-yfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now header and item fileds will be fillled in it_item&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 18:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-data-and-item-data-into-same-internal-table/m-p/6869709#M1477000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-12T18:20:52Z</dc:date>
    </item>
  </channel>
</rss>

