<?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 difference between line type and table type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486556#M838286</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;can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2008 08:42:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-05T08:42:54Z</dc:date>
    <item>
      <title>difference between line type and table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486556#M838286</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;can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 08:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486556#M838286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T08:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: difference between line type and table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486557#M838287</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;This section describes how to define internal tables locally in a program. You can also define internal tables globally as data types in the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like all local data types in programs , you define internal tables using the TYPES statement. If you do not refer to an existing table type using the TYPE or LIKE addition, you can use the TYPES statement to construct a new local internal table in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES type TYPE|LIKE tabkind OF linetype &lt;A href="WITH key"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;          &lt;A href="INITIAL SIZE n"&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After TYPE or LIKE, there is no reference to an existing data type. Instead, the type constructor occurs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tabkind OF linetype &lt;A href="WITH key"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The type constructor defines the table type tabkind, the line type linetype, and the key key of the internal table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line Type&lt;/P&gt;&lt;P&gt;For the line type linetype, you can specify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the ABAP Dictionary. If you specify any of the generic elementary types c, n, p and x , any attributes that you fail to specify (field length, number of decimal places) are automatically filled with the default values. You cannot specify any other generic types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Any data object  recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and structures in the ABAP Dictionary (for compatibility reasons).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of the lines in the internal table have the fully-specified technical attributes of the specified data type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 08:49:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486557#M838287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: difference between line type and table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486558#M838288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Go through this blog, this might help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        "InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class="MsoNormal"&amp;gt;&amp;lt;![if !supportEmptyParas]&amp;gt;The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a BSP when we need to work with a table we must always do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1, in the Types definitions create a structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        types : begin of ts_reclist,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi-        style='mso-tab-count:2'&amp;gt;                            receiver type somlreci1-receiver,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi-        style='mso-tab-count:2'&amp;gt;                 style='mso-tab-count: 1'&amp;gt;             rec_type type somlreci1-rec_type,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi-         style='mso-tab-count:2'&amp;gt;                            end of ts_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi- &amp;lt;![if !supportEmptyParas]&amp;gt; &amp;lt;![endif]&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class="MsoNormal"&amp;gt;                         types : tt_reclist type table of ts_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class="MsoNormal"&amp;gt;&amp;lt;![if !supportEmptyParas]&amp;gt; &amp;lt;![endif]&amp;gt; this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                       data: t_reclist type tt_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and creating the structure based upon the structure definiton:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;![if !supportEmptyParas]&amp;gt;   &amp;lt;![endif]&amp;gt;                         data: s_reclist type ts_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:&amp;lt;![endif]&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        s_reclist-receiver = 'user@company.com'.   "&amp;lt;-- change address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi- &amp;lt;![if !supportEmptyParas]&amp;gt; &amp;lt;![endif]&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi-                         s_reclist-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        append s_reclist to t_reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;![if !supportEmptyParas]&amp;gt; &amp;lt;![endif]&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1"&amp;gt;           style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'&amp;gt;           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class="style1"&amp;gt;CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;style='mso-tab-count:2'&amp;gt;                                    document_data = docdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;style='mso-tab-count:2'&amp;gt;                                    DOCUMENT_TYPE = 'RAW'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;style='mso-tab-count:2'&amp;gt;                                    PUT_IN_OUTBOX = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;style='mso-tab-count:2'&amp;gt;                                    COMMIT_WORK = 'X' "used from rel.6.10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mso-bidi-font-size: style='mso-tab-count:2'&amp;gt;                                    receivers = t_reclist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class="style1"&amp;gt; &amp;lt;![if !supportEmptyParas]&amp;gt;   &amp;lt;![endif]&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;![if !supportEmptyParas]&amp;gt;F inally, a comment from Thomas Jung, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;![if !supportEmptyParas]&amp;gt; &amp;#147;when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 08:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486558#M838288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T08:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: difference between line type and table type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486559#M838289</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;STRONG&gt;for line type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/68/b0e7418192c717e10000000a155106/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/68/b0e7418192c717e10000000a155106/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for table type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/90/8d72fbb1af11d194f600a0c929b3c3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/90/8d72fbb1af11d194f600a0c929b3c3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;hope it will help you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreelatha Gullapalli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 08:56:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-line-type-and-table-type/m-p/3486559#M838289</guid>
      <dc:creator>sreelatha_gullapalli</dc:creator>
      <dc:date>2008-03-05T08:56:45Z</dc:date>
    </item>
  </channel>
</rss>

