Vous êtes sur la page 1sur 40

BUSINESS PROCESS PROCEDURE

Title: Creating HR/Payroll Reports and ABAP Queries


Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Overview
Trigger: A custom designed report of various HR/Payroll data must be compiled and
printed, stored or distributed as needed or required by company policy or
other regulatory guidelines.

Business Process Procedure Overview


This document describes procedures for accessing ABAP query functionality of the SAP R/3 system and
for creating an ABAP query to develop HR reports.

1.1. The screen below highlights one of several menu paths you can use to access the
SAP ABAP query function. But the easiest way to do this is by typing the
transaction code SQ01 in the blank field, as indicated on the following page, and
clicking on the green checkm ark. Please note that with any query, your access to all
or certain data may be blocked if you are not authorized to access, or do not need
to view such data. This is true no m atter what menu path you use to access a

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 1 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

query.

1.2. Using the transaction code on this page or the menu path on the previous page will
take you to the screen on the next page.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 2 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.3. The first step in creating a query is to create a User Group. The m enu path you will
use to do this is Environm ent, User Group, as depicted below. It is best to first
check the user groups that have already been created, to avoid unnecessary
duplication.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 3 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.4. When you click on User Group you are taken to this screen. Select a nam e for your
user group and type it in the blank field. Next, click on the Create button.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 4 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.5. When you click on the Create button, the popup screen below will appear. Type in
the same or another nam e to further define your user group and save it.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 5 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 6 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.6. After you have created and saved your user group, the next step is to create a
functional area, using the menu path below.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 7 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.7. Select and type in the name of your functional area and click on the create button.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 8 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.8. When you click on the Create button, the popup screen below will appear. Now you
will have to choose what method you will use to create your query. This portion of
the lesson will demonstrate how to create a query using a logical database.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 9 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.9. Again, you will have to name your query. Then, you will have to choose the logical
database that defines the criteria used in the query. Logical databases are SAP
defined, specific to the data you are trying to retrieve. In this example, the PNP
database is used. A list of logical databases can be viewed by clicking on the drop
down arrow.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 10 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.10. In this example, after you have typed in “PNP,” the next step is to identify the “info
types” that will be used in the query. The database PNP and its associated
infotypes are related solely to human resources activities. The m ost com monly
used infotypes are 0000, 0001, 0002, 0007, 0008, 0019, 0040, 0041, 2001, 2002, 2005,
2006, and 2007. There are m any infotypes that are not applicable to US companies.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 11 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.11. When you have identified the infotypes you want to use in your query, click on the
copy icon at the bottom of the screen.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 12 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.12. If you choose to do so, you can save this initial data as a variant.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 13 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 14 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.13. Or, you can just execute the functional area.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 15 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.14. This screen will appear when you execute the functional area. Unless you are very
experienced, you will not make any changes to the data on the screen. You will
need to perform the generate and/or save function before exiting the screen. The
icon for the generate function is the red and white circular sym bol on the submenu
row. If you perform the generate function first, the save function is performed
autom atically at the sam e tim e.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 16 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.15. When you have generated and/or saved the functional area the popup screen below
will appear. Unless you are very experienced with queries, ignore it and “X” out of
it.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 17 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.16. After “X’ing” out of the popup screen, you will be returned to this screen. You m ust
now assign your newly created functional area to a user group. This is done by
clicking on the “Assignm ent to user groups bar.”

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 18 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.17. When this screen appears you m ust identify and select the user group to which
your functional area will be assigned. Select the respective functional area, click
once on the button beside it, and then save it.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 19 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.18. Now you can proceed further in the query creation process. The menu path below
is the next step you need to take.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 20 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.19. After clicking on queries, the screen on this page will appear. Again, you must
name your query and then click on the Create bar.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 21 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.20. When you click on the create bar the popup screen on this page will appear. There
will be a list of functional areas that have been previously created. Your newly

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 22 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

created functional area will be am ong this list. Find it and double click on it. You
will be taken to the screen on the next page.

1.21. Now you will have to nam e your query, You may also provide a brief explanation of
what the query is used for in the Notes section of this screen. Please note the

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 23 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

“Further processing options” at the bottom of the screen. This should be used only
if you want to retrieve and display your query in a specific form at each time.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 24 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.22. You will now proceed through a series of screens in producing your query. This is
started by clicking on the “next screen” sym bol.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 25 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.23. This is the first screen that will appear. It displays all of the infotypes you
previously selected when creating your functional area. Click in the small box
beside each infotype that you want in your query and it will be “checked.” If you
have now decided you do not want a particular infotype to be included in your
query, do not check it. Proceed on to the next screen.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 26 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.24. Now you will need to select the categories from each infotype that you want to be
included in your query. The screen below shows only a partial listing of choices for
the organizational assignment infotype. When you have selected your options, go
to the “Next page” option at the bottom of the screen to view and select further
choices from the infotypes you chose to be included in your query. Once you have
completed your selections, proceed to the next screen by clicking on the “next
screen” m enu option.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 27 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.25. Here you will “check” the infotype selections you m ade from the previous screen.
Again, you have the option not to select an item if you have now decided you do not
want the item in your query. Once complete, click on the Basic list m enu item.
When you gain experience with queries you may want to experim ent with the
Statistics and Ranked list options.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 28 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.26. On this screen you will identify what line/row you want your selected item s to
appear on, what sequence you want them in, and if desired, how you want them to
be sorted. For items that contain a num eric, you can also select whether you want a
grand total for that item. You will seldom if ever need to use the counter function,
but it is recom mended you select the basic list with box, com pressed display and
colum ns separated by | options.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 29 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.27. The next several screens display other options you may choose to further define how
your query will appear. When completed with all options, save your query. If
desired, you m ay also execute your query from any of these screens.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 30 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 31 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 32 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 33 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 34 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.28. When you exit the system and reenter the query function by using transaction
SQ01, you will be taken to an initial screen that may or may not list your query. If
this is the case, you will have to retrieve and select the user group under which your
functional group/query was created. This is accom plished by clicking on the Other
user group menu item depicted on this screen.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 35 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.29. The popup screen below will appear when you click on the Other user group menu
item. Select the user group under which your query was created and double click
on it. A screen containing a com plete list of queries that have been created under
this user group will appear.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 36 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.29. Identify and select your query by clicking on the button beside the query. Now you
may execute it.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 37 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.30. Now you can identify how you want to execute your query. As in a standard report,
there are several options available that allow you to further define how the data for
your query is retrieved.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 38 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.31. When you execute your query, it may be displayed in a format sim ilar to that below.
If, at the beginning of the query creation process, you specified the query be
displayed in an MS Excel format, then that is what would appear when you execute
it. In this example, there were restrictions and you can now determine how you
want the data to be further displayed. Placing the pointer on the subm enu row of
items will highlight what each item is for to help you determine how you want your
query to be displayed and/or downloaded.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 39 of 40
BUSINESS PROCESS PROCEDURE
Title: Creating HR/Payroll Reports and ABAP Queries
Organization/Area:
EUP Category:
Prepared By: Report Creation and Release: R/3 4.0B
ABAP Query
Dave Shirah: Status:

1.32. There is one other method for creating an ABAP query through the application of
joining tables. This is detailed in another lesson.

Last changed on: Last changed by: Version: Page:


9/26/99 Dave Shirah 40 of 40

Vous aimerez peut-être aussi