Вы находитесь на странице: 1из 132

The Secrets to Payroll Reporting Success Using SAP Query

Danielle Larocca Axon Global Solutions


2008 Wellesley Information Services. All rights reserved.

What Well Cover


Reporting options available for HR and Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

What Reporting Options Are Available?


1. 2. 3. 4. 5. 6.

Custom-coded reports (using ABAP, SAPScript, .NET, etc.) SAP NetWeaver Business Intelligence (BI) Third-party add-on solutions (i.e., Cognos) SAP standard canned reports Report Painter/Report Writer SAP preinstalled reporting tools (Query Tools)
SAP Query InfoSet (Ad Hoc) Query QuickViewer

1. Custom-Coded Reports

Any report requiring a trained programmer to insert code (ABAP, etc.) to collect information, design output, and produce a report Every company has some of these custom reports Sample of custom ABAP report appears at right

2. SAP NetWeaver Business Intelligence (BI)

A separately purchased, licensed, and installed SAP component Is a preconfigured integrated repository that summarizes data from SAP ERP 6.0, plus external sources, into a management-level strategic database

Formerly known as SAP BW (now called SAP NetWeaver BI) this reporting component is part of the standard SAP NetWeaver install. The SAP ERP 6.0 license includes BI, Portal, XI, etc. No additional purchase is required. 5

3. Third-Party Add-On Solutions

A separately purchased, licensed, and installed solution available to attach to your SAP solution A preconfigured integrated repository that summarizes data from R/3, plus external sources, into a management-level strategic database

4. SAP Standard Canned Reports

SAP delivers hundreds of standard reports for each application area They can be found via the General Report Selection navigation on the SAP Easy Access Menu

5. Report Writer/Report Painter


An SAP-standard visual report development tool Painter can be utilized within all financial sub modules GUI makes development a snap Painter reports can be used in drill-down reporting

6. Preinstalled SAP Query Reporting Tools


A. B. C.

SAP Query InfoSet (Ad Hoc) Query QuickViewer

A SAP Query

Best HR Query tool Powerful, easy-to-use report writing tool that you can use to create reports for any SAP module Offers a range of ways to define output and create different types of reports, such as basic lists, statistics, and ranked lists

10

B InfoSet Query (Referred to as Ad Hoc Query in SAP ERP HCM only)

Quick, one-time look-up utility for fast access to basic data WYSIWYG (What You See Is What You Get) quick and dirty utility to access counts and simple basic lists

11

C QuickViewer

Create WYSIWYG views of data called QuickViews QuickViews are not reports that can be exchanged among users You can convert QuickViews to reports to be used with SAP Query

12

What Are the Differences Between All These Tools? Free & Real Time

Custom-coded reports SAP standard canned reports SAP preinstalled reporting tools (Query, InfoSet, Ad Hoc, QuickViewer)

Requires Purchase and Implementation & Not Real Time

Third-party add-on solutions

Free & Not Real Time

SAP NetWeaver Business Intelligence (BI)


13

Which Tool Should I Use?


No single tool alone meets all requirements for all companies A thorough review of your business needs, existing solutions, and infrastructure can help you decide which tool is appropriate for specific needs Can use multiple tools at any given time For example, use Report Painter for detailed financial reporting, SAP Query for all HR reporting, and SAP NetWeaver BI can be used as a data warehouse solution that includes data from multiple systems for strategic analysis

14

Mastering Standard SAP Query Tools

SAP preinstalled reporting tools in the Query family SAP Query InfoSet (Ad Hoc) Query QuickViewer The tools delivered with your SAP system are: Easy to set up, easy to use, real-time Available for every application module in SAP Allow end users (without technical skills) create their own reports Please check out the session titled Mastering Standard SAP Query Tools to learn more
15

Comparing Your SAP Reporting Options


SAP Query InfoSet Query
End-user tool with a single-screen WYSIWYG approach Equivalent to an SE16 table view

QuickView

ModuleSpecific IS
End-user tool that allows for predelivered or custom, standard, or flexible analysis

ThirdParty
Separate system that extracts and merges data from multiple systems to allow for end-user ad hoc analysis

SAP NetWeaver BI
Separate system to SAP R/3 that extracts and merges data from multiple systems to allow for end-user ad hoc analysis

Robust end-user tool for basic, statistical, and ranked lists

