<!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>
<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> </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). You will find the =
LEVEL in=20
RESULT_STRUC.</FONT></SPAN></DIV>
<DIV><SPAN class=3D655010606-17012001></SPAN> </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. 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> </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> </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 =20
recursive function module to find out the top-level org unit.=20
<P>Tables 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> =20
<BR> =20
<P>"Schroeter, Brad" wrote:=20
<BLOCKQUOTE TYPE=3D"CITE"> =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? 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>