the secrets to reporting success using sap query

132

Upload: scott-hardy

Post on 10-Oct-2014

330 views

Category:

Documents


14 download

TRANSCRIPT

© 2008 Wellesley Information Services. All rights reserved.

The Secrets to Payroll Reporting Success Using SAP Query

Danielle LaroccaAxon Global Solutions

2

What We’ll 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

3

What Reporting Options Are Available?

1. Custom-coded reports (using ABAP, SAPScript, .NET, etc.)2. SAP NetWeaver® Business Intelligence (BI)3. Third-party add-on solutions (i.e., Cognos)4. SAP standard canned reports5. Report Painter/Report Writer6. SAP preinstalled reporting tools (Query Tools)

SAP Query InfoSet (Ad Hoc) QueryQuickViewer

4

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

5

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.

6

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

7

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

8

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

9

6. Preinstalled SAP Query Reporting Tools

A. SAP Query B. InfoSet (Ad Hoc) QueryC. QuickViewer

10

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

11

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

12

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

13

What Are the Differences Between All These Tools?

• Custom-coded reports • SAP standard canned

reports• SAP preinstalled reporting

tools (Query, InfoSet, Ad Hoc, QuickViewer)

Free & Real Time

• Third-party add-on solutions

Requires Purchase and Implementation & Not

Real Time

Free & Not Real Time

• SAP NetWeaver BusinessIntelligence (BI)

14

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 forspecific needs

• Can use multiple tools at any given timeFor 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

15

Mastering Standard SAP Query Tools

• SAP preinstalled reporting tools in the Query familySAP Query InfoSet (Ad Hoc) QueryQuickViewer

• The tools delivered with your SAP system are:Easy to set up, easy to use, real-timeAvailable for every application module in SAPAllow end users (without technical skills) create their own reports

Please check out the session titled “Mastering Standard SAP Query Tools” to learn more

16

Comparing Your SAP Reporting Options

Compatible with all current versions of SAP R/3

Compatible with all current versions of SAP R/3

ALLSAP R/3 4.6C+SAP R/3 4.6C+SAP R/3 3.x+

Highly robust ad hoc or standard reports with huge array of capabilities

Highly robust ad hoc or standard reports with huge array of capabilities

Robust reports including subtotals, sorts, colors, etc.

Basic lists onlyBasic lists onlyRobust reports including subtotals, sorts, colors, and calcs

Excel, Web, or Crystal

Excel, Web, or proprietary

Standard or Graphical format

Standard or Graphical format

Standard formatGraphical or Standard format

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

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

End-user tool that allows for pre-delivered or custom, standard, or flexible analysis

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

End-user tool with a single-screen WYSIWYG approachEquivalent to an SE16 table view

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

SAP NetWeaver

BI

Third-Party

Module-Specific

IS

QuickViewInfoSet Query

SAP Query

17

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

18

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 criteriaSecurity is the same for allStandardization for naming conventions, storage, etc., is compliantYou are not at risk for pulling different numbers withdifferent tools

• Recommendation

Use SAP Query for all HR and Payroll query reporting needs

19

How SAP Query Works Behind the Scenes

• Two major components: Query Groups and InfoSets

20

One-Time Configuration Takes Only Five Minutes!

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

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

21

What We’ll 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

22

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

23

What We’ll 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

24

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

25

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

26

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

27

Screen #3 – Select Fields

• Select the fields to include in your report

28

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

29

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

30

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

31

Screen #7 – Your Finished Report

32

Compare the Report Output with Screen #5

33

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

• Let’s 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 themmaster the seven basic screens before moving on to the more advanced screens (8-14)

34

A Detailed Look at Screen #1

Title is required; other fields are for reference onlyFor 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 presentYou can alter the print width settings if printing your report directly from SAP as an ABAP List

35

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

36

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

37

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)

38

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

39

A Detailed Look at Screen #4

All fields selected on screen #3 appearChoose the fields you want to appear on the selection screen (#6) when executing the reportYou can select or limit your output using any of these valuesFor 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

