<?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 Need sample code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094831#M435997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  Here I am giving the scenorio.&lt;/P&gt;&lt;P&gt;I am expecting the sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    This is how you can get to Manager info in SAP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table name in SAP is &amp;#147;ZPSDSALREP&amp;#148; and fields are &amp;#147;ZZSALESREP&amp;#148;, &amp;#147;ZSUPERVISOR&amp;#148;,&amp;#148;ZZTERRMGR&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;ZPSDSALREP&amp;#148; table will relates an Employee to his Supervisor through sales hierarchy ( for Ex: a REP will report to DM and DM reports to RM and RM reports to AR1 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you find the Supervisor Code then get Employee ID for the Supervisor 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;For EX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Orders table you get the Employee ID (REP)  and then get &amp;#147;ZSUPERVISOR&amp;#148; ( District code for DM )  for the employee from   &amp;#147;ZPSDSALREP&amp;#148; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From &amp;#147;ZSUPERVISOR&amp;#148; (District code for DM)  get the Employee ID by placing condition on  ZZTERRMGR field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get the Employee id then get employee email address from SAP table &amp;#147;KNA1&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points are assured for correct answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Apr 2007 11:08:55 GMT</pubDate>
    <dc:creator>sreeramkumar_madisetty</dc:creator>
    <dc:date>2007-04-05T11:08:55Z</dc:date>
    <item>
      <title>Need sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094831#M435997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  Here I am giving the scenorio.&lt;/P&gt;&lt;P&gt;I am expecting the sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    This is how you can get to Manager info in SAP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table name in SAP is &amp;#147;ZPSDSALREP&amp;#148; and fields are &amp;#147;ZZSALESREP&amp;#148;, &amp;#147;ZSUPERVISOR&amp;#148;,&amp;#148;ZZTERRMGR&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#147;ZPSDSALREP&amp;#148; table will relates an Employee to his Supervisor through sales hierarchy ( for Ex: a REP will report to DM and DM reports to RM and RM reports to AR1 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you find the Supervisor Code then get Employee ID for the Supervisor 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;For EX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Orders table you get the Employee ID (REP)  and then get &amp;#147;ZSUPERVISOR&amp;#148; ( District code for DM )  for the employee from   &amp;#147;ZPSDSALREP&amp;#148; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From &amp;#147;ZSUPERVISOR&amp;#148; (District code for DM)  get the Employee ID by placing condition on  ZZTERRMGR field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get the Employee id then get employee email address from SAP table &amp;#147;KNA1&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points are assured for correct answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2007 11:08:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094831#M435997</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-04-05T11:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094832#M435998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Since you are using tall the Custom tables, it is not that easy to write the code:&lt;/P&gt;&lt;P&gt;see the sample:&lt;/P&gt;&lt;P&gt;select ZSUPERVISOR from ZPSDSALREP into v_sup where ZZSALESREP = kunnr (Employee ID (REP) from order).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From &amp;#147;ZSUPERVISOR&amp;#148; (District code for DM) get the Employee ID by placing condition on ZZTERRMGR field.&lt;/P&gt;&lt;P&gt;get the supervisor ID from Code and get his manager ID.&lt;/P&gt;&lt;P&gt;Once you get the Employee id then get employee email address from SAP table  &amp;lt;b&amp;gt;ADR6&amp;lt;/b&amp;gt; (not from KNA1) passing ADDRNUMBER addressnumber field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2007 11:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094832#M435998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-05T11:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094833#M435999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  It's Answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 07:51:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-sample-code/m-p/2094833#M435999</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-05-23T07:51:48Z</dc:date>
    </item>
  </channel>
</rss>

