<?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: problem with SEO_METHOD_GET_SOURCE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918799#M1691334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your replay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm glad to hear that you are interesting this problem. i find some good tools in Java or C++ that detect the violation of Low. but nothing in ABAP. The Low is very important&amp;nbsp; design guideline for OO program. since we have the ABAP OO, so i think maybe do something in ABAP language. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a new guy in ABAP and looking for ur Help&lt;/P&gt;&lt;P&gt;my idea:&lt;/P&gt;&lt;P&gt;1, read all the method. (with &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;SEO_METHOD_GET_SOURCE&lt;/SPAN&gt; , maybe do it as a preprocessor )&lt;/P&gt;&lt;P&gt;2, find out the calling method. (do String operation, find " -&amp;gt;" )&lt;/P&gt;&lt;P&gt;3, detect the violation.&lt;/P&gt;&lt;P&gt;4, show result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jul 2012 09:39:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-07-07T09:39:23Z</dc:date>
    <item>
      <title>problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918795#M1691330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i use the SEO_METHOD_GET_SOURCE function to get the source code of method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want to scan the source code to find the violation of the law of demeter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me some example about the SEO_METHOD_GET_SOURCE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thans&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 10:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918795#M1691330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-06T10:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918796#M1691331</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;Go through this link. Let me know it will helpful to you or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/thread/1496837"&gt;http://scn.sap.com/thread/1496837&lt;/A&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;Sanjeeb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 11:04:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918796#M1691331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-06T11:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918797#M1691332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for replay.&lt;/P&gt;&lt;P&gt;i use SEO_METHOD_GET_SOURCE to get the method code.&lt;/P&gt;&lt;P&gt;but it come a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function can the method, which is redefined get.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 14:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918797#M1691332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-06T14:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918798#M1691333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yinxiao, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no solution but I want to say that I find this an interesting problem: To compute violations of the Law of Demeter in ABAP methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked in the "Code metric" section of the Code Inspector (transaction SCI), but there is no check for this, at least in my release (SAP_BASIS 702). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this check would be a good extension of the Code Inspector's code metrics in a forthcoming release? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will probably difficult to write such a detector using the statement "SCAN ABAP-SOURCE ... " only, since on the token level, there are so many different ways to write down a method call. Some higher level of syntax tree would simplify the task. But I don't know whether there is an ABAP call to obtain an AST ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just "thinking loudly"...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 20:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918798#M1691333</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-07-06T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918799#M1691334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your replay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm glad to hear that you are interesting this problem. i find some good tools in Java or C++ that detect the violation of Low. but nothing in ABAP. The Low is very important&amp;nbsp; design guideline for OO program. since we have the ABAP OO, so i think maybe do something in ABAP language. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a new guy in ABAP and looking for ur Help&lt;/P&gt;&lt;P&gt;my idea:&lt;/P&gt;&lt;P&gt;1, read all the method. (with &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;SEO_METHOD_GET_SOURCE&lt;/SPAN&gt; , maybe do it as a preprocessor )&lt;/P&gt;&lt;P&gt;2, find out the calling method. (do String operation, find " -&amp;gt;" )&lt;/P&gt;&lt;P&gt;3, detect the violation.&lt;/P&gt;&lt;P&gt;4, show result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2012 09:39:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918799#M1691334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-07T09:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918800#M1691335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yinxiao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are some tools that may help you with this task. Namely, CL_ABAP_CLASSDESCR is a reflection object which gives you details on all the properties of a class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important for the LoD is the information:&lt;/P&gt;&lt;P&gt;- Global attributes of the class (contained in internal table ATTRIBUTES)&lt;/P&gt;&lt;P&gt;- The parameters of the method (component parameters of lines of attribute METHODS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also helpful can be the built-in scanner, available with the ABAP command "SCAN ABAP-SOURCE" (see my description here: &lt;A href="http://wiki.sdn.sap.com/wiki/display/stage/Tool+to+generate+a+class+implementation+from+its+definition"&gt;http://wiki.sdn.sap.com/wiki/display/stage/Tool+to+generate+a+class+implementation+from+its+definition&lt;/A&gt; ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made you a little start with my test program ZZ_CHECK_DEMETER_LAW. You can copy it from &lt;A href="http://pastebin.com/25ErsYbf"&gt;http://pastebin.com/25ErsYbf&lt;/A&gt; It should be self-contained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, the program detects the "train wreck catastrophes" like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a-&amp;gt;b-&amp;gt;c( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is still a demeter law violation, if such a statement is divided into two statements: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data x.&lt;/P&gt;&lt;P&gt;x = a-&amp;gt;b.&lt;/P&gt;&lt;P&gt;x-&amp;gt;c( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To detect this kind of LoD violations, a deeper level of code analysis would be necessary. But the tools of the class LCL_CHECK_DEMETER may serve you for implementing this kind of analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2012 20:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918800#M1691335</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-07-07T20:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918801#M1691336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yinxiao Liang Ni Hao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how the checks work in java or C++. But there will be something more in ABAP than find -&amp;gt; (or =&amp;gt;) to detect method calls: To detect violations you need some more context information about all methods of the same class that may be called without violations and all objects (and their respective) methods made available via interface of the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still: This would be a great project!&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2012 20:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918801#M1691336</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2012-07-07T20:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918802#M1691337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;ur answer is very helpful. The program is a great job.&lt;/P&gt;&lt;P&gt;And Now i think i should focus on learning ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ur help is highly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 07:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918802#M1691337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-09T07:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918803#M1691338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clemens Li Ni Hao，&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur replay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i will make a table for each class. the context information will in stored in it. it easy to find all methods of the same class, but hard to all objects (and their respective) methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will continue work on this problem and look forward to get ur further help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xie xie&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 07:29:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918803#M1691338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-09T07:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918804#M1691339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yinxiao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is indeed very difficult. A deep syntactical analysis of the code is required to get Demeter Law violations. It requires deep insight in the ABAP compiler. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe somebody from the ABAP language group can help you out with this. For me, it would be too much work to solve it completely, since I would have to re-invent what the compiler guys in Walldorf already have implemented (although mostly not in ABAP, but in the ABAP kernel, but maybe there are ways to access their code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to know &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the global attributes of the class which are of type object reference (OK, that's relatively simple, see above, CL_ABAP_CLASSDESCR).&lt;/LI&gt;&lt;LI&gt;the interface parameters of the method which are of type object reference (similarly)&lt;/LI&gt;&lt;LI&gt;the &lt;EM&gt;components of structures &lt;/EM&gt;(attributes or interface parameters) which are of type object reference&lt;/LI&gt;&lt;LI&gt;the local variables which are of type object reference&lt;/LI&gt;&lt;LI&gt;the components of local structures which are of type object reference&lt;/LI&gt;&lt;LI&gt;... many more special cases I don't think about right now.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An object type reference is not always defined in the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data: lo_server type ref to if_http_server.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the type may be declared in a type pool or&amp;nbsp; even in the DDIC:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;types: ty_server type ref to if_http_server.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in the code that you analyse, you only see this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data: lo_server type ty_server.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that you have find out: this type is of type ref to object, which cannot be deduced from the code you are actually scanning. You'll have to resolve the type and get its description...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it can be referred to another variable which is visible in the current scope:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data: lo_server like io_server.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to re-trace this "like" mechanism, to go to the root type that is actually used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's only one aspect of the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another problem is with "local object creation". Demeter Law talks about local instances which are created in the method (for those local instances, Demeter Law allows the access to teir attributes and methods).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to determine automatically that an object reference is created in the method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think that it will always be instantiated with a "create object" statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data: lo_dates type ref to zcl_date_helper.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;create object lo_dates.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's not the only way to get instances. There may be a factory method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;data: lo_helper type ref to zcl_date_helper.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;lo_dates = zcl_date_helper=&amp;gt;create( ).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;lo_dates ?= zcl_factory=&amp;gt;get_object( 'dates' ).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how do you know automatically that the method "create" is a method which creates objects? By its name? Surely not. On the other hand, a static method call could do any other task as well. Even the fact that it returns an object instance doesn't prove that it's an object factory!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do the Java and C++ tools work around this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:07:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918804#M1691339</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-07-09T08:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918805#M1691340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;Lod in ABAP&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;method M of class C can call:&lt;/P&gt;&lt;OL style="margin-left: 0.375in; font-family: Calibri; font-size: 9pt; list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: inherit; font-size: 9.0pt;"&gt;other methods in class C.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: inherit; font-size: 9.0pt;"&gt;methods on attributes of class C.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: inherit; font-size: 9.0pt;"&gt;methods on those parameters of&amp;nbsp; method M.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: inherit; font-size: 9.0pt;"&gt;method on the local data, which is created in M.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;there are four ways to call a method.(when there are other ways, please let me know)&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;1.call method&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;2.-&amp;gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;3.=&amp;gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;4.method name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;when we use "call method", "-&amp;gt;" and "=&amp;gt;" are also used.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;"=&amp;gt;" it is for static method.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;so my concern is all about "-&amp;gt;".&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;scan "-&amp;gt;" in code we get method caller and method.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;in order to find violation, check the method caller.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;method caller is:&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;ME.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;attributes of class C.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;parameters of method M.&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;local object. (by scan "-&amp;gt;" build a data dictionary, keywords "data")&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;otherwise, there is a violation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;about the data dictionary, we can by the data definition to build it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;in this project i focus on the method caller, not on the method or which data type of the method caller. The compile can solve the error in method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;this is my original idea, please help me to make it better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;thanks again, you help me a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;regards&lt;/P&gt;&lt;P style="padding-left: 33.75px; font-family: arial; font-size: 9.0pt; color: #333333;"&gt;Yinxiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 12:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918805#M1691340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-07-18T12:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem with SEO_METHOD_GET_SOURCE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918806#M1691341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yinxiao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your plan will give you a 95% solution. Some more complex cases are not covered. But it can be helpful to have such a rule, even if it is not a 100% solution. The remaining 5% can become arbitrarily complex. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, why are you disregarding static method calls? I think &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a=&amp;gt;b-&amp;gt;c( )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or, equivalently: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lo_b = a=&amp;gt;b.&lt;/P&gt;&lt;P&gt;lo_b-&amp;gt;c( )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is a Demeter rule violation as well...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 14:04:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-seo-method-get-source/m-p/8918806#M1691341</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2012-07-19T14:04:33Z</dc:date>
    </item>
  </channel>
</rss>

