cancel
Showing results for 
Search instead for 
Did you mean: 

Read the Org Model

Former Member
0 Kudos

Hi,

I need to read the BP assigned to a specific position on my CRM Org Model. This position is assigned to the first organizational unit of it. Could you give some functions in order to do this. I though to use HRP1000 and HRP1001 for this purpose but I can't hardcode the Position Number or Description. (This number will change in other environments.)

It's very urgent.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jav,

Do you mean to get the Position based on User ID/BP?

Try this function CRM_CENTRALPERSON_GET.

Hope this helps.

Cheers,

Gun.

Former Member
0 Kudos

Thank you Gunawan but what I need is the following. I'll try to explain it better:

My Org Model

-


Org Unit 5000001

Position 50000026

BP1 900000015

I want to read the BP name assigned to the position 5000026 in order to display it in a smartform. I can't use for this purpose neither Org Unit ID number nor Position ID Number. I think it's possible to do it using the level number or so...

Hope this clarify

Former Member
0 Kudos

Hi Javier,

If I understand correctly, you want to search BP name

under specific position, but you don't want to "hardcode"

the position number and Org Unit number (am I right?)

Because these numbers can be different when you run

the function in other client.

Then you have to find other key field, my suggestion

you use field SHORT from table HRP1000. By means, you

have to define "naming convention" for the Org Unit and Positions' short names. This naming convention followed

by all clients.

So you can search Org Unit/Position by Short Names to

table HRP1000 then get the Org Unit/Posiition ID, after

that pass this to function to get the BP under that

position.

Is this what you looking?

Hope this helps.

Cheers,

Gun.

Former Member
0 Kudos

Thank you but the CRM_CENTRALPERSON_GET has as import parameters

IV_PERSON_ID

IV_BU_PARTNER_GUID

IV_EMPLOYEE_ID

IV_USERNAME

Once I get the position Object ID (50000005 for example, from HRP1000), ¿what import parameter is the correct in order to excute it? I think this function is not the properly.

I think I'll try to use the HRP1000 HRP1001 combination in order to extract this information.

Regards and thank you so much

Former Member
0 Kudos

Hi Javier,

You cannot use CRM_CENTRALPERSON_GET if you use SHORT

field as key. I mean you can use SHORT field, then

search in HRP1000 to get the OTYPE and OBJID.

Then use this OTYPE and OBJID in other SAP function such

as PDV_GET_EMPLOYEE_OFSUBPROFILE to retrieve the list

of Employee / BP. (normally pass the parameter PLVAR = 01)

Hope this help to clear the understanding.

thx.

Cheers,

Gun.

Former Member
0 Kudos

Hi Javier,

You can use table HRP1000 to get a Org unit based on SHORT. If you want all the org units attached in the heirarchy, you can use Function RH_STRUC_GET with act_weigd = 'SAP_SORG'.

Example code:

SELECT SINGLE objid FROM hrp1000 INTO (i_objid)

WHERE short = i_orgdata.

IF sy-subrc EQ 0.

CALL FUNCTION 'RH_GET_ACTIVE_WF_PLVAR'

IMPORTING

act_plvar = lv_plvar

EXCEPTIONS

no_active_plvar = 1.

CALL FUNCTION 'RH_STRUC_GET'

EXPORTING

act_otype = 'O'

act_objid = i_objid

act_wegid = 'SAP_SORG'

  • ACT_INT_FLAG =

act_plvar = lv_plvar

act_begda = sy-datum

act_endda = sy-datum

act_tdepth = 0

act_tflag = 'X'

act_vflag = 'X'

authority_check = 'X'

  • TEXT_BUFFER_FILL =

  • BUFFER_MODE =

IMPORTING

act_plvar = lv_plvar

TABLES

result_tab = result_tab

result_objec = result_objec

result_struc = result_struc

EXCEPTIONS

no_plvar_found = 1

no_entry_found = 2

OTHERS = 3

This should give you the object ID's for all the nodes (organization, position and the holders like business partners assined to positions)

Result tab of the above function will look like this :

OT OBJID

O 50000063

O 50000064

S 50000065

O 50000072

S 50000073

CP 50000427

where O corresponds to org object, S-> position and CP-> central person number of business partner (note: when you assign business partner to the postion, it stores the person number of the partner). So you would need to use the function BP_CENTRALPERSON_GET with IV_person_id = central person number (50000427) to get the user Id or partner number

Hope this helps.

Chandrika

Former Member
0 Kudos

Hi brothers,

the personal number of the person sending the import function to bring a top manager will write about how I can do please help

-- veysi aslan

Answers (0)