End-user tool with a WYSIWYG approach to create a QuickView of R/3 Equivalent to an SE16 table view but can be converted to SAP Query

Graphical or Standard format

Standard format

Standard or Graphical format

Standard or Graphical format

Excel, Web, or proprietary

Excel, Web, or Crystal

Robust reports including subtotals, sorts, colors, and calcs

Basic lists only

Basic lists only

Robust reports including subtotals, sorts, colors, etc.

Highly robust ad hoc or standard reports with huge array of capabilities Compatible with all current versions of SAP R/3

Highly robust ad hoc or standard reports with huge array of capabilities Compatible with all current versions of SAP R/3

SAP R/3 3.x+

SAP R/3 4.6C+

SAP R/3 4.6C+

ALL

16

Where QuickViewer and Ad Hoc Query Tools Fit

You can use the InfoSet Query (Ad Hoc Query) or QuickViewer for a quick retrieval of data from SAP R/3, similar to an SE16 or SE17 data collection from a table Unlike a comprehensive reporting tool for designing output with formatting, subtotals, and calculations like the SAP Query, these tools allow you to grab the data you need quickly These tools are most often used as a quick-and-dirty database pull of your SAP R/3 data in a format friendlier than SE16 or SE17 and with more data available Both are available in your standard SAP R/3 4.6C system

17

Best Practice Recommendation for Query Use

Using a single query reporting tool ensures that: Data is collected and presented in the same format using the same criteria Security is the same for all Standardization for naming conventions, storage, etc., is compliant You are not at risk for pulling different numbers with different tools Recommendation

Use SAP Query for all HR and Payroll query reporting needs
18

How SAP Query Works Behind the Scenes

Two major components: Query Groups and InfoSets

19

One-Time Configuration Takes Only Five Minutes!


Step 1 Create InfoSets (DataSource) Step 2 Create Query Groups Step 3 Assign InfoSet to Query Group

View the take home CD for the session Mastering Standard SAP Query Tools: From Strategic Decisions to Configuration Steps to Ongoing Administration This session covers everything you need to know to perform the one-time configuration of the SAP Query tool

20

What Well Cover


Reporting options available for HR and Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

21

How to Create a Basic Report with the SAP Query


Navigate to SAP Query (SQ01) Enter a name for your report and click Create You are prompted to select a data source

22

What Well Cover


Reporting options available for HR & Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

23

You Walk Through Seven Basic Screens to Create a Report Give the report a name Select field groups Select fields Add fields to the report selection screen Specify the order and output of your fields Fill out the selection screen View your report output
24

Screen #1 Title Format

Stores the name of the report, page size, and other basic information

Use the forward arrow to proceed through the seven screens

25

Screen #2 Select Field Groups

Select the field groups containing the fields you want included in your report List of field groups is from the SAP InfoSet using logical database PNPCP as its data source

Use the navigational arrows to navigate between the screens

26

Screen #3 Select Fields

Select the fields to include in your report

27

Screen #4 Add Fields to the Selection Screen

Lists all fields selected on the previous screen Select fields that will display as additional selection criteria on the selection screen

Click Basic List to proceed to the next screen

28

Screen #5 Basic List Line Structure Screen

Specify the order and output of fields, and indicate any counts or totals To proceed, click the Execute icon

You can also create Statistics and Ranked Lists

29

Screen #6 Selection Screen

Specify the data you want to see in your output Enter any specifications and click the Execute icon to see the finished report If you added any fields in screen #4, they display on the selection screen in the Program selections section

30

Screen #7 Your Finished Report

31

Compare the Report Output with Screen #5

32

Taking a More In-Depth Look at Each Screen (1-7)

When we went through the creation of a report, I mentioned only the items minimally required on each screen to make a basic report Lets take a more detailed look at each screen to see what options are available and what other functionality is present When training users on the use of the tool, you should have them master the seven basic screens before moving on to the more advanced screens (8-14)

33

A Detailed Look at Screen #1

Title is required; other fields are for reference only For reports formatted as ABAP Lists, enter the max width for lines and columns or you can otherwise ignore You can save a variant with the report so each time it is executed the standard saved values in the variant are present You can alter the print width settings if printing your report directly from SAP as an ABAP List
34

A Detailed Look at Screen #1 (cont.)

