cancel
Showing results for 
Search instead for 
Did you mean: 

(Org Model) Obtain Sales org's object id from position object id.

Former Member
0 Kudos

Hi All,

In the org model, I have the object id of a position and i want to find the object id of the sales org to which this position is assigned.

Is there any FM that does this..?

Thanks in Advance,

Raviraj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raviraj,

Try this FM : COM_OM_ORGUNITS_OF_MANAGER

Hope this helps.

Cheers,

Gun.

Former Member
0 Kudos

Hi Gunawan,

Thx for quick response.

Actually, i have the position ID. (the field manager for a particular sales org.)

now, by using this position's ID (position) i want the immidiate sales org to which this position is assigned.

Thanks,

Raviraj

Former Member
0 Kudos

Hi Raviraj,

from the FM I gave to you, it will give you the Org unit.

Are you saying that the Org Unit is not the Sales Org?

(the position is not attach directly to Sales Org?)

Cheers,

Gun.

Former Member
0 Kudos

Hi Gun,

When i tried tu check out this FM, COM_OM_ORGUNITS_OF_MANAGER, it says "NOTHING_FOUND"

the params i passed are :

PLVAR

MGR_OTYPE O

MGR_OBJID 50001049 => position id of the user

SELDATE 02/28/2006

NO_DIALOG X

SEL_MULTIPLE X

am i missing something ?

The hierarchy is :

SOME_SALES_ORG

|

|-- ASSIGNED_PERSON

I have the ID of this person and want the ID of the sales org

regards,

raviraj

Message was edited by: Raviraj Khare

Former Member
0 Kudos

Hi Raviraj,

PLVAR

MGR_OTYPE S => for position use S

MGR_OBJID 50001049 => position id of the user

SELDATE 02/28/2006

NO_DIALOG

SEL_MULTIPLE X

Cheers,

Gun.

Former Member
0 Kudos

Hi Gun,

I tried using the type 'S', but it still says NOTHING_FOUND. I even gave date as blank.

As of now, i have taken the related sales org id from the HRP1001 table, where objid = 50001049, and i get the org unit for which this position falls under. This gives me the id of the sales org and suffices the requirement.

but iam not sure if this is the fool-proof solution.

Thanks for the follow up.

p.s. if there's any other FM or any std procedure to get this done, do share.

Regards,

Raviraj

Former Member
0 Kudos

Hi Raviraj,

more info ....

This FM only works for position as "manager" of that

Org Unit (see tab Basic Data of that Position in Org

Model - check Head of own Org Unit).

Otherwise, check this FM : RH_GET_ASSIGNED_OBJECTS

OTYPE S

OBJID 50001049

WEGID S_UP

SVECT 1

SBEGD 01.03.2000

SENDD 01.03.2006

ACTIV X

TDEPTH 2 ==> depends on your depth require

Cheers,

Gun.