<?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: How to create a structure in a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678077#M299042</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;Thanks for your help I will try it out . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Nov 2006 05:35:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-01T05:35:49Z</dc:date>
    <item>
      <title>How to create a structure in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678075#M299040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Would any please tell me how to delcare a structure in a method which contains a SAP defined structre in it . I have done it in normal ABAP but it not taking that syntax in ABAP objects method . Please tell me syntax for a method .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 04:43:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678075#M299040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T04:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a structure in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678076#M299041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you tried the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: begin of &amp;lt;struct&amp;gt;.
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In methods we have to use the following approach:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: begin of ty_s_struc.
TYPES:   field1   TYPE &amp;lt;fieldname&amp;gt;.
TYPES:   field2   TYPE &amp;lt;struct-fieldname&amp;gt;.
TYPES:   ...
TYPES: end of ty_s_struc.
DATA:
  ls_struc     TYPE ty_s_struc,
  lt_itab      TYPE STANDARD TABLE OF ty_s_struc
               WITH DEFAULT KEY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer to place my type definition in the "TYPES section" (see push button "Types" in SE24). However, all types defined within your class are &amp;lt;b&amp;gt;private&amp;lt;/b&amp;gt; meaning you cannot use them in the interface of public methods.&lt;/P&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>Wed, 01 Nov 2006 05:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678076#M299041</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-11-01T05:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a structure in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678077#M299042</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;Thanks for your help I will try it out . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 05:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678077#M299042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T05:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a structure in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678078#M299043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have wondered why I used the option&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;... WITH DEFAULT KEY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for that is that I sometimes got an syntax error saying "...generic type cannot be used..." when I defined my data variables. This syntax error never occurs with the added option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: There is no need to use TYPES: ... for each single field in your structure. However, I am sometimes old-fashioned in the sense: single line -&amp;gt; single statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 06:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-a-structure-in-a-method/m-p/1678078#M299043</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-11-01T06:07:09Z</dc:date>
    </item>
  </channel>
</rss>