40

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

41

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 formatPermit row count in SAP List Viewer: Counts the number of rows in the list when it is displayed with the SAP List Viewer (ALV)

42

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.

43

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.

44

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!

45

What We’ll 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

46

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)

47

What the Report Output Looks Like Before Changes in ALV

48

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

49

Let’s See a Demonstration of Creating an SAP Query Report

50

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)

51

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 navigatedirectly to the screen

52

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

53

See What the Sub-Total Looks Like

Before

After

54

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

55

See What the New Sub-Total Text Looks Like

Before After

56

Screen #10 – Change Line Output Options

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

57

See What the Changes Look Like

Before

After

58

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

59

See What the Changes Look Like

BeforeAfter

60

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

61

See What the Changes Look Like

BeforeAfter

62

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

63

See What the Changes Look Like

BeforeAfter

64

Screen #14 – Graphics

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

65

See What the Changes Look Like

66

What We’ll 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

67

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

68

The SAP Query Family of End-User Reporting Tools

• Two major components: Query Groups and InfoSets

69

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:

PayrollFinanceAccounts PayableSalesHR

70

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 theseExplore via transaction SE36

71

One-Time Configuration Takes Only Five Minutes!

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

These configuration steps are the same for SAP Query and InfoSet/Ad Hoc Query. This configuration can also be used for QuickViewer – do it once and you are done!

The one-time, technical configuration is the easy part

S l ti

72

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 you’ll 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?

73

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 serverSTANDARD – Available only on the client in which it is created (although it can be copied between clients without transports)

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

Best business practice is to create objects in the standard area and to keep them client-specific

74

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

75

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 needsA 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

76

What Can You Base Queries On?

• SAP Query allows you to create queries based on:Table join using a SAP NetWeaver AS tableDirect read of tableLogical 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

77

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 don’t want untrained users using the tool or working with its configuration

• SAP Query security optionsSet security so that some users can create reports while others can only execute themAssign transaction codes to queries to make queries available to end users who do not have access to the SAP Query toolInfoSets should only be maintained by technical personnel in the DEV environment, a client to which traditional end users do not have access

78

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 SAPQuery Authorizations

79

What We’ll 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

80

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

81

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 = 134LINE_WIDTH_DST = 255TABLES CONTENT_IN = bufferpdf "table from FM CONVERT_ABAPSPOOLJOB_2_PDFCONTENT_OUT = out_tableEXCEPTIONS ERR_LINE_WIDTH_SRC_TOO_LONG = 1ERR_LINE_WIDTH_DST_TOO_LONG = 2ERR_CONV_FAILED = 3OTHERS = 4.

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

82

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 analyze3) Choose the timeframe to analyze4) Choose transaction profile5) Sort the list by program/transaction code and look for the

one you want to find6) 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

83

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), andqueries between clients without using the traditional transport function

• For example, you can move queries created in production to your development and QA clients

84

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”

85

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

• Create local fields within the query and do calculationsHire 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”

86

Helpful Hints and Best Practices

• Always use naming conventions for report creationPopular 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 featureGreat if you need a new report that is similar to an existingreportSelect the report from the main screen and click the Copy toolbar iconBoth the report and the variant are copied

• SAP Query offers a locking featureChoose the lock feature on screen #1 of SAP Query so that no one else can modify or delete your query

87

Post-Training Pitfalls and Deployment Advice

• Monitor random users as part of a regulatory auditEnsures that the tool is being properly usedLook through users’ queries Set the SAP trace mode to “on” for a user Monitor the system utilization record

• Routinely audit InfoSets to detect performance issuesUse in cases where SAP logical databases are not being used Ensures that the retrieval methods designed work efficiently and accurately

88

Post-Training Pitfalls and Deployment Advice (cont.)

• Try to prevent duplicate queriesBecause the reporting tool is so easy to use, often if the reports are not well organized, it’s 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 tomultiple groups) using parameter AQB. To toggle between multiple user groups, use SHIFT + F7.

