Read the Org Model
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.
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
Similar Messages
-
How do I read the camera model and manufacturer from IMAQ in LabVIEW?
Hello All,
I have a machine vision application for automated test. I am required to save the image for each test for quality purposes. Since LabVIEW interfaces the CameraLink camera thru the IMAQ driver, various cameras can be used without changing the LabVIEW application. I need to store the basic configuration information, including camera model and manufacturer, with the image. I am able to read some parameters from IMAQ (like bit allocation and shutter speed) using the Read Attribute VI, but unable to read model and manufacturer.
Does anyone know how to read camera make/model from IMAQ in LabVIEW?With this VI, any camera attribute that you can see and set in MAX, you should be able to see and set in LabVIEW. These are attributes that are defined in you camera file. Since Model/Make is not an "attribute" that you necessarily set, it is not included in your attributes tab in MAX.
If your camera file included a model attribute, then it would show up in MAX under attributes and you would be able to read it using the above-mentioned VI. The only thing I can suggest is perhaps use some File I/O instead of IMAQ VI's and read your camera file, if the ones you have are consistent in structure.
Hope this helps!
Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system. -
Any FM or BAPI to Read the Org Stucture ?
Hi Experts,
Is there any FM / BAPI to retrieve the Organization structure of given User , Specially the details of the Company Code (Like Company code that he is Assigned to ),
Thanks In Advance
Badari patilAll of OM will come with this Code !
TYPES: tt_hrp1001 TYPE STANDARD TABLE OF hrp1001 INITIAL SIZE 0.
DATA: it_hrp1001 TYPE tt_hrp1001.
TYPES: BEGIN OF t_orgdisplay,
level(40) TYPE c,
id type i,
parent type i,
objid TYPE hrp1001-objid,
orgtx TYPE string,
begda TYPE hrp1001-begda,
endda TYPE hrp1001-endda,
display type string,
END OF t_orgdisplay.
DATA: it_orgdisplay TYPE STANDARD TABLE OF t_orgdisplay,
wa_orgdisplay TYPE t_orgdisplay.
DATA: wa_hrp1001 LIKE LINE OF it_hrp1001,
wa_objid TYPE hrp1001-objid ,
wa_objid1 TYPE hrp1001-objid,
wa_objid2 TYPE hrp1001-objid,
wa_objid3 TYPE hrp1001-objid,
wa_objid4 TYPE hrp1001-objid,
wa_objid5 TYPE hrp1001-objid,
wa_objid6 TYPE hrp1001-objid,
gd_branchid type i,
gd_parent1 type i,
gd_parent2 type i,
gd_parent3 type i,
gd_parent4 type i,
gd_parent5 type i,
gd_parent6 type i,
gd_parent7 type i.
SELECT *
FROM hrp1001
* up to 500 rows
INTO TABLE it_hrp1001
WHERE otype = 'O' AND
plvar = '01' AND
rsign = 'B' AND
( relat = '002' OR
relat = '003' ) AND
begda LE sy-datum AND
endda GE sy-datum.
clear: gd_branchid.
*level 1
gd_parent1 = 0.
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = '50006550'.
wa_objid = wa_hrp1001-varyf+2(8).
wa_objid = '50006550'.
wa_orgdisplay-level(2) = wa_orgdisplay-level(2) + 1.
perform append_org_data using gd_branchid gd_parent1.
gd_parent2 = gd_branchid.
* WRITE:/ 'level1'.
* level 2
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid
AND varyf(1) = 'O'.
wa_objid1 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+2(2) = wa_orgdisplay-level+2(2) + 1.
perform append_org_data using gd_branchid gd_parent2.
gd_parent3 = gd_branchid.
* WRITE:/ 'level2'.
* level 3
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid1
AND varyf(1) = 'O'.
wa_objid2 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+4(2) = wa_orgdisplay-level+4(2) + 1.
perform append_org_data using gd_branchid gd_parent3.
gd_parent4 = gd_branchid.
* WRITE:/ 'level3:', wa_objid2 .
* level4
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid2
AND varyf(1) = 'O'.
wa_objid3 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+6(2) = wa_orgdisplay-level+6(2) + 1.
perform append_org_data using gd_branchid gd_parent4.
gd_parent5 = gd_branchid.
* WRITE:/ 'level4:', wa_objid3.
* level5
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid3
AND varyf(1) = 'O'.
wa_objid4 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+8(2) = wa_orgdisplay-level+8(2) + 1.
perform append_org_data using gd_branchid gd_parent5.
gd_parent6 = gd_branchid.
* WRITE:/ 'level5:', wa_objid4.
* level6
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid4
AND varyf(1) = 'O'.
wa_objid5 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+10(2) = wa_orgdisplay-level+10(2) + 1.
perform append_org_data using gd_branchid gd_parent6.
gd_parent7 = gd_branchid.
* WRITE:/ 'level6:', wa_objid5.
* level7
LOOP AT it_hrp1001 INTO wa_hrp1001 WHERE objid = wa_objid5
AND varyf(1) = 'O'.
wa_objid6 = wa_hrp1001-varyf+2(8).
wa_orgdisplay-level+12(2) = wa_orgdisplay-level+12(2) + 1.
perform append_org_data using gd_branchid gd_parent7.
* WRITE:/ 'level6:', wa_objid6.
ENDLOOP.
CLEAR: wa_orgdisplay-level+12(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level+10(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level+8(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level+6(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level+4(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level+2(2).
ENDLOOP.
CLEAR: wa_orgdisplay-level(2).
export it_orgdisplay to memory id 'ZORGSTRUCT'.
DATA A LIKE TABLE OF it_orgdisplay .
IMPORT A FROM MEMORY ID 'ZORGSTRUCT'.
BREAK-POINT.
*& Form append_org_data
* text
* --> p1 text
* <-- p2 text
form append_org_data using p_id
p_parent.
gd_branchid = gd_branchid + 1.
wa_orgdisplay-objid = wa_hrp1001-varyf+2(8).
wa_orgdisplay-begda = wa_hrp1001-begda.
wa_orgdisplay-endda = wa_hrp1001-endda.
wa_orgdisplay-id = p_id.
wa_orgdisplay-parent = p_parent.
if wa_orgdisplay-level+2 is initial.
wa_orgdisplay-display = 'TOP'.
endif.
* Retrieve Org. Unit text
* 50006550
PERFORM get_org_unit USING wa_orgdisplay-objid
wa_hrp1001-begda
wa_hrp1001-endda
CHANGING wa_orgdisplay-orgtx.
translate wa_orgdisplay-orgtx using ''' '.
if wa_orgdisplay-orgtx is initial.
wa_orgdisplay-orgtx = 'Text unavailable'.
endif.
APPEND wa_orgdisplay TO it_orgdisplay.
clear: wa_orgdisplay-display.
endform. " append_org_data
*& Form get_org_unit
* Retrieve Org. Unit text
FORM get_org_unit USING p_orgeh
p_begda
p_endda
CHANGING p_orgtx.
DATA: orgeh_short(12) TYPE c,
orgeh_stext(40) TYPE c,
read_return TYPE i.
* Returns full orgunit text, entry in table t527x is sometimes
* truncated so that it fits into a 25 character field
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
EXPORTING
otype = 'O'
* otype = ot_orgunit
objid = p_orgeh "p0001-orgeh
begda = p_begda "p0001-begda
endda = p_endda "p0001-endda
reference_date = p_begda "p0001-begda
IMPORTING
short_text = orgeh_short
object_text = orgeh_stext
return = read_return
EXCEPTIONS
nothing_found = 1
wrong_objecttype = 2
missing_costcenter_data = 3
missing_object_id = 4
OTHERS = 5.
IF sy-subrc EQ 0.
p_orgtx = orgeh_stext.
ELSE.
* If function module fails return text from text table
SELECT SINGLE orgtx
FROM t527x
INTO p_orgtx
WHERE orgeh EQ p_orgeh AND "Replace with org. unit field
sprsl EQ sy-langu AND
( endda GE sy-datum AND
begda LE sy-datum ).
ENDIF.
ENDFORM. " get_org_unit -
FM to simulate the org model determination - sales group and sales office
Hi
I am looking for a FM to get the organization profile details which on sales order Organization tab.
I want to pass BP# and order type as input and get the sales group, sales office.
I tried using 'CRM_ORDER_MAINTAIN'' but with no luck. (May be I am not using it correctly )
Please suggest any a way to achieve this .
Thanks in advance
SwapnilHi Swapnil,
U can Simulate in the orgdata rule itself from the following path mentioned below--
SproCRM-Master Data-Organizational Management----Organizational Determination-
Change rules and profiles.
Enter the Rule -ORGMAN_14 and click on display-
Click on simulate rule resolution icon next to Change icon
mention the Partner number and click on execute test icon or F8. You will get the list of sales office and
sales groups. you will also get the FM details in the rule itself. Revert me for any other clarifications.
Regards
Pavan.A -
Where would I find concise help info on the organisation model. I am particularly interested on the way it should be shaped.
Kindly advise and oblige.
Regards,
TariqFine, I get your point, I am partocularly keen to know about the following issues:
1. The validity dates for the org model. How and when should it be used. Every time I view it, I see it as valide from the current date to 3 month.
2. The principle to be followed in its creation should be what? I understand it as:
a. The sales org unit should be at par with my Sales Org and / or a sales office -- i dont find the
division being mentioned....Am I mistaken anywhere? (The division is made as "active")
b. The position, as in General manager / Manager, forms below the sales org unit. If I have to
maintain two positions for one org unit. Position wise they are GM's but pertain to two different
grouping e.g. sales division. How would I go about it? Creating two different positions, say GM_1
and GM_2 where the suffixes 1 and 2 denote the different divisions or is there any other way out.
3. I understand I can maintain several 'versions' of the org, model. If I can have a few tips on this too.
For the moment this could quench my thirst for info on the org model. Rest later as I 'digest' more..!!
Thanks in advance. -
Changing The Validity Dates In Org Model in CRM- User Level
Hi
How can we restrict the Validity Dates in Organisation Structure at User Level.
I need that the user should be given some specific dates<b> ( Valid till or assigned till )</b> while assigning in the org. And it should be visible always in the Org Model.
We tried using Delimited Date Function, but the User gets ellapsed if the Validity is expired.With the business point of view, <b>the requirement is that all user should be listed in Org model with respect to any dates.this would mean that if a user is terminated we would want to change the Valid till date in the Org</b>Hi Amrita,
Business partner number and Object ID is automatically determines by system when creating a org unit.
I dont find any configuration to create org unit with your own BP number and object ID. You have option to make repairs to the existing org unit.
Please find the below path to repair the org unit
IMG -> CRM -> Master Data -> Business partner -> Integration Business partner -Org management -> Create Business partner initially
Select the org unit and execute to get all the org units.
You can select the org units with errors /warnings and click on start repair to get automatic assignment of BP.
Hope it helps
Reward points if it helps
Regards,
Madhu -
HI GUYS,
In the Org model in CRM the person who worked before me assigned user record to the positon.He did not assign employee record to the position. Hence when I am updating the employee records in R/3 they are not getting updated in the ORG Model.
SO is there a way so that we can change user records to the employee records for all the positions in ORG MODELHi Zack,
I don't know there is an automated way of doing this. But the manual way is to go to ORG model transaction PPOMA_CRM and search for your root org unit. You can search by description. And then go to each position and place the cursor on user record and right mouse button, click delete assignment. This will delete the user assignment. In order to add the business partner (employee) place the cursor on position and say Assign-> Owner Business partner. In the dialog box you can either enter the user ID or business partner number if you know that.
In order to assign the employee ID, you need to first create a business partner employee role and assign the user ID in the identification tab
Sorry, I don't know if there is an easy way to assign all the employees at once unless you write a program for it.
Hope this helps! -
Hi,
we defined the org model.Now we need to down load the data(users, employess etc) from flat file and assign them to org model.what are the bapi/function modules.what is the way.
thanks
krishnaHi,
easiest way that I know is standard HRMD idoc integration. These idocs are used to transfer the data from HR to CRM, but you call fill them yourself & post then to CRM to upload data in the org model.
Michael. -
Org Model determination for BP
Dear SAP experts,
We are using SAP CRM 7.0 and want to apply the Org Model determination by creating a new BP in WEB UI.
As we defined a Rule in PFAC (based on POSTCODE_1 and COUNTRY), is it possible to "execute" this rule by using a standard Function Module or Class Method?
The scenario is quite simple:
- The Country/Postcode attributes are defined for the Org Unit
- A Custom Rule is defined
While creating a BP (on SAVE) a Function Module will be called:
Thiis function should read the custom rule and its associated attributes,
then read the corrispondent values (Postcode/Country) of the Business Partner
and apply the determination based on the custom rule.
The result would be the associated Org. Unit.
Pratically is what the "Simulate" button does in the PFAC transaction.
Any idea if there is already standard FMs to achieve this?
Best Regards
DiegoHi Denis,
I would say, yes, we plan to activate the buffering.
Once more, I´m looking for a clean way to:
1.Reading Container Attributes (COUNTRY/POSTCODE_1) of a Determination Rule (ZRule)
maybe RH_GET_HRS_CONTAINER
2.According to the attributes (for example COUNTRY) prepare a WHERE condition
3.Determine the attributes values for a BP (executing the query with the the WHERE condition above)
4.Execute the Rule (SALE scenario) to determine the Sales Group
CRM_ORGMAN_ORGOBJECTS_FIND_1
5.Check the Org Model Hierarchy to read the Sales Org / Sales Office associated to the Sales Group.
Any help is welcome
Diego -
Predefault Account based on Org Model
Hello,
we would like to achieve that the account is predefaulted for new transactions based on the users position in the org.model.
How could we achieve this?
We thought of using organizational attributes for this.
Thanks in advanceYou can use organizational model to set the info in the system, but I think there is no sap predelivered logic to populate account (if you are refering to customer) according to org. model according to your needs. But you can use badi or event to achive your requirements. To use badi, go to spro>crm>basic functions>partner processing>business add-in for partner. there do the desired coding. And after that set that badi is called in your partner determination procedure.
-
Hello Guys,
I am trying to create one org structure....(testing)
I am in attributes tab... I am not able to c D.channel and division..... do i need to make some setting to have them here???? there is not even a chance to selct themm.... can any1 help???
thanks in advance..
Regards,
Lata
Message was edited by:
latha reddyHI,
This flag can be set if an attribute can only be maintained using a special program rather than manually.So be care ful while the indicators are checked.
Also check whether the values are maintained in the SPRO
Path:CRM-Master Data-Org Mgmnt-Division settings
CRM-Master Data-Org data for sales scenario-Define distibution channels
If values are maintained .Some time you will not be able to see immediately then
run the report 'HRBCI_ATTRIBUTES_BUFFER_UPDATE' so that the divisions and Distribution channels can be seen in the org model.
Regards,
Satish. -
1. We created the org model in CRM 5.0. But, the client changed there mind and want to use R/3 as the system of record and want to use ALE distribution for copying the initial and delta changes of the org model from R/3 to CMR. My question is what are the implications of turning the ALE distribution ON after the CRM 5.0 org model is already in place? Or is there a way to get rid of the CRM 5.0 org model and then just run the ALE distribution?
2. Can additional attributes be assigned to the org model in R/3, e.g. Transaction type or would this additional data need to be maintained directly in CRM?
3. Are there effective dates in the org model in R/3?
Thanks for your help.Sir,
Thanks for the information. My doubt is whether is it possible to replicate the same to ECC or vice verse i.e can you assign sub group to Sales group and replicate to CRM as it is?
Also I need more understanding of what you have suggested: "*If you want to buidl some logic also on those, one possible way would be to read relationships between then. For example you would read the linked org.unit to sales group org. unit. And then it would be up to the coding, what you want to do with it." -
Hai Michael Van Geet and Swathi,
I wnat to transfer the org model from one crm client to other crm client(dev to production).As you said Org model is msater data and it is possible to extract HRMD_ABA idocs and import to prod client.
how to extract HRMD
_ABA idcos and how to import into new production system.
Could you tell me the path(or procedure) how to get those idocs and how to import it in new client. I am new to CRM field, pls help me out in this regard.
Thnaks
BhushanHello Bhushan,
go to se38 in your crm system and read the documentation of program RHALEINI.
Regards,
Frédéric -
Hi Experts
I need to do the following in CRM
1. Create Positions in the Org model
2. Relate Org Units to positions
3. Relate Central Persons to Positions and BP to positions
4. Assign users to existing BOs
So, we have tried LSMW with recordings using PP01 and PP02 but do not like this approach
We have also enabled some BAPIs but again we are not programmers so can't debug them!
We would like to do this through iDocs (called from Data Services)
I do not know what iDocs to use to do the above. Can anyone help?
Much appreciated!!
Greg HeathI just discovered a part of the problem. In CRM the relationship between the organisation unit and its business partner gets deleted if it already exists. On next update a new business partner is created, because there is no business partner assigned to the organisation unit yet.
It would be interesting to know why the relationship is deleted. Also I am not sure that it happens to all organisation units. Furthermore the same problem exists for persons. -
BP not able assign in Org Model
Hi Gurus,
Can you please suggest what all needs to be configured to assign the BP in Org Model. I am able to assign the user there but not the Org Model. I had the done necessary setting in IMG > Master Data> Set Up Integration with Organizational Management
Apart from this what else need to be done.
Regards
Arun KumarHi Arun,
Can you please explain your query more in detail.
What I understand is you are not able to assign Owner i.e buisness partner to your position in the organization model?
Check if these settings are proper in Set Up Integration with Organizational Management
BUPA SYNC ON BP: Integration (ON / OFF / CREATE)
CPERS EEALE X Employee data is read using ALE
CPERS PROLE BUP003 Role of employee for business partner
HRALX HRAC X Activate HR Integration
HRALX MERID X Enter Integration Error in IDOC
HRALX MSGRE 0 Recipient of Error Message When Creating BP
HRALX OADBP Business Partner of Standard Address
HRALX OADRE Address Necessary for Business Partner?
HRALX OBPON ON Integration O-BP Activated
HRALX OBWIG X Ignore Business Partner Warnings
HRALX ONUMB 1 Business Partner Number Assignment (Org. Unit)
HRALX OSUBG Business Partner Subgroup (Organizational Unit)
HRALX PALEO Log: Organizational Units in ALE
HRALX PALEP Log: Employees in ALE
HRALX PBPHR ON Employees Are Replicated from HR System
HRALX PCATS Integration P-BP for CATS Activated
HRALX PINAC Activate ALE Distribution of Inactive Employees
HRALX PLEVE 3 Log: Detail Level of Error Messages (1 - 5)
HRALX PNUMB 1 Business Partner Number Assignment (Employee)
HRALX PQUAL Import Qualifications
HRALX PRTON Log Active
HRALX PSUBG Business Partner Subgroup (Employees)
HRALX PSYNO Log: Organizational Units in Dialog
HRALX PSYNP Log: Employees in Dialog
HRALX HRAC X Activate HR Integration
HRALX MERID X Enter Integration Error in IDOC
HRALX MSGRE 0 Recipient of Error Message When Creating BP
HRALX OADBP Business Partner of Standard Address
HRALX OADRE Address Necessary for Business Partner?
HRALX OBPON ON Integration O-BP Activated
HRALX OBWIG X Ignore Business Partner Warnings
HRALX ONUMB 1 Business Partner Number Assignment (Org. Unit)
HRALX OSUBG Business Partner Subgroup (Organizational Unit)
HRALX PALEO Log: Organizational Units in ALE
HRALX PALEP Log: Employees in ALE
HRALX PBPHR ON Employees Are Replicated from HR System
HRALX PCATS Integration P-BP for CATS Activated
HRALX PINAC Activate ALE Distribution of Inactive Employees
HRALX PLEVE 3 Log: Detail Level of Error Messages (1 - 5)
HRALX PNUMB 1 Business Partner Number Assignment (Employee)
HRALX PQUAL Import Qualifications
HRALX PRTON Log Active
HRALX PSUBG Business Partner Subgroup (Employees)
HRALX PSYNO Log: Organizational Units in Dialog
HRALX PSYNP Log: Employees in Dialog
Regards,
Shalini Chauhan
Maybe you are looking for
-
I can't open iTunes on a lenovo with a Windows 8.1 operating system. I get the following message... The iTunes Library Extras.itdb file is locked, on a locked disk, or you do not have write permission for this file. PLEASE HELP!!
-
Need disk 2 of Creative Suite 4 Web Premium
So, my laptop crashed and I needed to re-install Windows 7 and all of my software including CS4-Web Premium. I put in disk one and entered my code, no problem. Install started up. A few minutes later, it asked for disk 2. I put it in and nothing. Dri
-
When creating a new iCal event, after its title, the TAB key takes to the field "location" (logical, OK). The next TAB key goes to the "minutes" in the starting date field (illogical, not OK). From that field, hitting the TAB key takes, again to the
-
Hello, I am interested in determining the queries( P/S Query) that use a specific field in the select clause, where clause or group by clause. The field may have been used as a expression or directly. I have been playing around with the PSQRY% tables
-
Fft spectrum (mag-phase).vi: dependencies
Dear, I'm having trouble using FFT Spectrum vi's. When I'm trying to add them to my vi, I get a 'Add to Project and Update Dependencies' error (see attached). I can use the VI though. Each time I open the project I keep getting the window to resolve