<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
 
 
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D321293706-17012001>Sorry,=20
I was not reading your question well enough.&nbsp; In order to find the =
 
top-level org.id use evaluation path 'A002'.&nbsp; If it raises =
'NO_ENTRY_FOUND'=20
you can be sure that no A002 ('reports_to'-relationship) is=20
found.&nbsp;</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D321293706-17012001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D321293706-17012001>Some customers use other relationships than =
A/B002 for=20
building the org.-structure.&nbsp; Make sure to use an appropriate =
evaluation=20
path in this case</SPAN>.<SPAN class=3D321293706-17012001>&nbsp; =
</SPAN><SPAN=20
class=3D321293706-17012001>A002 searches the structure upwards, ORGEH =
goes=20
downwards.&nbsp;</SPAN></FONT></FONT></FONT><FONT face=3DTahoma><FONT =
size=3D2><SPAN=20
class=3D321293706-17012001><FONT face=3DArial color=3D#0000ff>Training =
course HR530=20
gives all technical details&nbsp;of=20
handling&nbsp;org.-structures.</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D321293706-17012001></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN =
class=3D321293706-17012001><FONT=20
face=3DArial color=3D#0000ff>Regards,</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN =
class=3D321293706-17012001><FONT=20
face=3DArial color=3D#0000ff>Bernhard</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D321293706-17012001></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D321293706-17012001>P.S.: RH_GET_STRUCTURE is based on=20
RH_STRUC_GET.&nbsp;&nbsp;I think it is a bit easier to=20
use.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D321293706-17012001></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D321293706-17012001>&nbsp;</SPAN>-----Urspr=FCngliche=20
Nachricht-----<BR><B>Von:</B> Knuth, Bernhard <BR><B>Gesendet:</B> =
Mittwoch, 17.=20
Januar 2001 07:20<BR><B>An:</B> 'SAP Workflow Users' =
Group'<BR><B>Betreff:</B>=20
AW: Trying to find top-level org unit<BR><BR></DIV></FONT></FONT>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Brad,</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff size=3D2>try=20
RH_STRUC_GET with ACT_OTYPE =3D 'O', ACT_OBJID =3D '50000000', and =
ACT_WEGID =3D=20
'ORGEH' (evaluation path in org. management).&nbsp; You will find the =
LEVEL in=20
RESULT_STRUC.</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff size=3D2>You=20
should always use function modules accessing HRP* instead of a =
SELECT.&nbsp; You=20
will find them in RHDB starting with =
RH_READ_INFTY*.</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Bernhard Knuth</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff size=3D2>BPT=20
Consulting and Integration</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001><FONT face=3DArial =
color=3D#0000ff size=3D2>SAP=20
Walldorf</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001></SPAN>&nbsp;</DIV></FONT></DIV>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Urspr=FCngliche Nachricht-----<BR><B>Von:</B> Rakesh Dube =
 
[mailto:rakesh_dube@pacific.net.sg]<BR><B>Gesendet:</B> Mittwoch, 17. =
Januar=20
2001 03:11<BR><B>An:</B> SAP-WUG@MITVMA.MIT.EDU<BR><B>Betreff:</B> Re: =
Trying to=20
find top-level org unit<BR><BR></FONT></DIV>Hi Brad, <BR>U have to =
write&nbsp;=20
recursive function module to find out the top-level org unit.=20
<P>Tables&nbsp; which is using the relationship is HRP1000 and HRP1001=20
<P>HRP1000 is for creating the structure and HRP1001 is for =
relationship to the=20
object=20
<P>If u need any further detail let me know <BR>Thanks <BR>Rakesh =
<BR>&nbsp;=20
<BR>&nbsp;=20
<P>"Schroeter, Brad" wrote:=20
<BLOCKQUOTE TYPE=3D"CITE">&nbsp;=20
  <P><FONT face=3DArial><FONT size=3D-1>I've got an org structure like=20
  this:</FONT></FONT> <BR><FONT face=3DArial><FONT size=3D-1>Org unit =
50000000=20
  (top-level)</FONT></FONT> <BR><FONT face=3DArial><FONT =
size=3D-1>|__Org unit=20
  50000001</FONT></FONT> <BR><FONT face=3DArial><FONT size=3D-1>|__Org =
unit=20
  50000002</FONT></FONT> <BR><FONT face=3DArial><FONT size=3D-1>|__Org =
unit=20
  50000003</FONT></FONT>=20
  <P><FONT face=3DArial><FONT size=3D-1>Let's say I'm currently using =
org unit=20
  50000000, I'm in a custom method and I want to find if it's the=20
  top-level?&nbsp; Is there a database select statement to one of the =
HRP*=20
  tables or a function module that will give me the info?</FONT></FONT> =
 
  <P><FONT face=3DArial><FONT size=3D-1>Thanks,</FONT></FONT> <BR><FONT =
 
  face=3DArial><FONT =
size=3D-1>Brad</FONT></FONT></P></BLOCKQUOTE></BODY></HTML>