Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Zone and region fields ???

Former Member
0 Likes
4,733

Hi all,

I am preparing a report for the salary of the employee, based on selection screen parameters (Org. Unit) -pa0001-orgeh.

Zone , and Region

But can someone tell where are these fields zone and region stored in the database???

LIke if we see pp61, and click on f4 help for the org. unit, then it shows a hierarchy, firstly is the zone and its corresponding id(orgeh) and then the region and its corressponding id(orgeh) and then the branch and its id(pa0001-orgeh).

Hope you understood my query.

Any help would be appreciated.

Regards

Tarun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,536

Hi,

Well not sure I understood properly... You seem to use the organisational structure search, don't you? In this view, what you see on each level is org. units with their description stored on infotype 1000... The different levels come from the relationships between units.

in PP61, with F4 you probably got Org1->Org2->Org3->... and each level correspond to an org. unit... I cannot see any "zone" or "region" there?

Sorry if I'm aside please clarify a bit...

In infotype 0006 however, you can find the region and district of an employee... While the address of the org.unit itself is stored in infotype 1028.

Kr,

Manu.

Edited by: Manu D'Haeyer on Dec 29, 2011 1:57 PM

Hi all,

I am preparing a report for the salary of the employee, based on selection screen parameters (Org. Unit) -pa0001-orgeh.

Zone , and Region

But can someone tell where are these fields zone and region stored in the database???

LIke if we see pp61, and click on f4 help for the org. unit, then it shows a hierarchy, firstly is the zone and its corresponding id(orgeh) and then the region and its corressponding id(orgeh) and then the branch and its id(pa0001-orgeh).

Hope you understood my query.

Any help would be appreciated.

Regards

Tarun

30 REPLIES 30
Read only

Former Member
0 Likes
4,537

Hi,

Well not sure I understood properly... You seem to use the organisational structure search, don't you? In this view, what you see on each level is org. units with their description stored on infotype 1000... The different levels come from the relationships between units.

in PP61, with F4 you probably got Org1->Org2->Org3->... and each level correspond to an org. unit... I cannot see any "zone" or "region" there?

Sorry if I'm aside please clarify a bit...

In infotype 0006 however, you can find the region and district of an employee... While the address of the org.unit itself is stored in infotype 1028.

Kr,

Manu.

Edited by: Manu D'Haeyer on Dec 29, 2011 1:57 PM

Read only

0 Likes
4,536

ya u are right, when u do f4 in pp61 on org. unit, then the org1 is the zone, org2 is the region, and org3 is the branch(pa0001-orgeh).

Now i am having also org1 , and org2 on my selection screen , but i don't know, in which infotype they are stored.

Although I researched that t-code S_AHR_61016493 shows the org. data , but still i couldn't find the database fields associated with org1 , and org2 by debugging the programs associated with this t-code.

Any help would be appreciated.

Read only

0 Likes
4,536

I checked out 0006, that seem to be the address details of the employees personal info. But org1 and org2 are the info about his working details i guess.

And 1028, the client is not maintaining addresses in them.

Any other idea?????

Read only

0 Likes
4,536

All those "org" are stored in table HRP1000. The relationships between them are stored in table HRP1001...

Kr,

Manu.

Read only

0 Likes
4,536

Hi Manu,

I checked out those tables, i could not locate the exact fields and how the relationship is maintained, can u just help out a bit in this .

Regards

Tarun

Read only

0 Likes
4,536

Well, all org units objects are stored in HRP1000 under field OBJID for the object type (OTYPE) "O", their description (what you see in the F4 on PP61 comes from the fields SHORT and STEXT)

The relations between two HR objects (here org units) are stored in HRP1001.

e.g. if you find org1(zone)->org2(region)->org3(whatever), you should have at least the following entries in HRP1001:

OTYPE OBJID RELAT SCLAS SOBID RSIGN

-


O ID(org1) 002 O ID(org2) B (top/down)

O ID(org2) 002 O ID(org3) B (top/down)

as well as the reversed relation:

OTYPE OBJID RELAT SCLAS SOBID RSIGN

-


O ID(org2) 002 O ID(org1) A (Bottom/up)

O ID(org3) 002 O ID(org2) A (Bottom/up)

If the PA-OM integration is activated on your system, as soon as an org unit is also linked to a person, via a job e.g. (O->S->P relations maintained in HRP1001), then that org unit will be automatically transferred to PA under PA0001-orgeh...

