<?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 the value of a field dynamically using system_callstack in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522252#M1069133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to get the value of a field used in a program which is available in my call stack while debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FM system_callstack but it just gives an internal table comprising of 3 fields programname, event type and event name. &lt;/P&gt;&lt;P&gt;I do not know how to retrieve the value of a variable being used in one of the programs.&lt;/P&gt;&lt;P&gt;My sample code is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SYSTEM_CALLSTACK'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_callstack = l_cstack_tab. " internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE l_cstack_tab INTO l_cstack_wa INDEX 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 AND l_cstack_wa-progname IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    l_evt_class = l_cstack_wa-progname.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="7" type="ul"&gt;&lt;P&gt;then what shud I do.*********************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Oct 2008 11:25:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-06T11:25:15Z</dc:date>
    <item>
      <title>Get the value of a field dynamically using system_callstack</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522252#M1069133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to get the value of a field used in a program which is available in my call stack while debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FM system_callstack but it just gives an internal table comprising of 3 fields programname, event type and event name. &lt;/P&gt;&lt;P&gt;I do not know how to retrieve the value of a variable being used in one of the programs.&lt;/P&gt;&lt;P&gt;My sample code is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SYSTEM_CALLSTACK'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_callstack = l_cstack_tab. " internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE l_cstack_tab INTO l_cstack_wa INDEX 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 AND l_cstack_wa-progname IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    l_evt_class = l_cstack_wa-progname.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="7" type="ul"&gt;&lt;P&gt;then what shud I do.*********************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 11:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522252#M1069133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T11:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a field dynamically using system_callstack</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522253#M1069134</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;Try using an external assign the read the call stack, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: lv_name(30) type c,
       lv_lgbkz    type lvs_lgbkz.
 field-symbols: &amp;lt;fs&amp;gt; type any.


 lv_name = '(SAPLL03A)I_MLVS-LGBKZ'.
 assign (lv_name) to &amp;lt;fs&amp;gt;.
 if ( &amp;lt;fs&amp;gt; is assigned ).
...............
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the value in lv_name is the program and variable name from the call stack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 12:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522253#M1069134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T12:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a field dynamically using system_callstack</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522254#M1069135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am somehow not able to understand your solution. I will again explain my issue. I alraedy have the name of the program which I need to use at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that this program has the structure filled with data and I need this data at run time in another program so I am using the FM System_callstack. Using this I get the name of the program dynamically but how do I read this structure data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I am clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 12:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522254#M1069135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T12:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get the value of a field dynamically using system_callstack</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522255#M1069136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. It was a good solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 09:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-value-of-a-field-dynamically-using-system-callstack/m-p/4522255#M1069136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-07T09:07:38Z</dc:date>
    </item>
  </channel>
</rss>