You can choose the report output format on a selection screen (#6), but you can also save the preferred format here Each option is explained in detail on the next slide

35

A Detailed Look at Screen #1 (cont.)

These definitions also apply to the output options you see on your selection screen (#6) when executing your report

36

A Detailed Look at Screen #2

Any field group in your InfoSet during one-time configuration appears here Compare it to the configuration screen seen in the earlier presentation (below)

37

A Detailed Look at Screen #3

This screen opens all the field groups (from screen #2) to show all fields available for reporting Use the page up and down buttons to scroll through the multiple fields and select the fields of interest

38

A Detailed Look at Screen #4

All fields selected on screen #3 appear Choose the fields you want to appear on the selection screen (#6) when executing the report You can select or limit your output using any of these values For example, you can add the Flight date field to your selection screen, so that when you run your report you can specify the date you are interested in so that your report output is limited to that date

39

A Detailed Look at Screen #4 (cont.)

Indicate whether you will permit multiple selections for a field (i.e., multiple flight dates) or a single value only

40

A Detailed Look at Screen #5

Basic list with box: Used for displaying the basic ABAP list with lines separating the columns Columns separated by |: Used for basic ABAP lists; inserts a vertical bar after each field on a line except the last. An underscore is output before and after each control level text (if sorting and sub-totaling is used) and inserted before and after each total. In addition, the individual columns in the standard header are separated by vertical bars. Compressed display: Displays the basic list in compressed format Permit row count in SAP List Viewer: Counts the number of rows in the list when it is displayed with the SAP List Viewer (ALV)
41

A Detailed Look at Screen #5 (cont.)

Line is where you specify on which line number you want your output to appear Sequence column identifies the sequence you want your data to appear in with the line Sort column assigns sequence numbers between 1 and 10; lets you sort on up to 10 different fields Use the Total column to place a check mark for each numeric field that you want to output the total Counter column is listed immediately to the right of the Total column. You can mark checkboxes for the Counter column for each field you want to count. 42

A Detailed Look at Screen #6

Default information contained on the selection screen is based on the logical database selected; each has its own values For example, the SAP Training Flight Scheduling System F1S database has the fields shown here associated with it. Often, the most common fields are available for selection.

43

A Detailed Look at Screen #7

Use the toolbar buttons to extract your finished report to Microsoft and other applications. Your Take-Home CD has a guide to what each button does!

44

What Well Cover


Reporting options available for HR & Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

45

Moving on to the More Advanced Screens

These examples use the SAP ERP HCM solution to produce a list of fictitious associates Before and after shots show entering values on the advanced screens followed by pictures of the impact it has on the finished report output Master the basic screens (1-7) before moving on to the advanced screens (8-14)

46

What the Report Output Looks Like Before Changes in ALV

47

What the Report Output Looks Like in ABAP LIST Format


It is easier to see formatting changes made on the advanced screens I use this format in some examples

48

Lets See a Demonstration of Creating an SAP Query Report

49

How to Create an SAP Query Using the Advanced Screens Add sub-totals to the report Change sub-total texts Format the list line Alter the column widths, add colors, hide leading zeros, and create templates Insert text to appear before output for each line Create custom headers and footers Create graphics (charts and diagrams)
50

Navigating to the Advanced SAP Query Screens

From the basic list line structure screen (#5), use the forward navigation arrows or use the menu Goto > Basic List and navigate directly to the screen

51

Screen #8 Add Sub-Totals to the Report

Any field indicated on screen #5 as a sort is available here Use this screen to specify sub-totaling

52

See What the Sub-Total Looks Like

Before After
53

Screen #9 Change Sub-Total Texts on the Report

Any field selected on screen #8 for sub-totaling is available here Use this screen to modify how sub-total texts appear on a report

54

See What the New Sub-Total Text Looks Like

Before

After
55

Screen #10 Change Line Output Options

Change the color of the list, remove headers, and insert blank lines or pages

56

See What the Changes Look Like

Before After
57

Screen #11 Field Output Options

Use this screen to vary the layout of the columns in your list Change column color, vary position in the file, change column widths, hide leading zeros, and create templates

58

See What the Changes Look Like

Before After

59

Screen #12 Insert Text Before Data Output

Any field selected on screen #11 for the template is available Insert text into the report output for each individual line item

60

See What the Changes Look Like

Before After
61

Screen #13 Create Custom Headers and Footers

Insert headers and footers into your report, including the insertion of page numbers and dates

Shortcuts &%DATE &%TIME &%PAGE

62

See What the Changes Look Like

Before After

63

Screen #14 Graphics

Display one-line basic lists, statistical lists, and ranked lists in graphical format

64

See What the Changes Look Like

65

What Well Cover


Reporting options available for HR & Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

66

Configuration Decisions

Did you attend the session called Mastering Standard SAP Query Tools: From Strategic Decisions to Configuration Steps to Ongoing Administration? That session covered everything you need to know to use the end-user reporting tools delivered with your solution, including best practice deployment strategies Please review that session for detailed explanations and how-to recorded demos Here is just a quick overview of how and why the configuration is so important

67

The SAP Query Family of End-User Reporting Tools

Two major components: Query Groups and InfoSets

68

Query Groups

Formerly known as User Groups Use to create, modify, and execute reports in a certain area within SAP ERP 6.0 Users are grouped by: Payroll Finance Accounts Payable Sales HR

69

InfoSets

Pre-arranged groupings of data from which you select the fields for a report Most popular data source is an SAP-delivered Logical Database (LdB) Every module in SAP has these Explore via transaction SE36

70

One-Time Configuration Takes Only Five Minutes!


Step 1 Create InfoSets (DataSource) Step 2 Create Query Groups Step 3 Assign InfoSet to Query Group

The one-time, technical configuration is the easy part

S stepsti the same for SAP Query l are These configuration


and InfoSet/Ad Hoc Query. This configuration can also be used for QuickViewer do it once and you are done!
71

Strategic Decisions, Configuration Options, Etc.

Just because SAP Query tools are easy to turn on and use, does not mean that you should dive in just yet Before starting youll need to do some planning: Which application area will you use? What is your client/transport strategy? Who will own the InfoSets? What can you base queries on? How does security work for SAP queries?

72

Which Application Area Will You Use?

Impacts where your reports are stored in SAP and to which clients they are available Two options GLOBAL Automatically available to all clients on an application server STANDARD Available only on the client in which it is created (although it can be copied between clients without transports) Best business practice is to create objects in the standard area and to keep them client-specific

Beginning with SAP R/3 4.6, SAP delivers many of its standard reports in the SAP Query global application area
73

What Is Your Client/Transport Strategy?

With traditional development items (like custom ABAP program reports), a life cycle is usually in place Object is created in a DEV client, transported to a TEST client, and then moved to a PRODUCTION client Query-based tools are designed to be used as a live tool in your production client; however, the one-time configuration of the tools requires otherwise

Design the InfoSets in your DEV environment and maintain your query groups and the queries themselves in your live PRODUCTION environment
74

Who Will Own the InfoSets?

One-time configuration (specifically the creation of an InfoSet) should be done only by a trained technical professional in a development client Be sure that your InfoSets are designed, configured, and tested appropriately InfoSets can be completely customized to your needs A trained technical member of the team should own them, work on them in the development client, move them to QA for testing against queries created in QA, and, once they pass testing, move them to the live production client

75

What Can You Base Queries On?

SAP Query allows you to create queries based on: Table join using a SAP NetWeaver AS table Direct read of table Logical Database (LdB) Data retrieval via integrated or external program The source of the data used in queries is key to ensuring that they run efficiently and, more importantly, yield accurate output Security also plays a large role

Only use Logical Databases for end user reporting


76

How Does Security Work for SAP Queries?

Proper security setup ensures that only the users you want can configure and/or use the tool Important because you dont want untrained users using the tool or working with its configuration SAP Query security options Set security so that some users can create reports while others can only execute them Assign transaction codes to queries to make queries available to end users who do not have access to the SAP Query tool InfoSets should only be maintained by technical personnel in the DEV environment, a client to which traditional end users do not have access

77

Security Is Very Important

A benefit to using an SAP-delivered logical database as the source of your data is that all the user security is already built in, so users see only the report output they are allowed to see

For more information, view the section in the SAP Help under SAP Query Authorizations

78

What Well Cover


Reporting options available for HR & Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

79

Secrets to HR and Payroll Reporting Tips and Tricks

Run your queries in the background and have a scheduled ABAP program to read all the spool files created by the query Use function module RSTS_GET_ATTRIBUTES to get spool attributes Then call the function module CONVERT_ABAPSPOOLJOB_2_PDF to convert the spool file into PDF format

80

How to Configure Automated Query Emails to Inbox (cont.)

Call the function module SX_TABLE_LINE_WIDTH_CHANGE Example:


CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE EXPORTING LINE_WIDTH_SRC = 134 LINE_WIDTH_DST = 255 TABLES CONTENT_IN = bufferpdf "table from FM CONVERT_ABAPSPOOLJOB_2_PDF CONTENT_OUT = out_table EXCEPTIONS ERR_LINE_WIDTH_SRC_TOO_LONG = 1 ERR_LINE_WIDTH_DST_TOO_LONG = 2 ERR_CONV_FAILED = 3 OTHERS = 4.

Once the call is successful, store the out_table in a UNIX file and send it using UNIX send mail
81

How Do I Audit Queries (Last Time Run and by Whom)?

Can be performed by the security/Basis team: 1) Run transaction ST03 (workload analysis of SAP system) 2) Select the server you want to analyze 3) Choose the timeframe to analyze 4) Choose transaction profile 5) Sort the list by program/transaction code and look for the one you want to find 6) If found, drill down on the program/transaction code to find who ran it and when it was run Repeat steps 2-6 for each server you want to audit