Hope this is a bit more clear...

Manu.

Read only

0 Likes
4,536

I am clear with the relations. But a little confused how i will fetch the data.

Suppose i have a parameter as org1(zone) and org2(region) and org3(pa0001-orgeh), then how will i try to implement them from the select query,

please help out somewhat if possible.

Regards

Tarun

Read only

0 Likes
4,536

Going in the hierarchy with SELECT statements will be a nightmare... I would suggest to use the FM RHPH_STRUCTURE_READ then... Just pass org1 as OBJID parameter, and use a evaluation path that will go down in hierachy for you (such as "O-O",...).

All the org units data you need should be returned in STRU_TAB table...

Read only

0 Likes
4,536

As hrp1000 and hrp1001 are not having any field which can make a relation with pernr , so suppose if on the selection screen

I give the org1(zone) and the date for which the salary slip is required, and the pernr,

then how will i make a where query on this??????????????

Read only

0 Likes
4,536

Umm...please make it a more specific to my latest post about the selections screen parameters i have, and then how will i use the fm and then relate the selection of data from pa0001 and pa0008 and also hrp1000.

I am finding it a little confusing.

Read only

0 Likes
4,536

If you want to have all employee belonging to a certain org unit (zone or whatever), that you should still use the FM above and use an evaluation path that will go down to the P object (= employee, also found in HRP1001). You could use the standard path "O-S-P" for example....

Evaluation path are maintained through transaction OOAW.

Read only

0 Likes
4,536

Ok I got the fact, and tested this fm, it will work if all employees are needed.

But in case if only some employees are needed , then in that case i didn't get how to do??

You could use the standard path "O-S-P" for example....

Evaluation path are maintained through transaction OOAW.

What is the meaning of these lines? Please specify in detail????

Read only

0 Likes
4,536

The problem is that I don't know how relationships between your object are done in your system (I mean, e.g what is the relation between "zone" and "region"? Maybe it's a custom relation?) If your system is using only standard relation, then for a given zone (1st parameter), I would call the FM with evaluation path O-S-P. Afterwards if your second parameter is set (region), you can simply loop on the result tab until you find that org unit (region), then the records after will concern position (object S) that you can ignore, and employee (object P belonging to the zone/region)... With those PERNR, you can read PA infotypes and get your result....

If you are not used with evaluation path or HR programming I would most of all suggest you try testing that FM and carfully read the documentation about it... Hard to explain in a couple of words, you should first be familiar with the concept. Also you have to know all the relations (field RELAT in HRP1001) between your organisation objets, so that you can use/build the evaluation path you need...

Cheers,

Manu.

Read only

0 Likes
4,536

I am not very much familiar, but I can understand your concept.

I can make the org1 field compulsory, so i can use that fm. I will properly find out the relations (relat) in hrp1000 and hrp1001.

What are object S and Object P you are talking about???

When I execute that fm, i don't get any object p or object s.

So how i will use that object p that you are talking about???

Please specify where is that object p and object s??

And what is full form of O-S-P ????

Read only

0 Likes
4,536

You could use the standard path "O-S-P" for example....

Evaluation path are maintained through transaction OOAW.

What is the meaning of these lines? Please specify in detail????

Sorry mate but you seem to not even know the basic of HR programming... I cannot explain everything about HR, this would take a year!

If you google this, you will have plenty of definition and usage of HR stuff... Evaluation path is one of those important thing to know. They are use to navigate through HR objects (e.g. finding people belonging to an org unit, ...)

All organisation objects ( an org.unit, a position, a job, a person, a cost center, a training course, .....) are maintained in OM module of HR. Those objects are linked all together trough relationships (HRP1001), if you have, let's say O(org)->S(position)->P(employee) relations defined in HRP1001, you can use the evaluation path "O-S-P" with the FM and you will get all employee with their position that are belonging to the org unit specified. I cannot be more clear... but I know, if you are not familiar with this, this can be very unclear.... Don't you have access to some training HR material? it is really quite specific...

cheers,

m.

Read only

0 Likes
4,536

I hope u can guess my situation. What you think how many days it should take me if i work hard, to make this program?????

Just some guess please

Read only

0 Likes
4,536

And what is full form of O-S-P ????

This is the full form, try passing that value to the parameter WEGID of the FM: "O-S-P" without the quote... you should also get S objects (position of the employee within org) and P objects (corresponding to PERNR field in PA infotypes)

