<?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 Get information for classes from call stack in abap (like java reflection) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421974#M1050222</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;is there any possibilty to get following information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to program a logging tool. You can create a logging object and use some methods like &lt;/P&gt;&lt;P&gt;xxxxx-&amp;gt;add_msg(msg) to put logging information to the logging object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i also want to find out, from which class/object/runtime environment this msg comes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;class CL_ABC uses the logging tool and does following call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;lo_logger = CL_logger-&amp;gt;get_logger().&lt;/P&gt;&lt;P&gt;lo_logger-&amp;gt;add_msg( 'test the code' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the method -&amp;gt;add_msg() in logger object is called. inside this method, i want to have the information, from which class/object the -&amp;gt;add_msg() method is called. after the call, the logging object must have this information like: &lt;/P&gt;&lt;P&gt;CALL_CLASS: CL_ABC&lt;/P&gt;&lt;P&gt;CALL_LINE: 83&lt;/P&gt;&lt;P&gt;MSG: test the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Sep 2008 13:38:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-04T13:38:20Z</dc:date>
    <item>
      <title>Get information for classes from call stack in abap (like java reflection)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421974#M1050222</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;is there any possibilty to get following information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to program a logging tool. You can create a logging object and use some methods like &lt;/P&gt;&lt;P&gt;xxxxx-&amp;gt;add_msg(msg) to put logging information to the logging object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i also want to find out, from which class/object/runtime environment this msg comes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;class CL_ABC uses the logging tool and does following call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;lo_logger = CL_logger-&amp;gt;get_logger().&lt;/P&gt;&lt;P&gt;lo_logger-&amp;gt;add_msg( 'test the code' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the method -&amp;gt;add_msg() in logger object is called. inside this method, i want to have the information, from which class/object the -&amp;gt;add_msg() method is called. after the call, the logging object must have this information like: &lt;/P&gt;&lt;P&gt;CALL_CLASS: CL_ABC&lt;/P&gt;&lt;P&gt;CALL_LINE: 83&lt;/P&gt;&lt;P&gt;MSG: test the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 13:38:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421974#M1050222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-04T13:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get information for classes from call stack in abap (like java reflection)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421975#M1050223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the SYSTEM_CALLSTACK function module.&lt;/P&gt;&lt;P&gt;Read this thread, Uwe has given details on both getting the calling class and method: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5201952"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most probably this solves your needs.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 14:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421975#M1050223</guid>
      <dc:creator>alejandro_bindi</dc:creator>
      <dc:date>2008-09-04T14:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get information for classes from call stack in abap (like java reflection)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421976#M1050224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for answer Alejandro Bindi. your answer solved the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 13:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-information-for-classes-from-call-stack-in-abap-like-java-reflection/m-p/4421976#M1050224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T13:55:59Z</dc:date>
    </item>
  </channel>
</rss>

