Org management reporting
Hi All,
What can be the reporting or approval issues(considering workflow also) at root org unit which is without having a company code?
Regards,
RK.
Hi Yadav,
I would suggest you browse through the reports available in the "Information Systems" in Human Resources node in SAP Easy Access.
SAP provides standard reports for numerous common requirements.
Also, basically all relationship are stored in a table HRP1001.
Every relationship between organizational objects is referred to by a relationship ID (WEGID). E.g. if you want to find the reporting manager for an employee the WEGID would be 'A002' i.e. reports to.
You can access HRP1001 using the org. object and WEGID using function module RH_STRUC_GET
Hence you can build a simple report of your own for the requirement.
Cheers,
Aditya
Edited by: Aditya Laud on Jun 22, 2008 12:48 AM
Similar Messages
-
Trouble generating Org Managment Report
When I want to send to the workplace an org management report generated with the transaction S_AHR_61016494 the positions are visualized by characters like \n.
Has anybody know how to fix it?
Thanks in advance,I have gone back through and scoured the code.
Here is what I am finding. If I take out the option for either/or completely and specify 'xls' only, it works fine.
When I put back in the option of either PDF or Excel, it forces a PDF no matter what I select.
Any suggestions are greatly appreciated!
--KWien -
Org Management Reports.
Hello All,
We recently upgraded from 4.6c to ECC5.0. After the upgrade when we execute reports in Org Management like S_AHR_61016494 or any other reports, the reports changed a lot ( Layout ) the data is fine. In our previous version we are able to see many options and also we can save the report as a local file from the menu path system -> List -> Save -> Local File or any other options.
But in our upgraded system there is no option like this and many others. We can not even right click on any object and edit it, we used to do that.
Can someone explain if this has been changed like this or is this some problem with us.
Its not authorization problem as I have my profile copied over from old system to the new one.
Thanks a lot for your inputs!
Chakri.Hi Chakri,
Agree with you. Some workarounds :
- To click and edit an object : Click the object, then goto Edit -> Maintain trans.
- To save to a file :
- Right mouse click at the header of the report and select "Export to Microsoft Excel". Mine encounter an error when exporting to Excel.
- Alternatively, run the report in the background. Then use sm37 to retrieve the
spool file. When you view this spool file, you are able to save via List -> Save ->
Local File.
Hope it helps. Thanks.
Regards
Kir Chern -
Relation ships in Org management
Hi Every one,
My first question is regarding maintaing org management relation ships .How we maintain relation ships between persons(s) in development system coz there will be no data available in development system.????
My second question is ,For example I created org unit A ,Org Unit B ,i assigned a position sr clerk to org unit A and sr Clerk to Org unit B. .Now my question is position in org unit B should reports to position in org unit A..and .how their relation ships are maintained????Hi,
1. I think u got the solution for the first one from amit,
2. This can be done using expert mode.kindly do the senario which u told and create relationship as u told which is possible here.
kindly check out and let me know if u have any concern.
Asha -
Default Relationships in Org Management
Hello All...
I am having a big issue with the defaults of Org Management relationships. For some reason, our installation does NOT allow me to automatically create positions dependent on other positions...like 'is supervised by' relationship between positions. I have tried creating manually, and have checked the IMG for 'allowed relationships' and it shows that a position to position relationship of 'is supervisor of' is available. Any and all help much appreciated...I can't figure out how to automatically do this.
Thanks,
HopeHope,
In the ECC6 system I am working with at the moment, it doesn't work that way either. In PPOME I can create a new position from an Org Unit, but not from another position.
Must admit, I have never tried to do that in this or older releases before though. We tend to mostly use Chief positions, so any new positions are just created in the Org Unit and automatically report to the Chief.
I did notice that if I created a new position in PPOME then added the "Reports To" relationship manually (via Go To > Detail object > Enhanced object description), any copies of the positon that I subsequently made in PPOME also got the same "Reports To" relationship created automatically.
Regards,
John -
Org Management programing Material
Hi,
Can any one pls send me the document on reporting in Org Management.
Thankyou.Hi
see the sample code using Orgn management infotypes like HRP1000 etc
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
Also
Check this link : http://www.sapdevelopment.co.uk/hr/hrhome.htm.
Reward points if found helpful
Cheers,
Chandra Sekhar. -
Sample code for Org Management
Hi,
I am new to Org Management coding in HR ABAP.
Can anybody post some simple sample code for Org. Management so that I can understand the flow of coding..
Thanks and Regards,
RamHi
see the sample code using Orgn management infotypes like HRP1000 etc
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
<b>Reward points for useful Answers</b>
Regards
Anji -
Good day Kiran Kandepalli and Others.
I have successfully executed the background jobs -
Full User, Role, Profile Synchronization & a
Full Batch Risk Analysis
When I run the Management Reports I receive the following error -
Error while executing the Job:Cannot assign an empty string to host variable 10.
Has anybody had this error message before?
When I check table VIRSA_CC_PRMVL, variable 10 is set to No in Nullable collumn.Hi Sahad,
Thanks for your response. I have checked the usr02 table and logs and do not see any empty fields or strings. This process worked for 5.2 but fails in 5.3. Here is the excerpt from the log for the Management Report run. It seems to fail consistenly at a certain point. If I knew what the batch job was looking for in host variable 10 I might be able to resolve the problem. It seems to fail when it starts to report on users.
Thanks.
Dan.
INFO: -
Scheduling Job =>935----
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob run
INFO: --- Starting Job ID:935 (RISK_ANALYSIS_BATCH) - tst
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob setStatus
INFO: Job ID: 935 Status: Running
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob findJobHistory
FINEST: --- @@@@@@@@@@@ Find the Job History -
1
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
FINEST: --- @@@@@@@@@@@ Updating the Job History -
1@@Msg is tst started :threadid: 0
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
INFO: -
Background Job History: job id=935, status=1, message=tst started :threadid: 0
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis performBatchSyncAndAnalysis
INFO: --- Batch Sync/Analysis/Mgmt Report started ---
Jan 23, 2009 8:04:16 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
INFO: --- Running the Background Management Report -
Jan 23, 2009 8:04:39 AM com.virsa.cc.xsys.mgmbground.dao.MgmStats execute
INFO: Start insert int cc_mgriskd all violations.... 1232726679108
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
WARNING: Exception in Management Report Job: Cannot assign an empty string to host variable 10.
com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
at com.virsa.cc.xsys.mgmbground.dao.MgmStats.execute(MgmStats.java:314)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.runBkgMgmReport(BatchRiskAnalysis.java:1182)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1430)
at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob run
WARNING: *** Job Exception: Cannot assign an empty string to host variable 10.
com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
at com.virsa.cc.xsys.mgmbground.dao.MgmStats.execute(MgmStats.java:314)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.runBkgMgmReport(BatchRiskAnalysis.java:1182)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1430)
at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob setStatus
INFO: Job ID: 935 Status: Error
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
FINEST: --- @@@@@@@@@@@ Updating the Job History -
2@@Msg is Error while executing the Job:Cannot assign an empty string to host variable 10.
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
INFO: -
Background Job History: job id=935, status=2, message=Error while executing the Job:Cannot assign an empty string to host variable 10.
Jan 23, 2009 8:04:49 AM com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob scheduleJob
INFO: -
Complted Job =>935---- -
Management Report - Cannot assign an empty string to host variable 10
We ran a Management Report for the first time after completing the User/Role/Profile Full Sync and the user/Role/Profile Batch Risk Analysis. The job failed with the following error:
Oct 16, 2008 12:13:29 PM com.virsa.cc.xsys.bg.BatchRiskAnalysis runBkgMgmReport
WARNING: Exception in Management Report Job: Cannot assign an empty string to host variable 10.
com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 10.
We are on GRC 5.3 support pack 4. Has anybody encountered this error? What does host variable 10 refer to?I checked our USOBT_C table and we have a lot of empty values. If this is allowed to be empty in SAP and this is the table that is uploaded into CC, why would all the fields in CC tables then be defined as NOT NULL? We suspect that since we had uploaded USOBT_C under 5.2 and if this had been an issue before, it may have been corrected when we upgraded to 5.3 but then the old data is still in our system. Is there an easy way to get around or correct this?
Thanks. -
PI 2.0 Manager Report for Alarm Assignments and Acknowledgements
Is there a Prime Infrastructure 2.0 manager report that shows daily alarms, who the alarms were assigned to and when they were acknowledged? I can't find anything on the tool or in the documentation and this is required to prove compliance in the financial industry.
ThanksThere is no PI 2.0 release yet.
LMS 4.2 can do this. Reference.
I am curious - can you cite the compliance regulation that requires this feature? -
Error opening a Manage Report template with Formulas and Summation
Hi Expert,
My j2ee web application is setup is such a way that when there is NO connectivity to the Crystal Report Server XI, it will use the Crystal Report for Eclipse functionality and opening report templates located in the relative path - This works fine.
But when there is a connectivity to the CMS Server, I have this error when opening a manage report in Crystal Report Server XI that contains formulas and summations. But for other reports like chart and listings no problem.
This code triggers the error:
ReportClientDocument clientDoc = reportAppFactory.openDocument(infoObject,0, java.util.Locale.US);
I found out there's a conflict between CR libraries for Eclipse and libraries for RAS Enterprise Server XI.
How can I solve this issue so that I can support the two scenarios - with or without CMS connectivity, I can still view reports.
Error Stack Trace:
com.crystaldecisions.sdk.occa.managedreports.ras.internal.a: Cannot open report document. - Unable to connect to the server: gdcextrp.RAS.rptappserver. cause:com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: gdcextrp.RAS.rptappserver.-- Error code:-2147467259 Error code name:failed detail:Cannot open report document. - Unable to connect to the server: gdcextrp.RAS.rptappserver. The exception originally thrown was com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: gdcextrp.RAS.rptappserver.-- Error code:-2147467259 Error code name:failed at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
Hoping for your answers.
Regards,
Rulix BatistilYou must isolate the CR4E and RAS SDK jars using separate classloaders - simplest is have separate apps, if rolling your own class loaders is out of project scope.
They do not work together.
Sincerely,
Ted Ueda -
Device Manager reported driver missing for Officejet 7310 printer
I used the full-feature install software downloaded from HP site to setup an Officejet 7310 printer on a Lenovo T540p laptop with Windows 8.1 64-bit OS. The install and the printer appear to work correctly as I can print and I can also scan from the HP Solution Center utility. However, the Device Manager reports two errors/anomolies as follows.
Under the "Multifunction adapters" entry the Officejet 7300 series Properties shows the Device Status as:
This device is disabled. (Code 22)
Click Enable Device to enable this device.
Under the "Other devices" entry theOfficejet 7300 series Properties shows the Device Status as:
The drivers for this device are not installed. (Code 28)
There are no compatible drivers for this device.
To find a driver for this device, click Update Driver.
I find this a bit baffling as I believe the install software is supposed to include the driver(s), plus the printer seems to function (which could be due to default Microsoft drivers).
Any thoughts on how things got in this state and how to recover would be deeply appreciated as I prefer to not "ignore" the error messages.
Thanks,
Glenn
This question was solved.
View Solution.Yes I was able to remove the USB instance and rename the network-connected printer instance as the sole printer. I thought that should work, but I was a bit paranoid given the other weird things that happened with the package install.
I'm good to go; thanks again.
Glenn -
Batch Management report Issue.
Hi Friends,
I have a question on batch management report, for detailed information please see the steps below
Step 1 : I have material X and Y created with class u2018XYZu2019, and characteristic value temperature 10 u2013 100 c
Step 2 : I have done Goods receipt for both the material
Material document Material Batch Number Characteristic Value
123 X TEMP1 10 C
124 X TEMP2 10 C
125 Y TEMP3 10 C
126 X TEMP4 20 C
127 Y TEMP5 20 C
I have two questions now?
1. Is there any report to find out the list of materials with characteristic value 10 C?
2. is there any report to find out list of batches for 10 C?
Thanks and Regards,
ChalaaThere is no standard report for your requiremet, go for ABAP development.
-
Urgent please help: what is the table name for cash management reports?
I am wondering what the table name for cash management reports is. I am trying to figure out then if I have any missing.
Please help.I checked MSEG table. But, I didn't find any field for date.
Can you tell me field name.
Regards
Siva -
Tables used for Devloping Customer Reports Of solution manager report
Dear All,
Kindkly Suggest Some Tables,which i can use in developing the solution manager report.
key fields i m using From results of Tcode CRM_DNO_MONITOR
ID
PERSON RESPONSIBLE
TEAM SUPPORT
POSTING DATE
PRIORITY
THANKS IN ADVANCE.Update my question my deadline is up to complete,
Regards,
Thiru. R
Maybe you are looking for
-
MacBook Pro Display (window) shifts off the screen when I move my mouse
With a slight move with my magic mouse, my entire open window will shift completely off the screen with only a part of the window still visible. I have to click on the exposed edge of the window for it to shift back into place. It's only the window o
-
Hi, I have adobe acrobat pro 9 (yes older version) with error to convert from word
on win7 64bit. but when I try to convert a word file to pdf. I get error PDF MAKER. When I print a test page from word to pdf printer it does correct. Word is 2007 When I go to my acrobat. And I press combine from word I get the error. When I combine
-
Converted PDFs in InDesign are too BIG!
I am a recently employed designer for a magazine and have been at the company for 4 months. At the end of creating an issue, I convert it to a PDF using the settings sent by the printers. Typically the end file size is around 300mb (before I joined,
-
Can we give conditions in analytic function
iam using oracle 11g database is there any possibility to give condition in analytic statement for example select max(sal) over(partition by dept order by empno) from emp.. suppose if want to calculate max salary of male and female separtely. how it
-
What things will be cached after starting a xlet ?
hey! what is Prefetch descriptor and DII descriptor in the application descriptor in the AIT? Do they provide hints to the receiver about which DSM-CC modules should be cached in the initial time,or provide hints to the receiver the all the resources