<?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: Determine which validation step called the user exit, possible? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649699#M1572997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the function module SYSTEM_CALLSTACK to get the ABAP Call stack. Search for the record where PROGNAME = 'GBTLEFI0' which will give the details of Validation ID and Step Number involved in the call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2011 05:05:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-08T05:05:55Z</dc:date>
    <item>
      <title>Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649698#M1572996</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;We have a a validation with different steps that use the  same user exit in their respective check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My functional analyst asked me if there is a way to programmatically determine in the user exit which step is executing the user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am asking the same question here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Validation FI100 has step 001,  002, and 003.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each of these steps use the user exit U100 from module pool ZGGBR001 in their check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't found a way in the code of U100 to determine which step called U100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know if this can be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the following technique to get a variable from the program's call stack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: var_name(30) type c value '(Z_CALLING)VARIABLE' .
field-symbols: &amp;lt;fs&amp;gt; type any.
*
  assign (var_name) to &amp;lt;fs&amp;gt;.
  write: / 'Variable from Z_CALLING', &amp;lt;fs&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm not sure how this might work with validation steps/user exits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2011 22:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649698#M1572996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-07T22:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649699#M1572997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the function module SYSTEM_CALLSTACK to get the ABAP Call stack. Search for the record where PROGNAME = 'GBTLEFI0' which will give the details of Validation ID and Step Number involved in the call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 05:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649699#M1572997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-08T05:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649700#M1572998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried your idea with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: var_name(30) TYPE c VALUE '(GBTC2FI0)G_STEP' .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and that worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be careful with calling function modules like SYSTEM_CALLSTACK inside validation exits, as this code potentially runs for tens of thousands of transactions in a short time (in case of interfaces), which might cause runtime or system load issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 08:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649700#M1572998</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2011-03-08T08:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649701#M1572999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas, Thanks for correcting me.  But when i checked the call stack program GBTLEFI0 is appearing instead of GBTC2FI0 (i am getting the validation step G_STEP from the program GBTLEFI0). Is the difference specific to SAP version/configuration in which I am working ? (I am on ECC 5.0).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 08:47:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649701#M1572999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-08T08:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649702#M1573000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with ECC 6.0, and analysed the FI validations as maintained via OB28.&lt;/P&gt;&lt;P&gt;This shows that both our approaches might not be very stable, as a release upgrade might well cause changes in the call stack.&lt;/P&gt;&lt;P&gt;Another way would be to create a "wrapper exit" for each step, which just assigns a step number and passes it to the central exit.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 09:03:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649702#M1573000</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2011-03-08T09:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Determine which validation step called the user exit, possible?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649703#M1573001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some debugging after I posted my question.  I came to the same solution, use FM 'SYSTEM_CALLSTACK'.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; VALCHCK_2FI100##001&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_callstack into w_callstack
                    where EVENTNAME+0(9) = 'VALCHCK_2'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FI110 is the validation&lt;/P&gt;&lt;P&gt;001    is the step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the caveats.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 22:04:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/determine-which-validation-step-called-the-user-exit-possible/m-p/7649703#M1573001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-08T22:04:24Z</dc:date>
    </item>
  </channel>
</rss>

