<?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: data declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716419#M313138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting the DATA statements inside you class definition under the PUBLIC SECTION.  You will need to define like so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Types: Begin of structure,
fld1,
fld2,
fld3,
end of structure.

DATA: tab1 type table of structure,
tab2 type table of structure,

DATA: struc1 like line of tab1,
          struc2 like line of tab2.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Nov 2006 03:53:27 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-11-22T03:53:27Z</dc:date>
    <item>
      <title>data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716417#M313136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Begin of structure,&lt;/P&gt;&lt;P&gt;      fld1,&lt;/P&gt;&lt;P&gt;      fld2,&lt;/P&gt;&lt;P&gt;      fld3,&lt;/P&gt;&lt;P&gt;      end of structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: tab1 like structure occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      tab2 like structure occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: struc1 like structure,&lt;/P&gt;&lt;P&gt;      struc2 like structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class cls DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLIC section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHODS.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at tab1 into struc1&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;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is syntactically correct and has been activated. IN the above, when I double click on tab1 it is not going to its definition, but instead throws an error message saying that the object struc1 is not found.&lt;/P&gt;&lt;P&gt;This is the case when I double click the tab1 inside method-endmethod.&lt;/P&gt;&lt;P&gt;Outside the method-endmethod, it goes directly to its definition in DATA declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions to avoid this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;M A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 03:47:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716417#M313136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T03:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716418#M313137</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;  Declare the tab1 in the class definition..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Probably you cannot use global internal tables inside the class...&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>Wed, 22 Nov 2006 03:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716418#M313137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T03:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716419#M313138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting the DATA statements inside you class definition under the PUBLIC SECTION.  You will need to define like so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Types: Begin of structure,
fld1,
fld2,
fld3,
end of structure.

DATA: tab1 type table of structure,
tab2 type table of structure,

DATA: struc1 like line of tab1,
          struc2 like line of tab2.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 03:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716419#M313138</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-22T03:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716420#M313139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure definition which iam using is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF structure.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE zstruc.&lt;/P&gt;&lt;P&gt;DATA:   upd_ind       TYPE c,&lt;/P&gt;&lt;P&gt;        cellio_tab    TYPE lvc_t_styl,&lt;/P&gt;&lt;P&gt;        linecolor(4)  TYPE c,&lt;/P&gt;&lt;P&gt;      END OF structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Now, when this is placed inside PUBLIC SECTION, we need to use TYPES. &lt;/P&gt;&lt;P&gt;I have taken like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF structure.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE zstruc.&lt;/P&gt;&lt;P&gt;TYPES:   upd_ind       TYPE c,&lt;/P&gt;&lt;P&gt;        cellio_tab    TYPE lvc_t_styl,&lt;/P&gt;&lt;P&gt;        linecolor(4)  TYPE c,&lt;/P&gt;&lt;P&gt;      END OF structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still I am getting errors. Hope the second TYPES declared above is wrong.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;M A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 04:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716420#M313139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T04:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716421#M313140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*---------------------------------------------------------------------*
*       CLASS cls DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class cls definition.

  public section.

    types: begin of structure.
         include type  zstruc.   "&amp;lt;----
    types: upd_ind(1) type c,  "&amp;lt;----
    cellio_tab type lvc_t_styl,
    linecolor(4) type c,
    end of structure.

endclass.

*---------------------------------------------------------------------*
*       CLASS implementation DEFINITION
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
class cls implementation.

endclass.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 04:34:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716421#M313140</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-22T04:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716422#M313141</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;&lt;/P&gt;&lt;P&gt;Try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF structure,&lt;/P&gt;&lt;P&gt;       ztable type &amp;lt;b&amp;gt;zstruc&amp;lt;/b&amp;gt;,&lt;/P&gt;&lt;P&gt;       upd_ind type char1,&lt;/P&gt;&lt;P&gt;       cellio_tab TYPE lvc_t_styl,&lt;/P&gt;&lt;P&gt;       linecolor(4) TYPE c,&lt;/P&gt;&lt;P&gt;       END OF structure.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 04:36:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716422#M313141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T04:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716423#M313142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Narendran and Rich.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already put the code which u both have sent. But still I am getting errors like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Explicit length specifications are necessary with types C, P, X, N undW in the OO context".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What modifications are to be done here. PLease suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;M A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 04:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716423#M313142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T04:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716424#M313143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah&lt;/P&gt;&lt;P&gt;I have got it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have specified the length of upd_id. And now its taking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, Thanks a lot to all of you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 04:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716424#M313143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T04:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: data declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716425#M313144</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 suggest used in this way&lt;/P&gt;&lt;P&gt;TYPES BEGIN OF structure.&lt;/P&gt;&lt;P&gt;  include structure zstruc.&lt;/P&gt;&lt;P&gt;types: upd_ind type char1.&lt;/P&gt;&lt;P&gt;  tcellio_tab TYPE lvc_t_styl,&lt;/P&gt;&lt;P&gt;  linecolor(4) TYPE c,&lt;/P&gt;&lt;P&gt;  END OF structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now structure is a flat one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2006 06:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-declaration/m-p/1716425#M313144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-22T06:49:19Z</dc:date>
    </item>
  </channel>
</rss>

