<?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: Difference between sy-repid and sy-cprog in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640661#M285367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From  help.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-CPROG&lt;/P&gt;&lt;P&gt;In externally called procedures, the name of the calling program, otherwise the name of the current program. If an externally called procedure calls another external procedure, SY-CPROG keeps the name of the first main program and is not given the name of the main program of the further caller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-REPID&lt;/P&gt;&lt;P&gt;Name of current ABAP program. With externally called procedures this is the name of the procedure&amp;#146;s main program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SY-REPID was transferred to an external procedure as an actual parameter before Release 6.10, the formal parameter was not given the name of the caller, but the name of the procedure&amp;#146;s main program. SY-REID had to be transferred to an auxiliary variable before the call or you had to use SY-PROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of Release 6.10, SY-REPID is a separate constant that is no longer part of the structure SYST or SY. It can be transferred to external procedures directly.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2006 14:34:22 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-10-19T14:34:22Z</dc:date>
    <item>
      <title>Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640659#M285365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in a function module call I want to pass the calling report's name as an import parameter. I want to do this dynamically so that the 'call function ....' code can be copied to any report. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found two SY-fields, sy-repid and sy-cprog. So far both always contain the running report's name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an important difference between the two? Is one perhaps deprecated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640659#M285365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T14:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640660#M285366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-REPID:&lt;/P&gt;&lt;P&gt;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;SY-CPROG:&lt;/P&gt;&lt;P&gt;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;&lt;/P&gt;&lt;P&gt;For more information, please check this links.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640660#M285366</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-10-19T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640661#M285367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From  help.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-CPROG&lt;/P&gt;&lt;P&gt;In externally called procedures, the name of the calling program, otherwise the name of the current program. If an externally called procedure calls another external procedure, SY-CPROG keeps the name of the first main program and is not given the name of the main program of the further caller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-REPID&lt;/P&gt;&lt;P&gt;Name of current ABAP program. With externally called procedures this is the name of the procedure&amp;#146;s main program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SY-REPID was transferred to an external procedure as an actual parameter before Release 6.10, the formal parameter was not given the name of the caller, but the name of the procedure&amp;#146;s main program. SY-REID had to be transferred to an auxiliary variable before the call or you had to use SY-PROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of Release 6.10, SY-REPID is a separate constant that is no longer part of the structure SYST or SY. It can be transferred to external procedures directly.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640661#M285367</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-19T14:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640662#M285368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use sy-repid in the FM, you're always the function group of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to pass an input parameter with sy-repid value to have the right calling program in the FM.&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;sebastien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640662#M285368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T14:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640663#M285369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:35:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640663#M285369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T14:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between sy-repid and sy-cprog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640664#M285370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SY-REPID : It is name of the current program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-CPROG : Name of the calling program. It would be same as SY-REPID if it is the current program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for example check the below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZREP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  write : / sy-repid, sy-cprog.&lt;/P&gt;&lt;P&gt;  submit zrep1 and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REport zrep1.&lt;/P&gt;&lt;P&gt;  start-of-selection.&lt;/P&gt;&lt;P&gt;  write : / sy-repid, sy-cprog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output would be.&lt;/P&gt;&lt;P&gt;  zrep zrep&lt;/P&gt;&lt;P&gt;  zrep1 zrep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 14:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sy-repid-and-sy-cprog/m-p/1640664#M285370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T14:35:49Z</dc:date>
    </item>
  </channel>
</rss>

