This website is not affiliated with, sponsored by, or approved by SAP AG.
Human Resources (PM, OM, PA, TM ,PD)
Moderators: thx4allthefish, Snowy, muhnkee_2
by nicksharkey83 » Tue May 24, 2011 5:56 am
Hello
Firstly, I am useless at SAP so please forgive the lack of technical terms and general lack of understanding but I have an issue with ad hoc queries.
Basically is there a way to run a query on an org unit that includes the employees in subordinate org units? For example, say Team A includes person A, Person B and Team B. I want to run a query on the whole lot of them so I put Team A in the 'values' field and it only returns information on Person A and Person B rather than everyone in Team B too. Is there a way to make SAP look at teams within teams??
I hope this makes sense to someone because it barely makes sense to me either!
Very grateful for any help. If more information is needed I will try my best to give it!
Nick
-
nicksharkey83
-
- Posts: 1
- Joined: Tue May 24, 2011 5:50 am
by hrboss » Wed May 25, 2011 6:46 am
You can't do this through ad-hoc query as far as I know. The only other option is to a custom ABAP program
-
hrboss
-
- Posts: 247
- Joined: Tue Aug 14, 2007 9:27 am
by xau » Thu Jun 23, 2011 6:44 pm
1. Start query on OM selection or select of PERNR on OM will do it.
2. If you have somene moderately compotent at ABAP you can define an additional field with a string the org units starting from the org unit the employee is in & working up th the root org unit. Then can select employees where the field contains an org unit code. Can hang lotsa nice reporting on this like the org reporting level etc - voild OM reporting ex PNP!
Hopethathelps
james
- Code: Select all
*********
*ZORGSTR*
*********
CLEAR: zorgstr.
zorgstr_orgeh = p0001-orgeh.
zorgstr = p0001-orgeh.
DO.
* ....Get Parent Org Unit from Current Org Unit
SELECT SINGLE sobid
FROM hrp1001
INTO zorgstr_parent
WHERE otype = c_otype
AND objid = zorgstr_orgeh
AND plvar = c_plvar
AND rsign = c_rsign
AND relat = c_relat
AND istat = c_istat
AND begda < sy-datum
AND endda >= sy-datum
AND sclas = c_sclas.
IF sy-subrc <> 0.
EXIT.
ELSE.
* ......Update Output & Set Parent Org Unit as Current Org Unit
CONCATENATE zorgstr_parent '-' zorgstr INTO zorgstr.
zorgstr_orgeh = zorgstr_parent.
ENDIF.
ENDDO.
Last edited by
Gothmog on Fri Jun 24, 2011 2:17 am, edited 1 time in total.
Reason: code tags
Videos etc on SAP esp SQ01 Query - http://www.saphr.tv
Check out IntelliSmart online payslips, new Query tools & more - http://www.xau.com
-
xau
-
- Posts: 414
- Joined: Wed Aug 02, 2006 5:15 am
- Location: Wellington, NZ
-
by Helper » Fri Jul 29, 2011 6:09 am
Hi
Your best bet it and any easy way to do this is using SAP Query (SQ01) you just need someone to build a basic infoset in SQ02 based on PNP or PNPCE logical database and link it to a user group SQ03 along with your user id then when you have created a basic query use the org structure selection when you execute to select the units you want or list them on the selection screen.
Cheers
Helper
'Well I will if I can'
-
Helper
-
- Posts: 91
- Joined: Tue Feb 11, 2003 11:18 am
- Location: England
Return to Human Resources
Who is online
Users browsing this forum: No registered users and 6 guests