<?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: calling program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087536#M977314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you pl. tell me what are the entries u r getting when then the prog is called from another prog. in table  t_syst?&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 = t_syst.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 19:00:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T19:00:30Z</dc:date>
    <item>
      <title>calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087527#M977305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys, &lt;/P&gt;&lt;P&gt;suppose , we have 2 report programs, 'X' and 'Y'.&lt;/P&gt;&lt;P&gt;Now, progam 'X' is getting executed, during the execution, we submit program 'Y', later the control is taken back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue i have is , during the execution of program 'Y' ,i want to know whether the program 'Y' is executed by itself or the program 'Y' is called from another program(like  progam 'X' ).&lt;/P&gt;&lt;P&gt;If program 'Y' is called from another program, how can i know the name of the calling program???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me as soon as possible...&lt;/P&gt;&lt;P&gt;points will be rewarded....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx, shivaa...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:13:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087527#M977305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087528#M977306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check whether the program name is passing with the variable in the submit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087528#M977306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087529#M977307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shiva,&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;We can achieve this by using the system variable SY-CPROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   SY-CPROG gives the name of the calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you. &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;\[removed by moderator\]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any queries, get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chandrasekhar Gandla on Jun 30, 2008 7:26 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jan Stallkamp on Jul 1, 2008 4:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:19:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087529#M977307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087530#M977308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, chandra sy-cprog is not showing correct value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from program 'X', we call program 'Y'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at some point in program, 'Y' I keep debug-point and check for sy-cprog value..instead of program 'X'., we r getting program 'Y'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you guys suggest me another way.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087530#M977308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087531#M977309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello shivaprasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to know whether your program 'Y' is executed by another then the system field is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SY-CALLD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It contains X if the program was started using CALL TRANSACTION, CALL DIALOG, or SUBMIT u2026 [AND RETURN]. Space if the program was started using LEAVE TO TRANSACTION or using a transaction code from a screen. SY-CALLD is always space when a batch input session is being processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to know what program has called your program then the system field is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SY-CPROG&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It contains the name of the calling program in an external routine, otherwise the name of the current program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also check this system field &lt;STRONG&gt;SY-REPID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It returns the name of the current ABAP program. For externally-called procedures, it is the name of the main program of the procedure. If you pass SY-REPID as an actual parameter to an external procedure, the formal parameter does not contain the name of the caller, but that of the main program of the procedure. To avoid this, assign SY-REPID to an auxiliary variable and use that in the call, or use the system field SY-CPROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you find it useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Indu Rayepudi on Jun 30, 2008 7:42 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:38:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087531#M977309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087532#M977310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be u can use FM SYSTEM_CALLSTACK. By reading the call stack u can find out whether prog. Y is called by some other prog. or not.&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       = t_syst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087532#M977310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087533#M977311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no luck again, sy-cprog is giving the value of 'Y', not 'X'.&lt;/P&gt;&lt;P&gt;i dont understand why???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in program 'X', v have stmt---&amp;gt; submit Y and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when, program 'Y', is running i keep debug point and check for value sy-cprog, its still showing 'Y',not  'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 17:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087533#M977311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T17:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087534#M977312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to call FM SYSTEM_CALLSTACK from prog. Y and in debug mode check the table t_syst's content.If should have an entry that indicates from where this prog. is getting called. &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 = t_syst.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 18:00:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087534#M977312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T18:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087535#M977313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;even wid FM SYSTEM_CALLSTACK, i am not getting 'X' value.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 18:10:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087535#M977313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T18:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: calling program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087536#M977314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you pl. tell me what are the entries u r getting when then the prog is called from another prog. in table  t_syst?&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 = t_syst.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 19:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-program/m-p/4087536#M977314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T19:00:30Z</dc:date>
    </item>
  </channel>
</rss>

