cancel
Showing results for 
Search instead for 
Did you mean: 

Oranisational Management in HR

Former Member
0 Kudos

Hi Experts

I got problem with Oranisational Management Report . please can any one help me out.

I did taken conditions like this.

1 Unlinked Positions

select * from hrp1001 into corresponding fields of table itab where OTYPE = 'S'

and subty ne 'A003'

and sclas eq 'O'.

2 Unlinked Organastions units

select * from hrp1001 into corresponding fields of table itab where OTYPE = 'O'

and subty eq 'A002'

and sclas eq 'O' .

3 Objects with name changes

select * from hrp1001 into corresponding fields of table itab where OTYPE in ('S','P','O','K','C').

4 postions without jobs

select * from hrp1001 into corresponding fields of table itab where OTYPE = 'S'

and subty ne 'B007'

and sclas eq 'C'.

5 jobs without occ. categaries

select * from hrp1001 into corresponding fields of table itab where OTYPE = 'C'

and Infty ne '1633'.

*******

this what i took the conditions . its not pulling the all the data how does it work please help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Reddy,

1 Unlinked Positions

You need to first select all the positions. Then you should get the ones with relationship 'A003'. Then take the delta between two lists.

2 Unlinked Organastions units

You need to first select all the organizational units. Then you should get the ones with relationship 'A002'. Then take the delta between two lists.

3 Objects with name changes

Select all the objects from HRP1000 (this is where short/long texts are held) that have more than one record (meaning text change occurred)

4 postions without jobs

You need to first select all the positions. Then you should get the ones with relationship 'B007'. Then take the delta between two lists.

5 jobs without occ. categaries

You need to first select all the jobs. Then you should get the ones that have a record in HRP1633 (means "has occ. category"). Then take the delta between two lists.

Regards,

Dilek

Former Member
0 Kudos

how will u take the relation .let say for ex:

Unlinked Positions

OTYPE = 'S'

subty ne 'A003'

sclas = 'O'.(is this right)

Former Member
0 Kudos

First select all the positions as below:

Select objid from hrp1001 into itab where OTYPE = 'S'.

Then select all the positions that are linked:

Select objid from hrp1001 into itab1 where OTYPE = 'S'

and subty eq 'A003'.

Then find the difference between two internal tables:

loop at itab.

loop at itab1 where itab-objid eq itab1-objid.

delete itab.

endloop.

endloop.

The resulting records in itab are the positions that are not linked.

Regards,

Dilek

Former Member
0 Kudos

Thanks dilek

Almost i finished my program .

how do i take Org.Units without Chiefs (This one got managed and unmanaged)

Edited by: reddy on Oct 6, 2008 2:47 PM

Former Member
0 Kudos

First select all the org units as below:

Select objid from hrp1001 into itab where OTYPE = 'O'.

Then select all the org units which are managed :

Select objid from hrp1001 into itab1 where OTYPE = 'O'

and subty eq 'B012'.

Then find the difference between two internal tables:

loop at itab.

loop at itab1 where itab-objid eq itab1-objid.

delete itab.

endloop.

endloop.

The resulting records in itab are the org units not managed.

Regards,

Dilek

Former Member
0 Kudos

Hi Dilek

I got probelm with these buttons . I did what exactly u told me.

1.Jobs without Occ.categories

SELECT OBJID OTYPE sclas FROM hrp1001 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE OTYPE = 'C'.

SELECT OBJID OTYPE sclas FROM hrp1001 INTO CORRESPONDING FIELDS OF TABLE ITAB1 WHERE OTYPE = 'C'

AND Infty eq '1633'.

LOOP AT ITAB.

LOOP AT ITAB1 where OBJID EQ ITAB-OBJID.

DELETE ITAB.

ENDLOOP.

ENDLOOP.

sort ITAB by objid .

Delete adjacent duplicates from ITAB COMPARING OTYPE objid .

LOOP at itab .

select single * from hrp1000 where OTYPE = ITAB-OTYPE

AND objid = ITAB-objid

and stext <> ' '

.

IF sy-subrc = 0.

itab-stext = hrp1000-stext.

Endif.

Modify itab.

Endloop.

Its pulling the data but not correct Data.

2.Delimited Position Holder

SELECT OBJID OTYPE sclas FROM hrp1001 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE OTYPE = 'S'.

SELECT OBJID OTYPE sclas FROM hrp1001 INTO CORRESPONDING FIELDS OF TABLE ITAB1 WHERE OTYPE = 'S'

AND SUBTY EQ 'A008'.

LOOP AT ITAB.

LOOP AT ITAB1 where OBJID EQ ITAB-OBJID.

DELETE ITAB.

ENDLOOP.

ENDLOOP.

sort ITAB by objid .

Delete adjacent duplicates from ITAB COMPARING OTYPE objid .

LOOP at itab .

select single * from hrp1000 where OTYPE = ITAB-OTYPE

AND objid = ITAB-objid

and stext <> ' '

.

IF sy-subrc = 0.

itab-stext = hrp1000-stext.

Endif.

Modify itab.

Endloop.

its pulling the data but when the ending date is less than 31.12.9999 not pulling (It has to be ending date 31.12.9999)

3.Open positions not falged as vacant (condition must be S NE P NE 1007)

4 vacant filled positions . (Condition must be S EQ P EQ 1007)

(How can i take the conditions )

Please Help me .

Former Member
0 Kudos

Hi Please Please Help Me Dilek

Former Member
0 Kudos

hi Reddy,

1. Try with these modifications

SELECT OBJID OTYPE sclas FROM hrp1663 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE OTYPE = 'C'.

SELECT OBJID OTYPE sclas FROM hrp1001 INTO CORRESPONDING FIELDS OF TABLE ITAB1 WHERE OTYPE = 'C'.

LOOP AT ITAB.

LOOP AT ITAB1 where OBJID EQ ITAB-OBJID.

DELETE ITAB.

ENDLOOP.

ENDLOOP.

sort ITAB by objid .

Delete adjacent duplicates from ITAB COMPARING OTYPE objid .

LOOP at itab .

select single * from hrp1000 where OTYPE = ITAB-OTYPE

AND objid = ITAB-objid

and stext ' '

.

IF sy-subrc = 0.

itab-stext = hrp1000-stext.

Endif.

Modify itab.

Endloop.

2. Ending date '31.12.9999' means the active records. It is OK that it pulls the active records.

3&4 were not in your original message, were they?

Regards,

Dilek

Former Member
0 Kudos

Hi Dilek

I did check that condition . its not giving anyoutput but there is data(My functional guy created data to diaply the output) and other thing is there is no data from HRP1633 . i wasnt put these conditions in previous page . i thought i did. i am really really sorry

3.Open positions not falged as vacant (condition must be S NE P NE 1007)

4 .vacant filled positions . (Condition must be S EQ P EQ 1007)

(How can i take the conditions )