<?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: INCLUDE &amp;lt;CNTAIN&amp;gt;. error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067098#M427792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks for your reply. I did like you said. Now the error changed to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include &amp;lt;CNTAIN&amp;gt;&lt;/P&gt;&lt;P&gt;Within classes and interfaces, you can only use "TYPE" to refer to ABAP&lt;/P&gt;&lt;P&gt;Dictionary types, not "LIKE" or "STRUCTURE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me out here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 22:56:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T22:56:20Z</dc:date>
    <item>
      <title>INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067096#M427790</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  get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include &amp;lt;CNTAIN&amp;gt;&lt;/P&gt;&lt;P&gt;You may only define methods between "CLASS ... IMPLEMENTATION" and&lt;/P&gt;&lt;P&gt;"ENDCLASS".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;CNTAIN&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD CREATENBOBJECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: newvariable(12) type n.&lt;/P&gt;&lt;P&gt;swc_get_element container 'REQUISITION_NUM' newvariable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZHRWPC_EREC_CREATE_EREC_OBJECT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;notif_objid = notificationid&lt;/P&gt;&lt;P&gt;notif_type = notificationtype&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;no_isr_update = 1&lt;/P&gt;&lt;P&gt;database_error = 2&lt;/P&gt;&lt;P&gt;general_error = 3&lt;/P&gt;&lt;P&gt;req_object_found = 4&lt;/P&gt;&lt;P&gt;no_erec_approval = 5&lt;/P&gt;&lt;P&gt;erec_sys_error = 6&lt;/P&gt;&lt;P&gt;status_error = 7&lt;/P&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Messages already raised, exceptions should be handled here&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;due to workflow intricacy.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wrong with the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 22:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067096#M427790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T22:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067097#M427791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everything must be inside the METHOD...ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;



METHOD CREATENBOBJECT.


INCLUDE &amp;lt;CNTAIN&amp;gt;.

DATA: newvariable(12) type n.
swc_get_element container 'REQUISITION_NUM' newvariable.


CALL FUNCTION 'ZHRWPC_EREC_CREATE_EREC_OBJECT'
EXPORTING
notif_objid = notificationid
notif_type = notificationtype
IMPORTING
return = return
EXCEPTIONS
no_isr_update = 1
database_error = 2
general_error = 3
req_object_found = 4
no_erec_approval = 5
erec_sys_error = 6
status_error = 7
OTHERS = 8.

IF sy-subrc &amp;lt;&amp;gt; 0.
* Messages already raised, exceptions should be handled here
* due to workflow intricacy.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&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>Tue, 13 Mar 2007 22:51:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067097#M427791</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-13T22:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067098#M427792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks for your reply. I did like you said. Now the error changed to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include &amp;lt;CNTAIN&amp;gt;&lt;/P&gt;&lt;P&gt;Within classes and interfaces, you can only use "TYPE" to refer to ABAP&lt;/P&gt;&lt;P&gt;Dictionary types, not "LIKE" or "STRUCTURE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me out here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 22:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067098#M427792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T22:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067099#M427793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will need to log on to my system at work.  I'll get back.&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>Tue, 13 Mar 2007 22:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067099#M427793</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-13T22:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067100#M427794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems that classes have issues with the INCLUDE statement.  You can simply copy our the macro definition from the INCLUDE and put it directly into the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

method createnbobject.


  data: container type table of swcont.

  data: newvariable(12) type n.


  define swc_get_element.
    call function 'SWC_ELEMENT_GET'
         exporting
              element   = &amp;amp;2
         importing
              field     = &amp;amp;3
         tables
              container = &amp;amp;1
         exceptions
              not_found = 8
              is_null   = 4
              others    = 1.
  end-of-definition.

  swc_get_element container 'REQUISITION_NUM' newvariable.


endmethod.

&lt;/CODE&gt;&lt;/PRE&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>Tue, 13 Mar 2007 23:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067100#M427794</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-03-13T23:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067101#M427795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Did you mean like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD CREATENBOBJECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE &amp;lt;CNTAIN&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA: newvariable(12) type n.&lt;/P&gt;&lt;P&gt;DATA: container type table of swcont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   define swc_get_element.&lt;/P&gt;&lt;P&gt;    call function 'SWC_ELEMENT_GET'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              element   = &amp;amp;2&lt;/P&gt;&lt;P&gt;         importing&lt;/P&gt;&lt;P&gt;              field     = &amp;amp;3&lt;/P&gt;&lt;P&gt;         tables&lt;/P&gt;&lt;P&gt;              container = &amp;amp;1&lt;/P&gt;&lt;P&gt;         exceptions&lt;/P&gt;&lt;P&gt;              not_found = 8&lt;/P&gt;&lt;P&gt;              is_null   = 4&lt;/P&gt;&lt;P&gt;              others    = 1.&lt;/P&gt;&lt;P&gt;  end-of-definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  swc_get_element container 'REQUISITION_NUM' newvariable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'ZHRWPC_EREC_CREATE_EREC_OBJECT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      notif_objid      = notificationid&lt;/P&gt;&lt;P&gt;      notif_type       = notificationtype&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return           = return&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      no_isr_update    = 1&lt;/P&gt;&lt;P&gt;      database_error   = 2&lt;/P&gt;&lt;P&gt;      general_error    = 3&lt;/P&gt;&lt;P&gt;      req_object_found = 4&lt;/P&gt;&lt;P&gt;      no_erec_approval = 5&lt;/P&gt;&lt;P&gt;      erec_sys_error   = 6&lt;/P&gt;&lt;P&gt;      status_error     = 7&lt;/P&gt;&lt;P&gt;      OTHERS           = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Messages already raised, exceptions should be handled here&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;due to workflow intricacy.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&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;If yes, I am getting an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include &amp;lt;CNTAIN&amp;gt;&lt;/P&gt;&lt;P&gt;Within classes and interfaces, you can only use "TYPE" to refer to ABAP&lt;/P&gt;&lt;P&gt;Dictionary types, not "LIKE" or "STRUCTURE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 23:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067101#M427795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T23:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE &lt;CNTAIN&gt;. error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067102#M427796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; It did solve the problem, I didn't remove the Include statement last time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 23:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-lt-cntain-gt-error/m-p/2067102#M427796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T23:17:03Z</dc:date>
    </item>
  </channel>
</rss>