82

Movement of Query Objects Between Clients

You can move query objects created in the standard application area (not global) between clients via a special feature You can transport query groups, InfoSets (functional areas), and queries between clients without using the traditional transport function For example, you can move queries created in production to your development and QA clients

83

Other Cool Things to Do with SAP Query

You can create: Statistics lists produce summary analyses of data, including totals and averages. Statistics lists are similar to pivot tables in Microsoft Excel. Ranked lists are helpful in statistical rank reporting, where you want not only summarized, compressed data, but you want data in ranked order (either ascending or descending)

On your take home CD is a presentation from Reporting and Analytics 2006 conference Create Simple and Advanced Statistic and Ranked Lists Using SAP Query
84

Other Cool Things to Do with SAP Query (cont.)

Create local fields within the query and do calculations Hire date + a year, salary + 4%, etc. Add tables to your existing logical database To include custom tables, etc. Create interfaces (flat files, positional files) Schedule queries to run behind the scenes Weekly, monthly, etc.

You can learn how to perform calculations and insert symbols and icons in the session Basic and Advanced HR Payroll Calculations Any User Can Perform Using SAP Query
85

Helpful Hints and Best Practices

Always use naming conventions for report creation Popular practice: Your initials followed by an underscore and the report name (e.g., DLS_REPORTNAME) Groups all your reports together and makes them distinguishable SAP Query offers a copy feature Great if you need a new report that is similar to an existing report Select the report from the main screen and click the Copy toolbar icon Both the report and the variant are copied SAP Query offers a locking feature Choose the lock feature on screen #1 of SAP Query so that no one else can modify or delete your query