Read only

0 Likes
4,536

I can get you, so by using that O-S-P path and , that single fm, can solve all my problem, u want to say like that????

if the o-s-p is mainatined in hrp1001, then that single fm can do the trick , by also passing the o-s-p path???

Read only

0 Likes
4,536

Oh yes, i am getting it now.

What I have to pass in plvar(plan version) in the fm????

Read only

0 Likes
4,536

I hope u can guess my situation. What you think how many days it should take me if i work hard, to make this program?????

Just some guess please

lol I'm sure you can do it quite quickly!

the problem is that the programming in HR can sometimes be so confusing... you could also work that out with only select statement on HRP1000/1001 tables but this is not to advice...

Check this:

1) Look for the zone existence in HRP1000

2) Zone found, look for the region existence in HRP1000

3) region found, check if region is belonging to zone in HRP1001 (you have to know the relation between them, '002' in standard)

4) relation found between org1 and org2, check that relation exists between org2 and org3 (employee org unit) in HRP1001

5) relation found between org2 and org3, search for relations between org3 and S objects (relation '008' in standard)

6) one or more positions found, search for employee assigned to those positions (= the relation between S objects found at previous step and P objects in HRP1001).

7) with the bunch of P objects found (=PERNR), go to PA0006/0008/whatever to fetch the employee data...

Read only

0 Likes
4,536

What I have to pass in plvar(plan version) in the fm????

Usually only '01' plan is maintained (= active plan)...

Read only

0 Likes
4,536

Manu thanks a might lot, now that has made it crystal clear:)

So what you recomment now, shall I use select queries?? Or shall I use the fm, and then got down by check in the structure data received from the fm and get the required data and relate it to infotypes..???

Q1 . Which is the easy way?

Q2. Which is the recommended way??

Read only

0 Likes
4,536

So shall I hardcode the plan version value to '01'????

Read only

0 Likes
4,536

if you don't mind, can I have you added you in my friend list, i won't disturb you much.

<< request for private information removed >>

Edited by: Rob Burbank on Jan 1, 2012 2:22 PM

Read only

0 Likes
4,536

Why do we require the reverse relation of rsign type 'A', what is the use of that?

Read only

0 Likes
4,536

What is sclas in hrp1001 field for??? Should it be 'O' for all, shall I use all these 6 fields, in the select query , if i chose to solve my problem by select queries???

Read only

0 Likes
4,536

Q1 . Which is the easy way?

Q2. Which is the recommended way??

Q1. FM! (for an HR developer however)

Q2. FM!

So shall I hardcode the plan version value to '01'????

Of course not For that you can call the FM RH_GET_PLVAR, which will return the active plan variant...

Read only

0 Likes
4,536

Why do we require the reverse relation of rsign type 'A', what is the use of that?

So that all HR objects are linked in both way... depending on your reporting need you could start looking at org. structure from the bottom (e.g. from employee point of view) or top (Org. unit point of view)....

E.g, if you want to find the position of a given employee, better use the relation P->S (bottom up) than O->S->P (top bottom)since positon is not known...

What is sclas in hrp1001 field for??? Should it be 'O' for all, shall I use all these 6 fields, in the select query , if i chose to solve my problem by select queries???

Well why not just looking at his description ("Type of related object")....

Object O can be linked to another object O (then OTYPE = "O" and sclas = "O") -> this is the case of your zone/region...

But object O can be linked to an object S (position) (so OTYPE = "O" and SCLAS = "S") ....

to summary:

- SCLAS has the same meaning than OTYPE but for the linked object

- SOBID has the same meaning that OBJID but for the linked object

Let's say you want to check if relation exists between zone and region:

SELECT count(*) FROM HRP1001

WHERE OTYPE = 'O'

AND OBJID = ID(Region)

AND PLVAR = '01'

AND SUBTY = 'B0002' "(= concatenation of RSIGN and RELAT)

AND ISTAT = '1' "Active

AND SCLAS = 'O'

AND SOBID = ID(region).

cheers, I need to go now

Read only

0 Likes
4,536

Ya i understood the code for checking relation between zone and region, but I want to know, why u used fields 'subty' and 'istat'. Wasn't it possible without these 2 fields????

And do i need to implement this query to check relation between zone and region in my problem ????

Read only

0 Likes
4,536

How please tell how do I put the values of zone, region F4 help on the selection screen?