Upload
bharathk-kld
View
236
Download
0
Embed Size (px)
Citation preview
7/28/2019 Sap Hr - Sap Query
1/2
Home Knowledgebase Query Tools SAP Query
If your browser does not support
the SDS Knowledge B ase
menu, click here for analternative.
SAP Query
You need to create Us er Groups and Functional Areas first (before you create any queries) - to which you will
have to ass ign the relevant users .
Remember that Query Areas - whether Standard or Global - have an effect on the view of the reports that are with
the User Group and Functional Area selected.
You can save an Ad Hoc Query and run it from ABAP Query where you have SAP standard selection options.
For ABAP Query - always s et the list format columns to 200 to maximise the s creen output. When executing the
query, save a variant and then tick the checkbox "execute only with a variant" to force the user to use the same
parameters.
Need to know the nam e of your query or run it with SA38, use the menu path Query More Functions Display
Report Name. Generally the report name will be AQ50/SAPQUERY/HRtest - where the AQ stands for ABAP
Query, 50 is the client name, SAPQUERY/HR is the user group and test is the report name.
If you specify an ABAP Query to output in table format - then you will be able to sort, sum and find values in the
resultant output.When creating a functional area which calls the PCH (org mgt) database, don't populate the field "se lection
screen version". Choosing either 900 or 901 from the drop-down options, will result in a different screen
selection which does not allow the option of entering the evaluation path.
When setting up a functional area which calls the PCH (org mg t) database, remem ber to include all the required
PA and org m gt infotypes.
When running a query in a functional area which uses the PCH database, ensure that you use the correct
evaluation path which w ill offer the correct results - you can start off by using the evaluation path "o-s-p" which
can be used in many queries.
When selecting data in ABAP Query, it can happen that in order to be able to se lect on a particular field, you need
to output it in the query. In other words , you have to stipulate the field as an output, in order to use it as a filter in
your selection criteria. Seems weird but this applies to a few fields - one of which is the employee's employment
status.
Having created a query using one of the above 2 methods , you can view the source code by looking at the saved
report using transaction code SE38. You can mo dify and add to the code and then rerun the report in SE38 or
SA38. It is a good way to start to learn how to write ABAP reports - although it is unlikely to be the most efficient
way of writing the code. Remember that once you have added to the code, you might experience problem s
editing it in ABAP or Ad Hoc Query.
You can change the authorisation of a user to allow them to create, modify or run ABAP queries.
Users can be assigned to user groups wh ich are in turn ass igned to functional areas. It is pos sible to amend
the profile ass igned to a user - to allow them to us e ABAP Query - without them having been assigned to a us er
group.
When choosing the fields to be output in the report, modify the field widths. The SAP standard ones can be quite
wide, which can caus e the data to flow onto a second output line. Modify the field widths in your report.
Once having saved the report, it is wise to execute it from the main ABAP query screen. You can execute it from
within the edit mode, but this can cause "system dum ps" in compil ing on certain occasions.
You can trans fer the resul ts from a SAP Query directly into MS Word using the mai lmerge functionality within
Word. This would allow you to create templates in Word with the fields s tipulated in the query. When looking at
the output result in ABAP Query, choose the down load to MS Word and choos e the mail merge option. Choo se
new file to set up your template in Word using the available fields and save the template in a specified directory.
The next time you link to Word, choose the "existing file" option and point SAP to the directory and file where you
saved the template. The mail merge functionality will then kick in. Excellent for employee specific forms etc.
Useful Transaction Codes
SQ01 - ABAP Query
SQ02 - Functional Areas
SQ03 - User Groups
Useful User Parameters
AQB - Default Us er Group
AQQ - Default Query
AQR - Defaul t List
AQS - Default Functional Area
S
Your
e ar
our ar
new o
Pleas
is a pa
would
Home Serv ices & Products Knowledgebase About SDS Customers & Partners Links Sitemap
Query Tools
Data Tools
Human Resources
FI/CO
Cross System
Miscellaneous
BW
7/28/2019 Sap Hr - Sap Query
2/2
Copyright 2009 Strategic Data So luti ons Ltd. All rights res