86

Post-Training Pitfalls and Deployment Advice

Monitor random users as part of a regulatory audit Ensures that the tool is being properly used Look through users queries Set the SAP trace mode to on for a user Monitor the system utilization record Routinely audit InfoSets to detect performance issues Use in cases where SAP logical databases are not being used Ensures that the retrieval methods designed work efficiently and accurately

87

Post-Training Pitfalls and Deployment Advice (cont.)

Try to prevent duplicate queries Because the reporting tool is so easy to use, often if the reports are not well organized, its easier to create a new report than to find an old one! Ensure that your reports are properly cataloged Consider deploying queries via transactions or area menus (report trees in SAP R/3 versions prior to 4.6) Users can specify a default query group (if they are assigned to multiple groups) using parameter AQB. To toggle between multiple user groups, use SHIFT + F7.

88

Heads Up the First Time You Use the SAP Query Tool

If your company has never used SAP Query, the first time you access it, it will be in graphical mode (shown at left) To ensure it is in standard mode, follow the menu path SQ01 > Settings > Settings > and uncheck the Graphical Query Painter box

89

Tip for Ongoing Maintenance

On the basic list screen (#5), it helps to input your sequence of fields in increments of five That way, if you have to return to the report and add a field in the middle of the sequence, you can do so easily

90

Insert Symbols and Icons into Reports

SAP has several dozen black-and-white pictures and color graphics that you can insert into reports These symbols and icons are available for any type of reporting, from SAP Query tool reporting to custom ABAP reporting

91

What Data Can I Report on From HR/Payroll?

SAP comes delivered with three logical databases for the HR module: PAP HR (Recruitment) applicant master data PNPCE HR (PA) personnel administration master data PCH HR (PD) Organizational Data In addition you can build functional areas based on ABAP programming, tables, table joins etc. The best practice is to use the SAP-delivered logical databases as your data source

92

Can I Use the Query to Report on Payroll Results?


In addition to master data, applicant data, and personnel planning data, you can also evaluate payroll results using a query. A number of predefined infotypes are available for the evaluation. The wage types required for the evaluation are entered in these infotypes:

93

Can I Use the Query to Report on Payroll Results? (cont.)


You can either activate these predefined infotypes or create your own infotypes using the same structures You can enhance these infotypes by using additional wage types and then activating the infotypes. This makes the necessary data from the payroll results available on the PNP logical database

More info: http://help.sap.com. Select the Find button and type in Infotypes for Evaluating Payroll Results.
94

Payroll Result Reporting

Which tables are used to populate the infotypes used for payroll result reporting? The IT0402 would need the RT data for the current period results The IT0458, IT0459, and IT0460 would need a combination of CRT and TCRT. The TCRT would be used for any tax-related information. i.e., /401, /403-/406 (FICA), etc. You should used the CRT for any company-specific created wage types, but any wage types that are used for W-2 purposes would be stored in the TCRT table as well

95

Naming Conventions and Cataloging

Always use naming conventions for configuration items and more importantly for actual report creation Because these items are so easy to create it is easy to find yourself with thousands of unclassified objects

96

Naming Conventions and Cataloging (cont.)

A popular practice is DLS_REPORTNAME (your initials followed by an underscore and the report name) This way all your reports are grouped together and are more distinguishable. Cuts down on people mistakenly changing others reports

97

Proper Use of Period Fields

Many people have difficulty determining how the period fields function within the SAP ERP HCM module selection screens As a result, their reports include data they did not intend to include

98

Proper Use of Period Fields (cont.)

In SAP, whenever a report is executed (based on a logical database, as queries are) where no variant exists for it as a default, the SAP system period default is the period labeled Other period If you leave this Other period selection in place, and if you do not enter a specific date range to the right of it, your report will pull every record from the SAP ERP HCM database; and needless to say, this is not a good idea The following slides describe how to use each period selection option

99

Today Period Field on Selection Screen

The most popular and commonly used in SAP Query tool reporting Ensures the data you have retrieved from the database is valid as of today If any future-dated records exist (for example, future-dated increases or organizational changes), they are not included in the report output because, technically, they do not exist yet If you select the Today period indicator for your report, the system date is used as the key date for the Person selection period

100

Current Month and Current Year Period Fields

Current month If you select the Current month option, the first and last days of the current month (as determined by the system date) are used as the start and end dates for the Person selection period Current year If you select the Current year option, the first and last days of the current year (as determined by the system date) are used as the start and end dates of the Person selection period

101

Up to Today and from Today Period Fields

Up to today If you select the Up to today field, the beginning of time (defined as 01/01/1800) and the system date are used as the start and end dates of the Person selection period This is the opposite of the From today period selection From today If you select the From today option, the end of time (defined as 12/31/9999) and the current system date are used as the start and end dates of the Person and data selection period This is the opposite of the Up to today period selection

102

Other Period and Person Selection Fields

Other period is the system default; to select Other period, enter a date range on the screen Person selection period enables you to specify the period in which employee data records are read Only records that overlap with the specified period by at least one day are selected; to define an interval, enter the start date in the left column and the end date in the right column You can select Other period Enter dates in the range boxes to its right and in the Person selection period fields below it to ensure that the system selects only employees who are members of the company on at least one day in the specified period These are persons with valid organizational assignment (infotype 0001) records
103

PD Reporting And Evaluation Paths

Many standard PD and Organizational Management reports allow you to specify an evaluation path in the report selection criteria By choosing the right evaluation path and root object, you can not only greatly reduce the number of times you run a report, but also possibly decrease the run time of the report itself Most importantly, you increase your chances of yielding accurate output!

104

What Is an Evaluation Path?

A series of instructions that tell SAP ERP 6.0 to look for particular relationships between specified object types and report back the objects that fall in that path Each evaluation path starts from a root object and continues evaluating a structure until it cannot find the specified relationships anymore Evaluation paths are the road maps that help to navigate structures

Definition
105

Where to View or Maintain Evaluation Paths


Table T77AW Transaction code OOAW Implementation Guide (IMG) path: Personnel Management Personnel Development Basic Settings Maintain Evaluation Paths

Your take home CD includes a detailed document that explains the anatomy of an evaluation path (Anatomy of an Evaluation Path.ppt)
106

Eliminate Duplicate Line Reporting


When executing virtually any SAP report, you see a Selection screen where you further clarify selections The most common date parameter for reporting in the SAP ERP HCM solution on the Selection screen is the date selection period Today Selecting Today ensures that the data you retrieve from the database is valid as of today Selecting Other period or leaving it blank pulls all records in the database, resulting in multiple lines per person. Many users wonder why they sometimes retrieve multiple (or duplicate) line items when selecting Today for an SAP ERP HCM report

107

Eliminate Duplicate Line Reporting (cont.)

This happens only with certain infotypes that have multiple values in a single or table-based storage space An infotype that does not produce multiple lines in an SAP Query is infotype 0002: Personal Data This is because infotype 0002 stores each piece of information in a single identifiable field

108

Eliminate Duplicate Line Reporting (cont.)

Behind the scenes, the data entered into the fields on infotype 0002 is stored in the SAP database in the P002-VORNA structure where P002 identifies the infotype number, in this case infotype P0002VORNA

To view the technical details of a field, place your cursor in a field and then press F1. Select the Technical Information button.

109

Eliminate Duplicate Line Reporting (cont.)

This happens only with infotypes that have multiple values in a single or tablebased storage space An infotype that does produce multiple lines in an SAP Query is infotype 0006: Address This is because it has sub types

Your report produces a record for every sub type unless you INPUT ONLY THE SUBTYPE you want on the reports Selection screen when executing the report that way you only get the one line
110

How To Report Off Multiple Dates On Infotype 41

For infotype 0041, there is not a single field identified for only a single piece of data; instead, the data that can be stored in each field is variable. The fictional associate has four different date types, stored and listed in numeric order. Unlike with infotype 0002, with infotype 0041, the fields on this screen can store variable data.

111

How To Report Off Multiple Dates On Infotype 41 (cont.)

If you were to look at the technical details of the Date Type 30 date field you would see the value P0041 DAT01

112

How To Report Off Multiple Dates On Infotype 41 (cont.)

To create a basic list query report that would include an associates hire date (for example, Date Type 36) You simply need to include the Date Type field on your reports Selection screen (as discussed in the infotype 6 address example) Using that method, you could, upon report execution, specify that you only want that one date type in the report output This ensures that you get only a single line of data per associate in your report output

113

How To Report Off Multiple Dates On Infotype 41 (cont.)

This is only a workaround because of the way a Selection screen works in SAP It includes in your report only data that meets the criteria entered on the Selection screen If some associates were missing a value for that particular field they would be excluded from the report output So what to do?

114

How To Report Off Multiple Dates via an ABAP Program


Here is a secret on how you can make it work This is designed for ABAP programmers only You can insert code into the InfoSet that evaluates each of the fields and creates fields in the InfoSet that store each specific field Using the infotype 41 example, you could add code to your InfoSet that evaluates each of the Date types and creates fields in the InfoSet for each specific Date type This allows you to simply select which dates you want to include in your report output (regardless of the number you want to include) and all will appear on one line

115

Solution: Use an ABAP Subroutine


Can use in an InfoSet query or a custom ABAP program Give to your developers It takes in a personnel number, date, and type and returns the desired date
INFOTYPES: 0041 NAME I0041. TABLES: PA0167. DATA: DAR LIKE PA0041-DAR01, DAT LIKE PA0041-DAT01, HIREDATE LIKE PA0041-DAT01, REHIREDATE LIKE PA0041-DAT01, LASTHIREDATE LIKE PA0041-DAT01, ADJSVCDATE LIKE PA0041-DAT01, TERMDATE LIKE PA0041-DAT01, SEPARATIONDATE LIKE PA0041-DAT01, BENTERMDATE LIKE PA0041-DAT01, KEY_DATE1 TYPE D. FORM GET_DATE USING VALUE(PERNR) VALUE(DATUM) VALUE(TYPE) CHANGING RESULT. CLEAR RESULT. PERFORM READ_INFOTYPE(SAPFP50P) USING PERNR '0041' SPACE SPACE SPACE DATUM DATUM '0' 'NOP' I0041. IF SY-SUBRC EQ 0. DO 20 TIMES VARYING dar FROM I0041-dar01 NEXT I0041-dar02 VARYING dat FROM I0041-dat01 NEXT I0041-dat02. IF dar IS INITIAL. EXIT. ENDIF. IF DAR EQ TYPE. RESULT = DAT. exit. ENDIF. ENDDO. ENDIF. ENDFORM.

116

Reporting On PA and PD Data in the Same Report

SAP delivers logical databases (DataSources) containing all SAP ERP HCM infotypes to use for reporting You simply select the infotypes and fields in which you are interested in reporting PAP is normally used for recruitment data PNPCE is normally used for PA + concurrent employment PNP is normally used for PA data Contains data related to an employee Includes infotypes 0000-0999 PCH is normally used for PD data Data related to an object Specify an object type to report on one, or none for all
117

How Can I Include PA and PD Data in the Same Report?

When designing the InfoSet (SQ02) during configuration Use the standard logical database PCH Select the PA infotypes to be included when running the report On the selection screen, specify an object type and enter an evaluation path

118

Pasting or Importing Values

Ever have a list of people (uniquely identifiable) that you need more information on? A Microsoft Excel worksheet from a vendor A Social Security Number list from the Department of Labor A report you created that needs just a two more fields You can run any report (standard, custom, or SAP Query) for just a list of values you have

119

Pasting or Importing Values (cont.)

In a reports Selection screen you can paste (or transfer) values into a reports selection screen to yield limited values You can also import files from a text file

120

What Well Cover


Reporting options available for HR & Payroll SAP Using SAP Query Creating a report using SAP Query basic screens Creating a report using SAP Query advanced screens Exploring configuration decisions Uncovering tips and tricks Wrap-up

121

Resources

The only book available on SAP Query-based reporting is now available at all major booksellers Danielle Larocca Signorile, SAP Query Reporting, (Sams, 2006).

122

Resources (cont.)

SAP Professional Journal Danielle Larocca Signorile, Empower your end users to create informative reports in real time with no technical training an administrators guide to configuring and using the SAP R/3 query reporting tools, (SAP Professional Journal, March/April 2006).

123

Resources (cont.)

Danielle Larocca, Create Simple and Advanced Statistic and Ranked Lists Using SAP Query presentation, (Reporting and Analytics conference, 2006).

124

Resources (cont.)

Important how-to documents and training materials: SAP Querys Date Selection Screen Options Toolbar Options for Your SAP Query Output

125

Resources (cont.)

Important how-to documents and training materials: (cont.) Danielle Larocca Signorile, Reconsidering the ABAP Query for Your Reporting Needs Proper Configuration Is the Key to Success, (SAP Professional Journal, March/April 2002). Danielle Larocca Signorile, Ask the HR Expert: How to Add Custom Infotypes to Your Queries for HR/Payroll Reporting, (HR Expert, October 2004).
126

Resources (cont.)

HR Expert Danielle Larocca Signorile, Configure HR Actions/Events to Improve Your Reports, (August/September 2003) Atul Bakliwal, Save Time by Automating Your SAP Queries, (October 2004) Danielle Larocca Signorile, How to Eliminate Duplicate Line Reporting, (April 2004) Danielle Larocca Signorile, HRs 5 Reporting Options in R/3: How Do You Choose?, (premiere issue, 2003) Danielle Larocca Signorile, Monitor Compliance with the New US DOLs FairPay Overtime Initiative, (Volume 2, Issue 7, 2004) Danielle Larocca Signorile, SAP Query Allows You to Perform Calculations on Your HR and Payroll Data, (October 2003) Danielle Larocca Signorile, Ask the HR Expert: Copy and Move Queries without Transports, (May 2004)
127

7 Key Points to Take Home

There are many different reporting options available to you; research which are a best fit for your organization Configuring your SAP system to use the SAP Query tool takes less than five minutes, but make the appropriate strategic decisions first Queries should be created and executed real time in your live PRD client Master the seven basic screens of the SAP Query before moving on to the advanced screens

128

7 Key Points to Take Home (cont.)

Via the ALV output of your reports, you have built-in integration to the Microsoft family of products Make the appropriate security decisions before using the tool Having access to your SAP data is critical for making informed business decisions

129

Your Turn!

How to contact me: Danielle Larocca Danielle.Larocca@axonglobal.com


130

Disclaimer
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Wellesley Information Services is neither owned nor controlled by SAP.

131

Вам также может понравиться