Headcount
Hi to all
I am working in a HR module's Personnnel Administration . I have a report based on a Headcount , so i am using Headcount and Personnel Actions (0PA_C01), so , for count the row wt ill use , should i use Keyfigure Head Couont FTE.
Please suggest me
thanks
Try using 0HDCNT_NC. This will provide you with the number of employees there are.
Regards,
Mark.
Similar Messages
-
HR Report in BI for Headcount Turnover & Retention Report
Hi Gurus,
I need to create HR Report in Bex Analyser. The report is "Headcount Turnover & retention Report".
Report columns are:
Cost Center name || Headcount as of 1/1/09 || Num of New Hires (YTD) || Number of Terms YTD || Num of terms that were active on 1/1/09 (YTD) || Turnover % || Retention %
Where Turnover % is calculated bydividing total terms over total current headcount.
Where Retention % is dividing the number of those termed YTD who were active on 1/1/09 those were active on 1/1/09.
Headcound = Active employees(1/1/1900 to 1/1/2009).
New Hires = Newly hired after 1/1/09
Terms = who leaves company after 1/1/09.
I Created four restricted keyfigures
1).Headcount as of 1/1/09 with ( Number of employess, Calander day (1/1/1900 - 1/1/1009), Employee status [ Active]).
2).Num of New Hires with (Number of Actions, Calander day (1/1/2009 - Current Calander day variable),
Action type [New Hire]).
3).Number of Terms with ( Number of Actions, Calander day (1/1/2009 - Current Calander day variable),
Action Reason [ Leaving]).
4).No.of terms that were active on 1/1/09 with (number of Actions, Calander day (1/1/09), Action Reason (Leaving), Action Type (Active)).
In my result it is displaying all as active employess and i didn't see any terms. For headcount it is displaying multiple times for one employee. One employee should have only 1 in every field. But each employee having like 9, 17, 25.....etc. I checked in BI side there in cube content each employee has '1' in all fields. I don't know why it is taking multiple times.
Please can any one help me on this. Sorry for such a very long mail.
Thanks,
Aparna.
Edited by: Aparna Pyeddu on Feb 10, 2009 2:57 PMAparna,
Good to see a HR question after a long time. There could be several things that could go wrong in this report.
First we will start with you did not see any terms:
Reason terms are based on Number of actions and Actions are generally on period end dates. If you 01/01/2009 is not a period end date you wont have any action on it and it will not display any terms. I would suggest to research in Master Data for 0Employee with any person you know for sure is terminated.
Second thing go back to business and ask if their retirement is to see terms on a particular date or Fiscal period end. (Terms are generally seen as in a Period range. eg from Period 01/2007 to 13/2007)
Based on your requirement it seems that you need YTD calculations. YTDs are not that straight forward with a single restricted key figure.YTD for Hires term and Actives are different animals. It would take a long answer to solve your problems.
Try these solutions even if yo do not get them. USE POSTING PERIOD and Fiscal Year instead of dates.
Headcount avg actives YTD: you want to get actives from 01/01/2009 to the period entered by the user. Say 05/2009
So what you want to is get actives as of 05/2009, 04/2009,03/2009, 02,2009 and 01/2009
and add them up and divide them by 5.
Terms YTD: Give a range: Period 1 to Period entered by user.
Hires YTD: Give a range: Period 1 to Period entered by user.
I know this not a straight forward and easy solution. but this is the way HR is. Let me know if you need further help.
~abhijit -
frnzz,
Is there a standard report to find out the headcount in an organisation?
Useful anwers will be rewarded.
thanx in advance
ViggyHi,
There are only following Std reports exist:
S_AHR_61016497 Existing Jobs
S_AHR_61016502 Existing Positions
S_AHR_61016503 Staff assignments.
See the Manning Level sample report:
report zporgr0040
line-size 108
line-count 60(1)
no standard page heading
message-id zndc.
Database Tables
tables: hrp1001, " HR Master Record (Orgn. Assignment)
pa0002, " Personal Data
t528t, " Position Texts
t527x, " Org Unit Text
t528b, " Positions
csks, " Cost Center
cskt. " Cost Center Texts
Declaration of Internal Tables
Internal Table for Orgn Object Data HRP1000
data: begin of obj_tab occurs 0,
otype like hrp1000-otype, " Object Type
objid like hrp1000-objid, " Object ID
plvar like hrp1000-plvar, " Plan Version
istat like hrp1000-istat, " Planning Status
begda like hrp1000-begda, " Begin date
endda like hrp1000-endda, " End date
end of obj_tab.
Internal Table for Active Employees data PA0000
data: begin of stat_tab occurs 0,
pernr like pa0000-pernr, " Object Type
begda like pa0000-begda, " Begin date
endda like pa0000-endda, " End date
stat2 like pa0000-stat2, " Employment Status
end of stat_tab.
Internal Table for Actual Orgn Assignment Data PA0001
data: begin of act_tab occurs 0,
pernr like pa0001-pernr, " Object Type
begda like pa0001-begda, " Begin date
endda like pa0001-endda, " End date
kostl like pa0001-kostl, " Cost Center
orgeh like pa0001-orgeh, " Org Unit
plans like pa0001-plans, " Position
natio like pa0002-natio, " Nationality
end of act_tab.
Internal Table for Orgn Data HRP1001
data: begin of org_tab occurs 0,
otype like hrp1001-otype, " Object Type
objid like hrp1001-objid, " Object ID
plvar like hrp1001-plvar, " Plan Version
istat like hrp1001-istat, " Planning Status
begda like hrp1001-begda, " Begin date
endda like hrp1001-endda, " End date
subty like hrp1001-subty, " Sub Type
sclas like hrp1001-sclas, " Type of Related Object
sobid like hrp1001-sobid, " Id of Related Object
kostl like pa0001-kostl, " Cost Center
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of org_tab.
Internal Table for Position Calculations
data: begin of org1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
objid like hrp1001-objid, " Object ID
end of org1_tab.
Internal Table for Position Calculations
data: begin of org2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count type i, " No of Positions
end of org2_tab.
Internal Table for Actual Manpower Calculations
data: begin of act1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
plans like pa0001-plans, " Position
end of act1_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act2_tab.
Internal Table for Actual Manpower Calculations(Others)
data: begin of act3_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act3_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act4_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count1 type i, " No of Positions(UAE)
end of act4_tab.
Internal Table for Actual Manpower Calculations(OTHERS)
data: begin of act5_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count2 type i, " No of Positions(Others)
end of act5_tab.
Internal Table for Vaccancies Data
data: begin of vac_tab occurs 0,
plvar like hrp1007-plvar, " Plan Version
otype like hrp1007-otype, " Object Type
objid like hrp1007-objid, " Object ID
istat like hrp1007-istat, " Planning Status
begda like hrp1007-begda, " Begin date
endda like hrp1007-endda, " End date
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
end of vac_tab.
Internal Table to store the Report Output data
data : begin of rep_tab occurs 0 ,
kostl(10) type n, " Cost Cente
plans like pa0001-plans, " Position
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of rep_tab.
Internal Table to store the Report Output data
data : begin of rep1_tab occurs 0 ,
kostl(10) type n, " Cost Cente
cnt type i, " No of Vacancies
end of rep1_tab.
Internal Table to store the Report Output data
data : begin of rep2_tab occurs 0 ,
kostl(10) type n, " Cost Cente
app_no type i, " Approved
nat_no type i, " National
exp_no type i, " Expatriate
tot_no type i, " Total
vac_no type i, " Vacancies
end of rep2_tab.
Declaration of Variables
data: v_sobid like hrp1001-sobid, " Object Id
v_sobid1 like hrp1001-sobid, " Object Id
v_sobid2 like hrp1001-sobid, " Object Id
v_sclas like hrp1001-sclas, " Related Obj Type
v_subty like hrp1001-subty, " Related Object Id
v_otype like hrp1007-otype, " Object Type
v_str(9) type c, " Text
v_str1(10) type c, " Text
v_cnt like sy-tabix. " Table Index
Declaration of Constants
constants : c_x type c value 'X', " Flag
c_stat1 like pa0000-stat2 value '3', " Emp Status
c_plan like hrp1001-plvar value '01', " Plan Version
c_name like hrp1000-uname value 'SAP', " Uname
c_uae like pa0002-natio value 'AE', " Country
c_type like hrp1007-otype value 'O', " Object Type
c_otype like hrp1007-otype value 'S', " Object Type
c_stat like hrp1007-status value '0', " Status
c_pstat like hrp1007-istat value '1', " Plang Status
c_sclas like hrp1001-sclas value 'K', " Rel. Obj Type
c_subty like hrp1001-subty value 'A002', " Related ObjId
c_subty2 like hrp1001-subty value 'A003', " Related ObjId
c_sclas1 like hrp1001-sclas value 'O', " Rel.Obj Type
c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
c_kokrs like coej-kokrs value '1000'. " Controlling Area
Selection Screen
selection-screen begin of block b1 with frame title text-001.
parameters :
p_date like pa0001-begda obligatory default sy-datum. " Date
select-options :
s_kostl for csks-kostl, " Cost Center
s_plans for t528b-plans. " Position ID
selection-screen end of block b1.
At selection-screen
at selection-screen.
Validate the Selection Screen fields
perform validate_screen.
Start-of-Selection
start-of-selection.
Get the Orgn data from database Table HRP1001
perform get_org_data.
Get the Actual Manpower from PA0001
perform get_act_data.
Get the Vaccancies data from database Table HRP1007
perform get_vac_data.
Append the data into final Internal Table
perform append_data.
Top-of-page
top-of-page.
Write the Report and Column Headings
perform top_of_page.
End-of-Page
end-of-page.
write /1(108) sy-uline.
End-of-Selection
end-of-selection.
Display the Output Report.
perform display_report.
Form-Routines
*& Form validate_screen
Validation of selection Screen fields
form validate_screen.
Validation of Position ID
clear t528b.
if not s_plans[] is initial.
select single plans
into t528b-plans
from t528b
where plans in s_plans.
if sy-subrc <> 0.
message e999 with 'Invalid Position ID'(009).
endif.
endif.
Validation of Cost Center
clear csks.
if not s_kostl[] is initial.
select single kostl
into csks-kostl
from csks
where kostl in s_kostl.
if sy-subrc <> 0.
message e999 with 'Invalid Cost Center'(008).
endif.
endif.
endform. "validate_screen
*& Form get_org_data
Get the Orgn Data from Database Table HRP1001
form get_org_data.
v_str = 'Developee'(002).
v_str1 = 'Deployment'(003).
Select All the Positions from HRP1000
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
into table obj_tab
from hrp1000
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
objid in s_plans and
uname ne c_name.
sort obj_tab by otype objid.
Get the Orgn and Cost Center for all the above Positions
if not obj_tab[] is initial.
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
subty " Sub Type
sclas " Type of Related Object
sobid " Id of Related Object
into table org_tab
from hrp1001
for all entries in obj_tab
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq c_sclas1 and
subty eq c_subty2 and
objid eq obj_tab-objid.
endif.
sort org_tab by otype objid.
Get the Cost Center
loop at org_tab.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
org_tab-kostl = hrp1001-sobid+0(10).
else.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
else.
v_otype = c_otype. " S
v_sclas = c_otype. " S
v_subty = c_subty. " A002
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
endif.
endif.
Get the Position Text
clear t528t.
select single plstx from t528t into t528t-plstx
where sprsl = sy-langu and
otype = c_otype and
plans = org_tab-objid.
org_tab-plstx = t528t-plstx.
Get the Org Unit Text
clear t527x.
select single orgtx from t527x into t527x-orgtx
where sprsl = sy-langu and
orgeh = org_tab-sobid+0(8).
org_tab-orgtx = t527x-orgtx.
modify org_tab index sy-tabix.
clear v_sobid.
endloop.
sort org_tab by otype objid.
Calculate the Approved No of Positions
loop at org_tab.
if org_tab-kostl in s_kostl.
move-corresponding org_tab to org1_tab.
append org1_tab.
clear org1_tab.
endif.
endloop.
sort org1_tab by kostl objid.
clear v_cnt.
loop at org1_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
org2_tab-kostl = org1_tab-kostl.
org2_tab-count = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append org2_tab.
clear:org2_tab.
endat.
endloop.
sort org2_tab by kostl.
endform. "get_org_data
*& Form get_act_data
Get the Actual Manpower Data from Database Table PA0001
form get_act_data.
clear : stat_tab, act_tab.
refresh: stat_tab, act_tab.
Get all the Active Employees
select pernr " Object Type
begda " Begin date
endda " End date
stat2 " Emp Status
into table stat_tab
from pa0000
where stat2 eq c_stat1 and
begda le p_date and
endda ge p_date.
sort act_tab by pernr.
if not stat_tab[] is initial.
select pernr " Object Type
begda " Begin date
endda " End date
kostl " Cost Center
orgeh " Org Unit
plans " Position
into table act_tab
from pa0001
for all entries in stat_tab
where pernr eq stat_tab-pernr and
kostl in s_kostl and
plans in s_plans and
persg eq '1' and
begda le p_date and
endda ge p_date.
endif.
sort act_tab by pernr.
loop at act_tab.
move-corresponding act_tab to act1_tab.
clear pa0002-natio.
select single natio into pa0002-natio from pa0002
where pernr = act_tab-pernr.
if sy-subrc = 0.
act1_tab-natio = pa0002-natio.
endif.
append act1_tab.
clear act1_tab.
endloop.
sort act1_tab by kostl natio.
Calculate the Local and Expatriate Manpower
loop at act1_tab.
if act1_tab-natio = c_uae.
act2_tab-kostl = act1_tab-kostl.
act2_tab-natio = act1_tab-natio.
else.
act3_tab-kostl = act1_tab-kostl.
act3_tab-natio = act1_tab-natio.
endif.
append: act2_tab, act3_tab.
clear : act2_tab,act3_tab.
endloop.
sort act2_tab by kostl.
sort act3_tab by kostl.
Actual UAE Manpower
clear v_cnt.
loop at act2_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act4_tab-kostl = act2_tab-kostl.
act4_tab-count1 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act4_tab.
clear:act4_tab.
endat.
endloop.
sort act4_tab by kostl.
Other Countries
clear v_cnt.
loop at act3_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act5_tab-kostl = act3_tab-kostl.
act5_tab-count2 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act5_tab.
clear:act5_tab.
endat.
endloop.
sort act5_tab by kostl.
endform. "get_act_data
*& Form get_org
Get the Cost Center from Parent Org Id
form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
clear hrp1001.
select single * from hrp1001
where otype = p_v_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq p_v_sclas and
subty eq p_v_subty and
objid eq p_v_sobid.
v_sobid = hrp1001-sobid+0(8).
endform. " get_org
*& Form get_vac_data
Get the Vaccancies Data from Database Table HRP1007
form get_vac_data.
if not org_tab[] is initial.
select plvar " Plan Version
otype " Object Type
objid " Object ID
istat " Planning Status
begda " Begin date
endda " End date
vacan " Vacancy Indicator
status " Status of Vacancy
into table vac_tab
from hrp1007
for all entries in org_tab
where plvar = c_plan and
otype = c_otype and
istat eq c_pstat and
objid = org_tab-objid and
begda le p_date and
endda ge p_date and
vacan eq c_x and
status eq c_stat.
endif.
sort vac_tab by plvar otype objid.
Get the HR data into the rep_tab Internal Table
loop at vac_tab.
rep_tab-plans = vac_tab-objid.
rep_tab-vacan = vac_tab-vacan.
rep_tab-status = vac_tab-status.
read table org_tab with key objid = vac_tab-objid.
if sy-subrc = 0.
rep_tab-kostl = org_tab-kostl.
rep_tab-plstx = org_tab-plstx.
rep_tab-orgtx = org_tab-orgtx.
endif.
append rep_tab.
clear rep_tab.
endloop.
loop at rep_tab.
if not rep_tab-kostl in s_kostl.
delete rep_tab index sy-tabix.
endif.
endloop.
sort rep_tab by kostl plans.
delete rep_tab where plstx cs v_str.
delete rep_tab where orgtx cs v_str1.
Calculate the Count of Vacancies in each Division
clear v_cnt.
loop at rep_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
rep1_tab-kostl = rep_tab-kostl.
rep1_tab-cnt = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append rep1_tab.
clear:rep1_tab.
endat.
endloop.
sort rep1_tab by kostl.
endform. "get_vac_data
*& Form append_data
Append the data into final Internal Table
form append_data.
loop at org2_tab.
rep2_tab-kostl = org2_tab-kostl.
rep2_tab-app_no = org2_tab-count.
read table act4_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-nat_no = act4_tab-count1.
endif.
read table act5_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-exp_no = act5_tab-count2.
endif.
read table rep1_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-vac_no = rep1_tab-cnt.
endif.
rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
append rep2_tab.
clear rep2_tab.
endloop.
sort rep2_tab by kostl.
endform. "append_data
*& Form top_of_page
Write the Report and Column Headings
form top_of_page.
skip.
format color col_heading on.
write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
/1(108) 'Summary of Manning Level Report'(011) centered.
format color off.
skip.
write: /2 'Key Date :'(013), p_date,
75 'Report Run Date:'(041), sy-datum.
if not s_kostl[] is initial.
if s_kostl-high is initial.
write: /2 'Cost Center :'(023), s_kostl-low,
75 'Time :'(042), sy-uzeit.
else.
write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
'To'(022), s_kostl-high,
75 'Time :'(042), sy-uzeit.
endif.
else.
write: /75 'Time :'(042), sy-uzeit.
endif.
if not s_plans[] is initial.
if s_plans-high is initial.
write: /2 'Position Id :'(019), s_plans-low,
75 'User :'(043), sy-uname.
else.
write: /2 'Position Id From:'(021), s_plans-low,
'To'(022), s_plans-high,
75 'User :'(043), sy-uname.
endif.
else.
write: /75 'User :'(043), sy-uname.
endif.
write: /75 'Page No :'(044), sy-pagno.
skip.
write /1(108) sy-uline.
format color col_heading.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(32) 'Actual'(018) centered,
97 sy-vline,108 sy-vline.
write:/1 sy-vline, 2(10) 'CostCenter'(014),
12 sy-vline, 13(40) 'Description'(026) centered,
53 sy-vline, 54(10) 'Approved'(025) centered,
64 sy-vline, 65(32) sy-uline,
97 sy-vline, 98(10) 'Vacancies'(017),
108 sy-vline.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(10) 'National'(015) centered,
75 sy-vline, 76(10) 'Expatriate'(020) centered,
86 sy-vline, 87(10) 'Total'(016) centered,
97 sy-vline,108 sy-vline.
format color off.
write /1(108) sy-uline.
endform. "top_of_page
*& Form Display_report
Write the Report Output
form display_report.
if rep2_tab[] is initial.
message i999 with
'No Data found for the entered Selection'(035).
else.
loop at rep2_tab.
Authorization Check for the Orgn and Cost Centers
perform auth_check_org.
if sy-subrc = 0.
clear cskt.
select single ltext into cskt-ltext from cskt
where spras = sy-langu and
kokrs = c_kokrs and
kostl = rep2_tab-kostl.
format color col_normal.
write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
12 sy-vline, 13(40) cskt-ltext,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
at last.
sum.
format color 3.
write /1(108) sy-uline.
write: /1 sy-vline, 2(10) 'Total'(027),
12 sy-vline,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
endat.
endif.
endloop.
endif.
write /1(108) sy-uline.
endform. " Display_report
*& Form auth_check_org
Authorization Check for the Orgn and Cost Center
form auth_check_org.
authority-check object 'ZNDCHROM'
id 'PLVAR' dummy
id 'OTYPE' dummy
id 'KOSTL' field rep2_tab-kostl.
endform. "auth_check_org
reward if useful
regards,
ANJI -
OM - Issue with Employee Headcount Report
Hi All
While making a selection of org units in Employee Headcount Report its been noticed that some org units and getting selected and some are not and during selection of required org units there are few org units which are appearing as related object index and some as non related object index
Could someone let me know what is a Related and Non Related Index of a Org UnitI checked the report, and it certainly returns incorrect data, I found exactly what you say regarding active/inactive persons.
What is SAP's reason for not looking into this? It would be interesting to hear their argumentation for this not being a bug.
It may be that SAP expects RHSTRU00 to be called only for active persons? This would require running another report first to get the input for RHSTRU00. This seems like a strange prerequisite for the program, and I do not understand why SAP don't see this as a bug. The error seems rather obvious and reproducable.
I often find that I have to push to get passed first line of support to have SAP see the problem. It is tiring, but I have found this to be the fact far too often.
PS - we never use the program like this, so we do not face the problem ourselves.
/Kirsten -
Opening And Closing month Headcount
Hi All,
We have situation where the users want to know the evolution in headcount9increase or decrease) from month to month.
In other words, calculate the difference between the « closing of current month » « the closing of previous month » . We need to report « Closing period of Previous Month », as OPENING in the row of Current Month. and calculate the Evolution using the above formula
The logic here is that the opening month headcount is equal to the closing headcount of previous month.
The report output shd be as below
Calendar Year/Month Closing Opening evol
01.2007 100
02.2007 200 100 100
03.2007 300 200 100
04.2007 500 300 200
Please help me out solve this scenario.
Thanks in Advance,
Regards,
NPRThere's actually an example of this in the business content in the 0papa_c02 cube:
Re: Head Count
There's also some info about this cube in note 336229.
Similarly, for your data, you might have something like this:
headcount_vc is the change in headcount on the calday.
empno Location calday headcount_vc
123 USA 11/3/2008 1
345 Mexico 14/4/2008 1
376 USA 12/2/2008 1
123 USA 12/9/2008 -1
345 Mexico 13/11/2008 -1
There would be another key figure in the cube headcount_nc which is the cumulation of headcount_vc.
When aggregated together up to a certian day, you will have the correct headcount.
It can get fancier if need be for example if you want a count of retired employees or something:
Anything you want counts by should be time dependant though.
empno Location calday headcount_vc status
123 USA 11/3/2008 1 active
345 Mexico 14/4/2008 1 active
376 USA 12/2/2008 1 active
123 USA 12/9/2008 -1 active
345 Mexico 13/11/2008 -1 active
123 USA 12/9/2008 1 retired
345 Mexico 13/11/2008 1 retired -
How to Get Supervisor Id In Headcount Report
Hi Experts,
I am working On Headcount Reports.
I need to get the Supervisor Id to my Report.
By Using HRP1001 am getting the Supervisor ID
by Passing S to OTYPE,
Position to OBJID.
002 to RELAT.
My Problem is If the Supervisor record gets Deleted from the Database(when he/she resigns),we need to Get the Immediate Supervisor to Supervisor Id.
will it be automatically Updated in the Infotypes or we need to Implement any logic.
Your Suggestions will be highly Appreciated.
Thanks,
-Vijayhi vijay try the below code,
and one thing to tell you if approver resigns it means tht person assigned to tht position had left but tht position exists so u need to check if the approver position is empty or assigned,if empty then u can find out the approver's manager from tht position and then find the person (top approver) assigned to tht position.
Please change or code the IF-Else condition accordingly,it wil serve ur purpose -
DATA: ls_sobid TYPE sobid, "approver's position
ls_sobid1 TYPE sobid, "will contain PErnr of approver
ls_sobid2 TYPE sobid, "approver's manager position
ls_sobid3 TYPE sobid. "will contain pernr of approver's manager
data: i_plans like pa0001-plans.
i_plans = '50019473'.
SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid
WHERE otype = 'S'
and plvar = '01'
AND objid = i_plans
AND endda >= sy-datum
AND begda <= sy-datum
AND rsign = 'A'
AND relat = '002'.
IF sy-subrc NE 0.
message e000(000) with 'no approver'.
else.
SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid1
WHERE otype = 'S' "position
AND plvar = '01'
AND objid = ls_sobid
AND endda >= sy-datum
AND begda <= sy-datum
AND rsign = 'A'
AND relat = '008'.
if sy-subrc ne 0.
SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid2
WHERE otype = 'S'
and plvar = '01'
AND objid = ls_sobid
AND endda >= sy-datum
AND begda <= sy-datum
AND rsign = 'A'
AND relat = '002'.
SELECT SINGLE sobid FROM hrp1001 INTO ls_sobid3
WHERE otype = 'S' "position
AND plvar = '01'
AND objid = ls_sobid2
AND endda >= sy-datum
AND begda <= sy-datum
AND rsign = 'A'
AND relat = '008'.
endif.
ENDIF.
write: 'Approver',ls_sobid1,' ','Approver Manager',ls_sobid3. -
Help in getting Headcount for a month from a flatfile
Hi All,
I am need one help regarding i need to load data from a flat file like for eg
empno Location joiningdate releivingdate
123 USA 11/3/2008 12/9/2008
345 Mexico 14/4/2008 13/11/2008
376 USA 12/2/2008 Null
and the condition is if the releving date have some value it should taken employee left the company
i need to create a cube and also on top of the cube need to create a report also
in the query the formula is
for eg if the user is giving i/p like 05.2008( what ever the user is giving i/p it should automatically taken from current finanacial year ie april)
and in the report i need to write a formula for
%YTD for attrition =( (opening headcount of april 1st+ closing heda count of april end)/2 +opening head count on may 1st + closing head count of may end/2))/n*100
i am getting stuk up with how to get the opening headcount for month and also the closing head count for a month.
VRThere's actually an example of this in the business content in the 0papa_c02 cube:
Re: Head Count
There's also some info about this cube in note 336229.
Similarly, for your data, you might have something like this:
headcount_vc is the change in headcount on the calday.
empno Location calday headcount_vc
123 USA 11/3/2008 1
345 Mexico 14/4/2008 1
376 USA 12/2/2008 1
123 USA 12/9/2008 -1
345 Mexico 13/11/2008 -1
There would be another key figure in the cube headcount_nc which is the cumulation of headcount_vc.
When aggregated together up to a certian day, you will have the correct headcount.
It can get fancier if need be for example if you want a count of retired employees or something:
Anything you want counts by should be time dependant though.
empno Location calday headcount_vc status
123 USA 11/3/2008 1 active
345 Mexico 14/4/2008 1 active
376 USA 12/2/2008 1 active
123 USA 12/9/2008 -1 active
345 Mexico 13/11/2008 -1 active
123 USA 12/9/2008 1 retired
345 Mexico 13/11/2008 1 retired -
Hi all,
I'm looking for a report where we can do a headcount based on organizational unit.
The client has a 'special' requirement :
when an employee works for two business units (e.g. 40 % for R|D and 60% for operations), this has to be shown in the result.
I'm not sure if there exists a standard report on this ?
kind regards,hi,
We can define the percentage in the T-code PP02 or PO13 where in the IT1001 and subtype A008.
Please check.
Thanks,
Vasu. -
Personnel Cost Planning - Projecting Headcount changes
Hello,
I'm implementing PA-CP and am coming up with options for the client to project headcount changes for next years budget. They currently use a spreadsheet approach and will, for example, forecast that cost centre xxxx requires 5 positions at level 10 ($100k *5 = $500k), 3 positions at level 8 ($50k 3=$150k) and they will lose 2 positions at Level 12 ($200k2=$400k) for a net effect of an increase of $250k.
Infotype 1019 seems to be one option but I"m not really familiar with it and the company is not great at maintaining their Jobs and associated IT1005. Could I also provide a direct cost item that they can just plug in the amounts? Any other suggestions?
Thanks for any help you can provide.
Alex
Edited by: abcnck on Feb 23, 2011 3:37 AMHi Alex,
Is this problem got solved. If it is can you please post the answer for this as i amlearning this topic.
Vijay. -
IDoc error in posting salaried headcount IDoc type is ACC_STAT_KEY_FIG
Hello Experts,
We created an Idoc for uploading headcount from peoplesoft to SAP. When we tried to post the statistical key figures, it gave a message "XXXX doesnt exist in the controlling are ABC". we edited the document and mapped it to existing SKF. When we try to post it, the status is 51 with the message "Multiple posting of same key figure to one object is redundant". Please help in how to correct this error.
I have a suspicion that the statistical key figure is parked somewhere. If so Please help me try to retrieve that
Thanks a lot
PCwhat is message number and ID ?
-
Hello experts,
I have to count employees who worked at least one day in a year.
I don't know how to do this because if I display the year, the report counts only employee who worked the entire year.
I'm new on the HR reporting and the headcount cube behavior is a little strange for me.
If you have any ideas it will be great !
PS : Sadly I'm using BW 3.1...
Regards,
- Benjamin Barbaray -Hi Ravi,
I found an interesting read on this report. Sharing link with you. Hope this will help!!!
http://scn.sap.com/community/erp/hcm/blog/2013/04/04/headcount-reporting-as-easy-as-one-two-three
Regards,
Jitendra -
HR Headcount and Personnel Actions(0PA_C01) std routines not working
Hi Friends,
I have loaded data for Headcount and Personnel Actions(0PA_C01) cube. Here the fields below mentioned are not populating data which are with standard routines. I checked code and also gone through sdn and also with SAP notes but every thing ok.
We are working with support package 16.
0AGE,
0AGE_RANGE,
0GT_PLAND(country key),
0COUNTRY_CODE,
0GENDER,
0NATION,
0PERSLANGU,
0POSTAL_CD(Postalcode),
0REGION,
0MAST_CCTR,
0CNTRCTTYPE(Contract Type),
0PAYPCT_CHA(Capacity Utilization level in %),
0HDCNT_FTE(Head Count FTE).
Can u please give me your views to populate data to the above mentioned fields.
Here 0GENDER,0NATION,0PERSLANGU,0POSTAL_CD(Postalcode),0REGION are attribute of 0PERSON and in turn is an attribute of 0EMPLOYEE. I can able to see data individually from both 0PERSON and 0EMPLOYEE. but i want to see data attribute data of 0PERSON in 0EMPLOYEE.
Is it possible? If possible Can you please Explain me?
Regards,
SridharAdjusted transfer rules, so now standard routines are correctly populating fields.
I have doubt on two fields of cube,
keyfigures: capacity utilization level
head count FTE which is (capacity utilization level / 100)
Is capacity utilization level field in BI is equivalent to R/3 Staffing Percentage field ?
(The staffing percentage indicates which percentage of an employee's time is to be spent in the position entered). If not what field in R/3 is equivalent to capacity utilization level .
Regards,
Sridhar -
Hi Experts,
We are consolidating our system and looking for optimal ways to identify the correct headcounts.
SAP provides standard reports S_PH9_46000219 for headcount. Can someone help me in identifying what is considered as a headcount from SAP standard point of view. I know different organizations may have different criteria for calculating headcount but I'm primarily interested in standard behavior. Accordingly we will decide if we can make use of this standard report.
Thanks & Regard,
RaviHi Ravi,
I found an interesting read on this report. Sharing link with you. Hope this will help!!!
http://scn.sap.com/community/erp/hcm/blog/2013/04/04/headcount-reporting-as-easy-as-one-two-three
Regards,
Jitendra -
HR Report to display headcount up to 10 levels of Org Units
Hi Experts,
Can you please give steps for the following requirement.Is there any standards available.Please explain the procedure to create report.
Points will be awarded fot the suitable solutions.
The report shouldl query SAP for the number of employees based on the personnel area and sub area. The main reporting is based on the sub area. If the employee is in the India Pers Area the total number of employees from each sub area will have to be deducted from the headcount for that sub area and added to the India area for headcount totaling. For each of the areas/subareas we need to gather the total number of Active Employees, Temp Employees and Contractors. This information can be gathered from the employee group.
i/p filed available table
Key Date
Employment Status PA0000
Personnel Area PA0001
Personnel Sub Area PA0001
Employee Group PA0001
Employee Subgroup PA0001
C stands for column C2 c3 c4 will be filled by users after running report.
c1 c2 c3 c4 c5 c6
SEIM 70 9 4 Pers Sub Area - FIN
NGUYEN 25 0 1 Pers Sub Area - MKT
LUHR 120 3 4 Pers Sub Area - SLS
DREW 532 78 2 Pers Sub Area u2013 OPS
CHOMA 35 2 6 Pers Sub Area u2013 ODLP
LIPPS 3 0 0 Pers Sub Area - GAA
INDIA 79 0 0 Pers Area - IND
TOTAL 864 92 17 0
Thanks and Regards,
RajIf you want to read the org unit hierarchy from the org structure, tables HRP1001 and HRP1000 should
have all the information you need. HRP1001 hold the relationships between the org structure objects
and HRP1000 holds information about each object.
If you don't want to do the selects yourself, there is a very useful function module called
RH_STRUC_GET which does the same sort of thing ie reads the relationships between org structure objects
using whatever evaluation path you pass in in parameter ACT_WEGID.. -
Hi,
We have a requirement in HR analytics. monthly snapshot table will take future headcount in a month based on effective start date but if users running report today report should only show headcount where hire date<sysdate.
ex: previous month head count =100
this month company hiring two employee where emp1 joined may 10 and emp2 will join on may 25
OOTB report will show headcount=100+2=102
users expecting headcount=100+1=101(because emp2 not yet joined)
how can I fix this problem in informatica mapping. I need to customize mapping with above logic. any idea?
Thanks
Jay.The monthly snapshot calculation is based on the start dates and this is calculated in the PLP process. The best option may be to get a more granular report that uses the HR_WRKFCT_EVT_F table and not the MONTH snapshot. You may have to edit the report so that you are querying the base fact versus the month table. Hope this helps.
-
Dear Experts,
We are working on BI 7.0 Ehp1 system. Our system SP levels are as below:
SAP_ABA 701 0006 SAPKA70106 Cross-Application Component
SAP_BASIS 701 0006 SAPKB70106 SAP Basis Component
PI_BASIS 701 0006 SAPK-70106INPIBASIS Basis Plug-In
ST-PI 2008_1_700 0004 SAPKITLRD4 SAP Solution Tools Plug-In
SAP_BW 701 0006 SAPKW70106 SAP Business Warehouse
BI_CONT 705 0002 SAPK-70502INBICONT BI_CONT 705: Add-On Installation
ST-A/PI 01N_700BCO 0000 - Servicetools for other App./Netweaver 04
However, I don't find 0HR_PA_PA_1 (Headcount) listed when I searched DataSources in Business Content of our BW System. I have been through a lot of threads on the forum and noticed most of the threads are fairly old. Not quite sure if to believe those versions.
When I checked with one of my friends who is on a lesser SP levels of BCT (BI_CONT 705 0001 SAPK-70501INBICONT BI_CONT 705: Add-On Installation) as compared to us, he is able to see the same DataSource listed in his BCT which is a BI 7.0 system too.
I want to use this DataSource to load 0PAPA_C02 by sourcing data from BW Development and also pulling some data from 2 other DSOs.
However, my current challenge is to get this DataSource in our BI 7.0 System.
I am not sure what could have gone wrong. Any help is very much appreciated.
Thanks,
ChanduHI ,
This is a Old Datasource , and it requires some manual customisation , refer the SAP note below
Note 336229 - Use of InfoCube 0PAPA_C02/InfoSource 0HR_PA_PA_1
Symptom
You want to use InfoCube 'Headcount' (0PAPA_C02) and the corresponding InfoSource 'Headcount' (0HR_PA_PA_1).
Even though you transferred the data from the Business Content, the transfer rules are not complete for the InfoSource, or DataSource 0HR_PA_PA_1 does not exist or is not complete.
Other terms
Headcount, BW, OLTP, HR, extraction, non-cumulatives, SBIW, Business Content, activation, transfer
Reason and Prerequisites
The use of this content requires some manual advance activities.
Solution
Extraction of master data in the BW System as transaction data InfoSource:
InfoSource 0HR_PA_PA_1 is supplied by DataSource 0HR_PA_PA_1, which only exists in a BW System.The corresponding extractor reads the master data tables for InfoObjects Employee (0EMPLOYEE) and Person (0PERSON) and provides changes to these time-dependent attributes as non-cumulative value change.
The DataSource supports the 'Full Update' mode only. Extraction in delta mode would not reduce the extraction time since the determination of the delta needs extreme effort with this DataSource. For this reason, the delta mode was not implemented.
Note that the system only provides changes of person attributes if also employee master data exists for this person.
Do the following steps in your BW System:
1. Transfer the Business Content in the Administrator Workbench:
Choose InfoCube 'Headcount' (0PAPA_C02), collect all objects with grouping 'Data flow before and after' and copy them from the Business Content afterwards.
Check whether key figures 0ANSAL_NC / 0ANSAL_VC, 0HDFTE_NC / 0HDFTE_VC and 0HDCNT_NC / 0HDCNT_VC were activated in the process.In addition, InfoCube 0PAPA_C02 itself, InfoSource 0HR_PA_PA_1 and the respective update rules should be active.
2. Customizing of DataSource 0HR_PA_PA_1:
The following step is relevant to BW 2.1C only:
Because the extractor for this DataSource requires the activation of certain InfoObjects (and thus the existence of these data elements), the extractor can only be delivered in modules which must be activated manually.For this purpose, you must make modifications at two locations in function group RS_BCT_PA_EXTRACTION (removal of the respective comment characters for the activation of the Includes):
1. LRS_BCT_PA_EXTRACTIONTOP:old: * INCLUDE rs_bct_pa_extraction_top.new: INCLUDE rs_bct_pa_extraction_top.
2. RS_BCT_PA_GET_DATA:
old: * INCLUDE rs_bct_pa_get_data.new: INCLUDE rs_bct_pa_get_data.
In BW 3.0A, this is carried out automatically when activating the DataSource. As of BW 3.0A Patch 7 and BW 3.0B, this step is obsolete since programs are generated instead.
BW IMG (Transaction SBIW): Transfer of DataSource 0HR_PA_PA_1 (Application component DM)
Postprocess DataSource 0HR_PA_PA_1:
Add the following fields to the extract structure (Customer-Append ZARSBCTPA_0HR_PA_PA_1 to extract structure RSBCTPA_0HR_PA_PA_1):
Component Component type
EMPLOYEE /BI0/OIEMPLOYEE
CURRENCY /BI0/OICURRENCY
EMPLGROUP /BI0/OIEMPLGROUP
EMPLSGROUP /BI0/OIEMPLSGROUP
EMPLSTATUS /BI0/OIEMPLSTATUS
HRPOSITION /BI0/OIHRPOSITION
JOB /BI0/OIJOB
ORGUNIT /BI0/OIORGUNIT
PAYRL_AREA /BI0/OIPAYRL_AREA
PAYSCALEAR /BI0/OIPAYSCALEAR
ESGFORCAP /BI0/OIESGFORCAP
PAYSCALEGR /BI0/OIPAYSCALEGR
PAYSCALELV /BI0/OIPAYSCALELV
PAYSCALETY /BI0/OIPAYSCALETY
PERS_AREA /BI0/OIPERS_AREA
PERS_SAREA /BI0/OIPERS_SAREA
MAST_CCTR /BI0/OIMAST_CCTR
CO_MST_AR /BI0/OICO_MST_AR
COMP_CODE /BI0/OICOMP_CODE
COUNTRY_ID /BI0/OICOUNTRY_ID
ENTRYDATE /BI0/OIENTRYDATE
SALARYAR /BI0/OISALARYAR
SALARYGR /BI0/OISALARYGR
SALARYLV /BI0/OISALARYLV
SALARYTY /BI0/OISALARYTY
PERSON /BI0/OIPERSON
DATEBIRTH /BI0/OIDATEBIRTH
GENDER /BI0/OIGENDER
NATION /BI0/OINATION
PERSLANGU /BI0/OIPERSLANGU
COUNTRY /BI0/OICOUNTRY
COUNTY_CDE /BI0/OICOUNTY_CDE
POSTAL_CD /BI0/OIPOSTAL_CD
REGION /BI0/OIREGION
HDCNT /BI0/OIHDCNT_VC
ANSALARY /BI0/OIANSAL_VC
PAYPCT /BI0/OIHDFTE_VC
Enter the names of the fields exactly as listed in the note. Ignore messages of type:
'Field EMPLOYEE is not within the customer namespace.'
If you extended 0EMPLOYEE or 0PERSON by user-specific attributes, you can also include them in the extract structure or in the InfoSource and the InfoCube.Until further notice, SAP recommends that you only include new characteristics and no key figures.
Check marks have to be removed for all new fields in the 'Hide field' column (Transaction RSA6 for application component BW-DM). You can only use fields EMPLOYEE and CALDAY as selection fields.
3. Replicate DataSource 0HR_PA_PA_1 in the Administrator Workbench / Source systems (your BW System as a source) - application component personnel admistration (PA-PA), and assign the DataSource to InfoSource 0HR_PA_PA_1.
Special features of InfoCube 'Headcount' (0PAPA_C02):
Compounding of InfoObjects and source systems is not supported.
First, execute the attribute change run in order to take into account master data which have already been loaded into the BW System but not yet activated.
For technical reasons (Non-cumulative method), the age or seniority fields cannot be supplied directly from the InfoSource.They must be modelled as virtual key figures and characteristics. The corresponding logic for these fields is not delivered until BW 3.0A.
All attributes of 0PERSON and 0EMPLOYEE must be time-dependent.
Maintenance of the validity slice (Transaction RSDV) for InfoCube 0PAPA_C02 after the first load of data:to-mode 'Fixed value' and '31.12.9998' as a date
Regards,
Sathya
Maybe you are looking for
-
Open document opens new Window in IE which is in front, then back, front
Hello we have here the following Situation. We have a big XI 3.1 Business Objects Platform running. Also we have in our company net a portal in which the users can open reports from our BO platform. This is done by usercustomized open document urls.
-
hey i dropped my phone in water and then i dried it with a blow dryer put it in rice blah blah blah. then it turned on a seems to work fine except when i use the keypad only the number symbol comes up or a square. like no numbers or letters come up.
-
Hi everybody, today my boss asked me if there is a generic approval app in Fiori. I replied that there are several apps available to approve different requests: Approve Leave Requests Approve Travel Requests Approve Travel Expenses Approve Timesheets
-
To Update the ibase STATUS PROFILE
Hi All, Which function module should be used to update the ibase STATUS PROFILE ? Thanks, Vimal
-
I have set up a real basic configuration with a verver on port 80 pointing to a serverfarm with two servers. I have no sticky enabled and no persistent rebalance on the vserver. If I go to the URL that points to the VIP the connection is made with th