89

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

90

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

91

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

92

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 dataPNPCE – HR (PA) personnel administration master dataPCH – 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

93

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:

94

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 datafrom 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.”

95

Payroll Result Reporting

• Which tables are used to populate the infotypes used for payrollresult reporting?

The IT0402 would need the RT data for the current period resultsThe 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

96

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

97

Naming Conventions and Cataloging (cont.)

• A popular practice is DLS_REPORTNAME (your initials followedby an underscore and the report name)

• This way all your reports are grouped together and are more distinguishable.

• Cuts down on people mistakenly changing other’s reports

98

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 intendto include

99

• 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

Proper Use of Period Fields (cont.)

100

• 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

Today Period Field on Selection Screen

101

Current Month and Current Year Period Fields

• Current monthIf 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 yearIf 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

102

Up to Today and from Today Period Fields

• Up to todayIf 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 periodThis is the opposite of the From today period selection

• From todayIf you select the From today option, the end of time (defined as12/31/9999) and the current system date are used as the start and end dates of the Person and data selection periodThis is the opposite of the Up to today period selection

103

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 periodEnter 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

104

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!

105

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 theobjects 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

106

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 documentthat explains the anatomy of an evaluation path(Anatomy of an Evaluation Path.ppt)

107

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 todaySelecting 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 HCMreport

108

• 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

Eliminate Duplicate Line Reporting (cont.)

109

• 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 P0002-VORNA

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

Eliminate Duplicate Line Reporting (cont.)

110

Eliminate Duplicate Line Reporting (cont.)

• This happens only with infotypes that have multiple values in a single or table-based 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

111

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.

112

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

113

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

• To create a basic list query report that would include an associate’s hire date (for example, Date Type 36)

You simply need to include the Date Type field on your report’s 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

114

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?

115

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

116

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) USINGPERNR '0041' SPACE SPACE SPACE DATUM DATUM '0' 'NOP'

I0041.IF SY-SUBRC EQ 0.DO 20 TIMES

VARYING dar FROM I0041-dar01 NEXT I0041-dar02VARYING dat FROM I0041-dat01 NEXT I0041-dat02.IF dar IS INITIAL.EXIT.

ENDIF.IF DAR EQ TYPE.RESULT = DAT.exit.

ENDIF.ENDDO.

ENDIF.ENDFORM.

117

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 dataPNPCE is normally used for PA + concurrent employmentPNP is normally used for PA data

Contains data related to an employeeIncludes infotypes 0000-0999

PCH is normally used for PD dataData related to an objectSpecify an object type to report on one, or none for all

118

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

• When designing the InfoSet (SQ02) during configuration

Use the standard logical database PCHSelect the PA infotypes to be included when running the reportOn the selection screen, specify an object type and enter an evaluation path

119

Pasting or Importing Values

• Ever have a list of people (uniquely identifiable) that you needmore information on?

A Microsoft Excel worksheet from a vendor A Social Security Number list from the Department of LaborA 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

120

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

121

What We’ll 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

122

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).

123

Resources (cont.)

• SAP Professional JournalDanielle Larocca Signorile, “Empower your end users to create informative reports in real time with no technical training —an administrator’s guide to configuring and using the SAP R/3 query reporting tools,”(SAP Professional Journal, March/April 2006).

124

Resources (cont.)

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

125

Resources (cont.)

• Important “how-to” documents and training materials:

SAP Query’s Date Selection Screen OptionsToolbar Options for Your SAP Query Output

126

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).

127

Resources (cont.)

• HR ExpertDanielle 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, “HR’s 5 Reporting Options in R/3: How Do You Choose?,” (premiere issue, 2003)Danielle Larocca Signorile, “Monitor Compliance with the New US DOL’s 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)

128

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

129

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

130

Your Turn!

How to contact me:Danielle Larocca

[email protected]

131

DisclaimerSAP, 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.