P. 1
sappress_mysap_hr_technical principles2

sappress_mysap_hr_technical principles2

|Views: 356|Likes:
Published by jiteshmnair

More info:

Published by: jiteshmnair on Apr 12, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/25/2012

pdf

text

original

Sections

  • 6 Reporting in HR
  • 6.1 Master Data
  • 6.1.1 Structuring a Report for Personnel Administration Infotypes
  • 6.1.2 Structuring a Report for Time Management Info- types
  • 6.2 Organizational Management
  • 6.2.1 Sequential Evaluation
  • 6.2.2 Structural Evaluation
  • 6.3 Payroll Data
  • 6.4 Time Management
  • 6.5 Formatting Output with the ABAP List Viewer

Ewald Brochhausen, Jürgen Kielisch, Jürgen Scherring, Jens Staeck

mySAP® HR—Technical Principles and Programming

Contents
Preface to the 1st Edition Foreword 1
1.1 1.2 1.3

11 13 15
15 15 17

Introduction
Dimensions of mySAP HR ...................................................................... Adjustment Possibilities ........................................................................ The Structure of This Book.....................................................................

2
2.1 2.2

Data Structures in HR
Data Structures in Context .................................................................... Personnel Administration Master Data.................................................. 2.2.1 Personnel administration infotypes............................................ 2.2.2 Subdivision of infotypes–the subtype ........................................ 2.2.3 Object Identification ................................................................. 2.2.4 Time and Time Constraints in Infotypes..................................... 2.2.5 Single Screen and List Screen .................................................... 2.2.6 Default Values for Infotypes ...................................................... 2.2.7 An Infotype Header................................................................... 2.2.8 Features and Screen Modifiers .................................................. 2.2.9 Assigning Infotypes to Countries ............................................... 2.2.10 Technical Data Structure of Infotypes ........................................ 2.2.11 Data Structures and Tables: Personnel Administration Infotype . 2.2.12 Infotype Views .......................................................................... Organizational Management and Personnel Planning Data ................... 2.3.1 Data Model............................................................................... 2.3.2 Personnel planning infotypes..................................................... 2.3.3 Technical Data Structure of Infotypes ........................................ 2.3.4 Table Infotypes ......................................................................... 2.3.5 External Object Types ............................................................... 2.3.6 External Infotypes ..................................................................... 2.3.7 Data Structures and Tables: Personnel Planning Infotype ........... 2.3.8 Checking the Consistency of the Data Model ............................ 2.3.9 Checking the Consistency of Infotypes ......................................

21
21 21 22 24 25 25 27 28 29 30 33 34 41 42 43 43 48 49 55 56 57 58 59 60

2.3

Contents

5

2.4

Time Management Data ........................................................................ 2.4.1 Time Management Master Data ................................................ 2.4.2 Time Events .............................................................................. 2.4.3 Time Evaluation Input............................................................... 2.4.4 Time Evaluation Results ............................................................ Payroll Data ........................................................................................... 2.5.1 Central Payroll Information ....................................................... 2.5.2 Payroll Result Data.................................................................... 2.5.3 Cluster Directory ...................................................................... 2.5.4 Payroll Data for Reporting.........................................................

61 61 61 63 65 67 67 68 73 75

2.5

3
3.1

Reading and Processing Data
Logical Databases in HR ........................................................................ 3.1.1 Logical Database PNP for Personnel Master Data ...................... 3.1.2 Logical Database PNPCE for Personnel Master Data.................. 3.1.3 Logical Database PCH for Personnel Planning ........................... Access Without a Logical Database ....................................................... Using Macros......................................................................................... 3.3.1 Overview.................................................................................. 3.3.2 Macros in Logical Database PNP ............................................... 3.3.3 Macros in Logical Database PCH ............................................... Function Modules ................................................................................. 3.4.1 Properties ................................................................................. 3.4.2 Using Function Modules in HR.................................................. 3.4.3 Using Features ..........................................................................

77
77 79 91 93 98 100 100 101 107 108 108 109 112

3.2 3.3

3.4

3.5

Accessing Clusters ................................................................................. 116 3.5.1 Overview of Clusters................................................................. 116 3.5.2 Payroll Results .......................................................................... 118 Enhancements with Customer Exits and Business Add-Ins ................... 122 3.6.1 Customer Exits.......................................................................... 122 3.6.2 Business Add-Ins....................................................................... 124

3.6

4
4.1

Roles and Authorizations

129
129 129 131 133 135 135 145 149 152

The SAP Authorization Concept............................................................. 4.1.1 Authorization Objects, Authorizations, and Profiles................... 4.1.2 Role Concept and Profile Generator.......................................... 4.1.3 Functions of the Profile Generator ............................................ Authorizations in the Context of SAP HR .............................................. 4.2.1 Authorization Objects ............................................................... 4.2.2 Authorization Level—Graded Write Authorizations ................... 4.2.3 Organizational Key ................................................................... 4.2.4 Structural Authorization Check .................................................

4.2

6

Contents

4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.2.10

HR Authorization Main switches ............................................... Time Dependency ..................................................................... Implementation ........................................................................ Enhancement Options............................................................... Interaction Between the Application and the Authorization Check ..................................................... Searching for Errors...................................................................

159 161 164 168 179 180

5
5.1

Adjusting the Applications

183
183 183 185 195 205 210

Personnel Administration....................................................................... 5.1.1 Components in the Repository .................................................. 5.1.2 Enhancing Infotypes.................................................................. 5.1.3 Creating Infotypes..................................................................... 5.1.4 Enhancing Infotypes for Fast Data Entry .................................... 5.1.5 Multiple-Infotype Entry with Fast Entry of Action Data .............

5.2

Organizational Management.................................................................. 214 5.2.1 Enhancing infotypes .................................................................. 214 5.2.2 Creating Infotypes..................................................................... 219 Time Recording ...................................................................................... 226 Payroll and Time Evaluation ................................................................... 5.4.1 Controlling Payroll and Time Evaluation .................................... 5.4.2 Functions .................................................................................. 5.4.3 Operations ................................................................................ 228 228 231 235

5.3 5.4

6
6.1

Reporting in HR

239

Master Data ........................................................................................... 239 6.1.1 Structuring a Report for Personnel Administration Infotypes...... 239 6.1.2 Structuring a Report for Time Management Infotypes................ 251 Organizational Management.................................................................. 255 6.2.1 Sequential Evaluation ................................................................ 255 6.2.2 Structural Evaluation ................................................................. 257 Payroll Data ........................................................................................... 260 Time Management ................................................................................. 264 Formatting Output with the ABAP List Viewer...................................... 267

6.2

6.3 6.4 6.5

7
7.1 7.2 7.3

Reporting Tools

273

Overview of Evaluation Options ............................................................ 273 Reports in the Menu .............................................................................. 275 Using HIS ............................................................................................... 277

Contents

7

....................................4......... 333 HR Forms Workplace................ Country-Specific Roles.. 374 10...................5 Local Fields in Queries ......................... 7.......3 Creating InfoSets .................................................4.................... 9................4....3 8......................5 Ad-hoc Query ....... 9.................................................... 369 10.............2 Navigation .................................1 Business Objects and BAPIs .............. Interface Toolbox........ 340 Graphical Output......... 9...............3 Configuring the File Layout ..........................................................................2 Single Roles.............4... 7.......................2 10........1...........2 Configuring the Interface Format ................. 9..........3 Using BAPIs ............................................... 324 8 Creating Forms with the HR Forms Workplace 331 8...........................4 8.......... 7........ 374 10..........................2......... 7............8 Defining Switches .1 Installation Variants ...............4............. 9...............................................................2............2.................... and Composite Roles ...............6 Creating Additional Fields in the InfoSet ........4 SAP Query ............... 281 282 282 290 293 295 299 302 308 318 7............................................1 Employee Self-Service 369 Functional Scope ...................2............................2 The ITS Files ................................................... 7....................................................2.....1 Business View ..............................................................................2 HR Objects in the BOR ..3 8 Contents ..... 7.................4..3.....................................7......................................................1 The Concept of Role .2 10 10...................................1......................................................................... 332 Creating Metadata with the HR Metadata Workplace ........................................................................................1 Interface Tools 349 349 349 351 353 357 358 361 363 Programming with BAPIs................... 369 10............ 7..........3.. 7.......................1.................. 371 10............................1 8........................................................................ 9..............2 8.....1 Exporting the Data...........................................1.... 370 The "Employee" Role ..........................................................................4............................7 Creating Additional Cross-InfoSet Fields ........................... 372 Overview of the Internet Transaction Server .1 Work Areas............................... 7.....1....... 343 9 9.... 331 Creating Forms ...........................9 Payroll Infotypes ..............................5 Options for Creation.....................................................................4.. 9........................................................................4.........................................2 Creating a Query ...........................4 Assignment to User Groups ................................................. 371 10........................................ 375 10.........

............................................................6............................... 10..... 410 10.........2 FlowLogic ..... 380 The ITS Modus Operandi .................... 10. 10......6........ 413 Life and Work Events ............5...5.......1 Concept of Life and Work Events ...... 382 HTML Business Functions.....................3...3 SAP GUI for HTML .......................... 10......................................................... 384 386 388 390 395 396 396 398 404 405 408 Programming Models...... 10.. 415 415 417 420 428 429 435 10.......4.....................................................5 10...........................3.....3 10..................1 Internet Services Based on HTML Templates (IAC).............................................................................................3 The Framework ................6 Web-enabling Reports ...... 10............................4 An Overview of L&W Tables ................4 Overview of the Most Important ITS Service Parameters .. Design and Function Enhancements ....5......................7..................................4....................................6 Creating a New L&W Event..............................................4 Creating a New Country-Dependent Service ......................3 Changing Fields or Flow Logic .....5 Customizing ....................... 410 10.................... 10................. 10.. 10......7 A ESS Scenarios The Authors Index 437 443 445 Contents 9 ....................................7......................3................10...............2 Prerequisites and Functionality........7..............4 10..........................7......................1 The ESS User Exits...........................................2 Design Adjustments ............5 Creating a New Service ....4........................................2 Sample Report in ESS .......5........................... 10..1 ESS Report Framework......................................................... 10............ 10............... 10............................... 10.................7..................................................5........................5 10......................................................7........................... 10...

and ascribing a dollar value to capability. knowing what is fundamental to the company’s HR strategy. and the expectations of HR processes to leverage these capabilities.Preface to the 1st Edition This book is an excellent resource for answering all your technical questions regarding SAP HR. extending. obtained through configuration only). and the degree to which SAP HR standard functionality is used. and particularly. In this context. Good understanding of the standard capabilities of SAP HR (that is. having a view of ideal HR processes. I would like to begin by discussing its importance in helping you to achieve business advantage. But. It is also generated through cost reduction of HR operations. The cost of implementation is determined by the level of change to current HR practices. they will have as their objective maximizing the value and minimizing the associated costs. the scope of R/3 support to HR processes. Value is obtained from improving the effectiveness of HR processes and analysis undertaken in support of decisions. Achieving an optimal solution for the cost/benefit equation requires: Deep understanding of the current company process and practice. The cost of ongoing support and operations is driven by system complexity and the level of rework required. but one that is not worth the cost? Preface to the 1st Edition 11 . the fundamental questions to be answered are: Is each perceived need for extension or adaptation of standard capability due to: Lack of knowledge and understanding of standard SAP HR capability? An existing company practice that could be replaced by a standard process? A valuable customization. since technology shouldn’t be applied for its own sake. Understanding of the relative cost (full life cycle) of customizing. developing a view of the target HR processes and functionality that are required to support them. or adapting what I have called the “standard capability”. given the inevitable implementation of new releases. When companies set out to implement SAP HR. Having understood the business priorities and SAP HR capability.

it will help you to achieve your goals. While it will not help you understand the HR-IT requirements and priorities for your company. The Hague.The implication is that avoiding extensions and adaptations is the most efficient solution. if you use this book judiciously. and how to best withstand future releases without redevelopment. Good luck with your implementation. this book serves as a unique guide for the technical reader on how to customize SAP HR for the lowest cost of implementation. It will certainly be a challenge. For extensions and adaptations that are worth the cost. Shell International 12 Preface to the 1st Edition . what is the lowest full life cycle cost solution? Which brings me back to this book. however. September 2003 Alan Hopwood IT Strategy Advisor. It clearly outlines the possibilities and recommends how they should be implemented.

With this in mind. Thanks also to all at our publishers. and John Parker. Udo Klein. Therefore. we wish to thank the many friends and colleagues who have supported us in the realization of this project. In an effort to help you with such issues—and at the request of many SAP HR users—the most important and basic principles of the HR system are presented in this book. and to Florian Zimniak in particular. or replace or add ABAP coding without the need to make modifications. Heiko Schultze. This increase in adjustment possibilities has sometimes made it more difficult to decide which is the best solution in each particular case. our primary focus is with the special features of HR—not with the general cross-application fundamentals of the SAP system. the standard features of the software have been enhanced with many new features and tools that allow for customization. Klaus Billig. it was often necessary to modify the R/3 HR system in order to include all company-specific features. two years after the first edition was released. and Matthias Wengner. Bärbel Bohr. Since then. enhance standard screens. In particular. Now. Their professional assistance regarding layout and other publishing issues was an important contribution to the publishing of this book. We are very pleased that the publishing house has decided to publish a revised edition of this book. In addition.Foreword The first installation of an R/3 HR system occurred more than ten years ago. A big thank you to all of them for their useful advice and assistance. we would like to mention Ulf Bangert. throughout its development. Examples of this customization capability include the ability to expand the data basis at will. you no longer have to modify the system in order to accommodate customer modifications. edition. Galileo Press. Because of the constantly increasing demands made on Human Resources (HR) software packages. for the second U. customers can customize the software without impacting the HR system. this book is intended for those of you who already have a basic knowledge of ABAP programming and SAP HR. Now. The success of the first edition has validated our decision to write a separate programming and technology book on a very specific segment of the SAP software. SAP HR has been greatly improved upon and many new functions have been added. Walldorf.S. August 2005 Ewald Brochhausen—Jürgen Kielisch—Jürgen Schnerring—Jens Staeck Foreword 13 . Whereas at first. we also want to mention Günter Lemoine.

6.6 Reporting in HR This chapter focuses on the appearance of reports in HR for various applications.1). with additional notes for the creation of reports. We recommend that you use key date analysis with standard report class XX_10001. It includes the account number. Report class Reporting in HR 239 .1.1 Structuring a Report for Personnel Administration Infotypes Generating a Simple List This example enhances the procedure that we used in Chapter 3. and the name of the bank (see Figure 6. In this example.1 Master Data Infotypes in personnel administration are numbered between 0000 and 0999. List of banking information Figure 6. Examples throughout illustrate the necessary basic elements for creating HR reports. infotypes in time management are numbered between 2000 and 2999. the bank routing number. the next examples used show a similar approach based on the logical database PNP. 6. a simple list of an employee’s banking information at the end of the month is generated. The following section shows a procedure for the evaluation of master data.1 List of Employees with Bank Details You must use the proper report class for the selection screen. and the numbering of customer-specific infotypes starts at 9000.

You must also define the required variables coname and bankname. you must ensure that variable <&0> is recorded in the text elements. REPORT ythr_bank LINE-SIZE 132.2). Infotypes 0002 (Personal Data) and 0009 (bank details) are processed. The logical database requires the statement: TABLES: pernr.Section 3. "last name. TABLES: pernr.2 Selection Screen with Key Date List header The key date must appear in the list header as xx. DATA: coname(40).xxxx. first name bankname(40).xx. with trailing periods up to the total length (10) of the variable to be displayed in the list header (see Figure 6.3 Text Elements for the “Basic Years” Report Declarations The required data declarations occur at the beginning of the report. The logical database PNP is entered in the properties of the report (see Figure 6.1 describes the structure of this report class. To do so. Figure 6. Figure 6. "Name of the bank 240 Reporting in HR . 0009.3). INFOTYPES: 0002.

END-OF-SELECTION. p0009-bankl(8). The assignment of the date in the list header writes the (changed) date to system variable syst-tvar0 at the INITIALIZATION event. GET PERNR GET pernr. START-OF-SELECTION.The default value is determined on the selection screen at the INITIALIZATION event. the data is output to a list. PERFORM clear_all. rp_provide_from_last p0002 space pn-begda pn-begda. such as the addition of a number of months to the specified data. The name is concatenated from the last name and the first name. WRITE: / pernr-pernr. Eternal call last_day_in_month determines the last day of the month based on today’s date. Finally. PERFORM concat_name USING coname. The tasks. First. WRITE pn-begda TO syst-tvar0 DD/MM/YYYY. Default values INITIALIZATION. The report-specific fields coname and bankname are ini- Master Data 241 . This default value is pnpbegda on the selection screen and can be overwritten if necessary. The current valid values of infotypes 0002 and 0009 (with subtype 0) are placed in the header row of internal tables P0002 and P0009. coname. the name of the bank is read. are mapped to the individual routines. which are described in the following section. rp_provide_from_last p0009 '0' pn-begda pn-begda. bankname. p0009-bankn(10). Module pool sapfp500 contains helpful routines to calculate events. all the values calculated in the report are initialized. Processing for each personnel number occurs at the GET PERNR event. pnpbegda = prop_date. PERFORM read_bankname USING bankname. PERFORM last_day_in_month(sapfp500) USING sy-datum prop_date.

FORM read_bankname USING p_bankname. 242 Reporting in HR . Formatting the Name The name is built from the current valid fields p0002-nachn and p0002vorna in the requested format. The function module returns a lot of information to the bankdata structure. '. ELSE. FORM clear_all. CALL FUNCTION 'HRCA_READ_BANK_ADDRESS_2' EXPORTING bank_country = p0009-banks bank_number = p0009-bankl IMPORTING bank_data = bankdata EXCEPTIONS not_found = 1 OTHERS = 2. IF sy-subrc = 0. DATA : bankdata TYPE bnka_bf. bankname. To read the bank name. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '. p_bankname = bankdata-banka. Here. we need the banka field (the name of the bank). p_bankname = 'no bank details'. You can use your own include to initialize report-specific fields for comprehensive reports. FORM concat_name USING p_conname. select an appropriate function module of the HR interface. ENDIF. ENDFORM. ENDFORM. CLEAR: coname.tialized. Interface FI The name of the bank is stored in FI tables. Function module HRCA_READ_BANK_ADDRESS_2 is ideal for the purposes of this report. ENDFORM. based on input parameters bank_ country (the country in which the bank is located) and bank_number (the bank routing number). These function modules begin with “HRCA”.

The entitlement years are calculated from the entry date and baseline date as the difference between the selection date and the most recent date. Figure 6.4 Date Specifications in Infotype 0041 A total of five types of dates are possible in this infotype. The data dictionary shows these fields as a chain of individual fields that are distinguished by the numbers in the field names. The example determines the number of entitlement years at the beginning of the month. or infotype 0041 (date specifications) as shown in Figure 6. Figure 6.4.6 shows the generated list.Evaluating Repetitive Structures In some infotypes of master data. The following report shows you how to access these data fields. Date specifications Figure 6. Only the personnel numbers with date type 20 at the selection event should be processed.5 shows an excerpt of the data structure of infotype 0041.5 Structure for Infotype 0041 (Date Specifications) Master Data 243 . infotype 0052 (wage maintenance). The entry date and the basic date (date type 20) should also appear in the list. Figure 6. Examples of infotypes with these characteristics include writing wage types in infotype 0008 (basic pay). features can be written repetitively in table form.

"Entry date rel_date LIKE sy-datum. instead of using lines( p0041 ). 0041. the day’s date is derived from the first of the month and made available to the selection screen. "Date type dat LIKE p0041-dat01. DATA: hire_date LIKE sy-datum. START-OF-SELECTION. "last name. processing occurs again for each personnel number. no further processing 244 Reporting in HR .Figure 6. GET PERNR At the GET PERNR event. A check is performed to verify if internal infotype table P0041 is populated. pnpbegda+6(2) = '01'. WRITE pn-begda TO syst-tvar0 DD/MM/YYYY. "date At the INITIALIZATION event. first name DATA: dar LIKE p0041-dar01. You must supply another auxiliary variable with DESCRIBE in older releases. pnpbegda = sy-datum.6 List Output of “Basic Years” Report Data declarations The required data declarations are first made at the beginning of the report. The current valid values of infotype 0041 are placed into the header of internal table P0041 with macro rp_provide_ from_last. "Basic years coname(40). In this case. First. REPORT yrhr_date LINE-SIZE 132. If a valid value is not present. field pnp-sw-found receives a value that is not equal to zero (null). INITIALIZATION. TABLES: pernr. Fields dar and dat are required to read the repetitive structures. "Calculation base rel_years TYPE i. INFOTYPES: 0002. all the values calculated in the report are initialized. System variable systtvar0 is populated for the list header.

Report-specific variables are initialized in routine clear_all: FORM clear_all. rel_years = pn-begda+0(4) – rel_date+0(4). ENDIF. rel_years. hire_date. rel_years = rel_years – 1. rel_years. The entitlement years are calculated and the list is output. ENDIF. IF hire_date+4(4) >= pn-begda+4(4). Master Data 245 . PERFORM read_hire_date USING hire_date. CLEAR: coname. CHECK lines( p0041 ) > 0. PERFORM read_p0041 USING rel_date. rel_years = rel_years – 1. IF rel_date+4(4) => pn-begda+4(4). IF rel_date < hire_date. ENDIF. WRITE: / pernr-pernr. PERFORM clear_all. depending on the characteristics of these values. GET pernr. PERFORM concat_name USING coname. hire_date. rel_years = pn-begda+0(4) – hire_date+0(4). Afterward. rp_provide_from_last p0041 space pn-begda pn-begda. CHECK pnp-sw-found <> 0. ELSE. The date values of interest are read in routines read_hire_date and read_p0041. ENDFORM. coname. rel_date.occurs for the personnel number. rp_provide_from_last p0002 space pn-begda pn-begda. the current value of infotype 0002 is read. The name is concatenated from the last name and the first name. rel_date. END-OF-SELECTION.

The loop stops if no more entries are found or date type 20 has been read: FORM read_p0041 USING p_rel_date.The formatting of the name occurs in routine concat_name: FORM concat_name USING p_conname. CALL FUNCTION 'HR_ENTRY_DATE' EXPORTING persnr = pernr-pernr IMPORTING entrydate = p_hire_date EXCEPTIONS entry_date_not_found = 1 pernr_not_assigned = 2 OTHERS = 3. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '. the increments are determined by the difference from the field p0041-dar02. Entry date The entry date is determined with function module HR_ENTRY_DATE. DO loop The value for date type 20 is determined with routine read_p0041.. The entry point is determined by field p0041-dar01. which was introduced in Chapter 3: FORM read_hire_date USING p_hire_date. DO 12 TIMES VARYING dar FROM p0041-dar01 NEXT p0041-dar02 246 Reporting in HR . * . The following statement processes structure p0041: DO 12 TIMES VARYING dar FROM p0041-dar01 NEXT p0041-dar02 Every run through the DO loop populates the field dar. ENDFORM. ENDFORM. The same process is applicable to the field dat. ENDIF.. '. IF sy-subrc <> 0.

Development of Basic Pay Figure 6. Note that the amounts of wage types that have been calculated indirectly are not stored permanently in the tables. Also. the name of employee. ENDIF.VARYING dat FROM p0041-dat01 NEXT p0041-dat02 IF dar IS INITIAL. note that the rows that contain names are highlighted in color. Evaluating Basic Pay You often need to determine wage types and their amounts from infotype 0008 (basic pay). ENDDO.7 The “Development Basic Pay” Report The list of this sample report (see Figure 6. ELSEIF dar = '20'. Default values for the data selection period include the end of the year and the beginning of the evaluation period (see Figure 6. Master Data 247 . and the valid total payments in the period. EXIT. p_rel_date = dat. Function modules that contain the required functions can evaluate these wage types. EXIT. ENDFORM. but are determined only at runtime.8) should display the personnel number. all amounts are converted into the most recent valid currency. The sample report lists the development of basic pay for employees over the last 10 years. this information is stored in the repetitive groups of infotype 0008. In the previous example.7). The standard selection screen is used. If there is a change of currency.

INFOTYPES: 0001. pnpbegda and pnpendda. and the working area w_bewlart. are determined at the INITIALIZATION event. 0008. 0007.8 List Output of “Development Basic Pay” Report Valuated wage types The data declarations include the required infotypes for function module RP_FILL_WAGE_TYPE_TABLE_EXT (used later).Figure 6. is also required for the currency used last. pnpendda = sy-datum. "Wage types 1x t_bewlart TYPE TABLE OF pbwla. TABLES: pernr. pnpbegda = pnpbegda + 1. "Wage types Work last_curr LIKE p0008-waers. 0002. PERFORM day_minus_years(sapfp500) USING pnpendda '10' pnpbegda. pnpendda+4(4) = '1231'. "Last currency coname(40). The wage 248 Reporting in HR . last_ curr. "last name. first name Data selection period The default values for the data selection period. REPORT yrhr_p0008_list LINE-SIZE 132. "Overall wage types w_bewlart TYPE pbwla. DATA: bewlart TYPE TABLE OF pbwla. the valuated wage types bewlart and t_bewlart. INITIALIZATION. A variable. At the beginning of processing for each personnel number. initialization occurs and the valid name is determined from infotype 0002. START-OF-SELECTION.

CLEAR: coname. 132 space. PERFORM concat_name USING coname. The last currency of the infotypes is stored in the variable last_curr. ENDFORM. from the current values of infotype 0008 for the period being considered. PERFORM clear_all. t_bewlart. last_curr. PERFORM list_sum.types are read with routine read_p0008 from infotype 0008. A PROVIDE loop in subprogram read_p0008 processes infotype table p0008 for data from the data selection period. w_bewlart. The output of the personnel number and the name are formatted in color by the FORMAT statement. FORMAT COLOR OFF. '. The variables. bewlart. PERFORM read_p0008. ENDFORM. GET pernr. Function module RP_FILL_WAGE_ TYPE_TABLE_EXT populates the internal table of the valuated wage types. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '. structures. coname. rp_provide_from_last p0002 space pn-begda pn-endda. and internal tables are initialized in routine clear_all: FORM clear_all. The name is built from the last name and the first name: FORM concat_name USING p_conname. FORMAT COLOR COL_GROUP INTENSIFIED ON. END-OF-SELECTION. WRITE: / pernr-pernr. the wage types for each infotype period are totaled in the subprogram and output. Then. bewlart. Master Data 249 . The results of all the periods for a given personnel number are collected in internal table t_bewlart.

a conversion occurs with function module CONVERT_TO_LOCAL_CURRENCY and the table is modified accordingly. CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE_EXT' EXPORTING begda = p0008-begda endda = p0008-endda infty = '0008' pernr = pernr-pernr TABLES pp0001 = p0001 pp0007 = p0007 pp0008 = p0008 ppbwla = bewlart EXCEPTIONS error_at_indirect_evaluation = 1 OTHERS = 2. If the currency for a wage type in the table does not match the last currency. ENDPROVIDE. * . The values for the same period are totaled and output to the list. LOOP AT t_bewlart INTO w_bewlart. APPEND LINES OF bewlart TO t_bewlart. IF sy-subrc <> 0. CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY' EXPORTING date = w_bewlart-endda foreign_amount = w_bewlart-betrg foreign_currency = w_bewlart-waers local_currency = last_curr IMPORTING 250 Reporting in HR .FORM read_p0008. PROVIDE * FROM p0008 BETWEEN pn-begda AND pn-endda.. FORM list_sum. Currency Conversion Internal table t_bewlart is processed further in routine list_sum. IF w_bewlart-waers <> last_curr. ENDFORM.. ENDIF. last_curr = p0008-waers.

ENDIF. 6. w_bewlart-betrg. we do not recommend that you use this procedure. AT END OF endda.1.9 shows the list of absences in a report. Internal table t_absence with working area w_absence is created for a cross-employee summary: MODE n Master Data 251 . ENDLOOP. w_bewlart-endda. last_curr.local_amount = w_bewlart-betrg EXCEPTIONS no_rate_found = 1 overflow = 2 no_factors_found = 3 no_spread_found = 4 derived_2_times = 5 OTHERS = 6. The absence types of the current calendar year (specified in the report parameters) should be evaluated for all selected employees. ENDAT. ENDFORM. w_bewlart-waers = last_curr. Separate summaries are provided for absences by employee group and employee subgroup. MODIFY t_bewlart FROM w_bewlart. Users should be able to switch the listing of individual absence records on or off. Parameter s_name suppresses the individual list and selection s_abs selects only the absences that we are interested in. IF sy-subrc <> 0. This addition prevents populating internal table P2001 at the GET PERNR event. ELSE.2 Structuring a Report for Time Management Infotypes When the logical database PNP is used at the GET PERNR event. ENDIF. The MODE n addition should be specified along with the data declaration for infotype 2001. However. the internal tables (Pnnnn) are populated with all the infotypes (nnnn) that have been declared with INFOTYPES. WRITE: /50 w_bewlart-begda. SUM. A better way of proceeding is illustrated with the “Overview Absences” report for infotype 2001 (absences). given the large quantity of records for time management infotypes. Figure 6.

2001 MODE n.9 List Output of “Absences” Report REPORT yrhr_p2001_list LINE-SIZE 132. TABLES: pernr. t_absence TYPE TABLE OF absence. "Absence name END OF absence. INFOTYPES: 0001. "Name. "Absence type abwtg LIKE p2001-abwtg. first name TYPES: BEGIN OF absence. "Employee group persk LIKE p0001-persk. pnpbegda = pnpendda = sy-datum. SELECT-OPTIONS: s_abs FOR p2001-awart. persg LIKE p0001-persg. "Employee subgroup awart LIKE p2001-awart. 252 Reporting in HR . DATA: coname(40). The default values of the data selection period are determined at the INITIALIZATION event: INITIALIZATION. DATA: w_absence TYPE absence. PARAMETERS: s_name AS CHECKBOX.Figure 6. 0002.

PERFORM concat_name USING coname. At the beginning of routine read_p2001. START-OF-SELECTION. After all personnel numbers have been processed. individual processing with routine list_name is executed. The processing that has been discussed so far occurs for each personnel number and infotype 2001 is read with routine read_p2001. ENDFORM. ENDIF. a summary is output with routine list_sum: GET PERNR GET pernr. rp_provide_from_last p0002 space pn-begda pn-endda. This populating of table p2001 occurs with function module rp_read_all_time_ity. The entries in internal table p2001 that do not meet the specifications of the selection options are then deleted: they do not require further processing. IF NOT s_name IS INITIAL. '. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '.pnpbegda+4(4) = '0101'. pnpendda+4(4) = '1231'. The processing of routines clear_all and concat_name occurs just as it does for the other examples. PERFORM read_p2001. CLEAR: coname. When parameter s_name is activated. FORM concat_name USING p_conname. rows of internal table p2001 are populated as determined by the data selection period. WRITE: / pernr-pernr. 132 space. coname. PERFORM list_sum. PERFORM list_name. FORM clear_all. If the table still contains values. END-OF-SELECTION. ENDFORM. FORMAT COLOR COL_GROUP INTENSIFIED ON. PERFORM clear_all. The Populating Table p2001 Master Data 253 . the absences are processed further. FORMAT COLOR OFF.

DELETE p2001 WHERE NOT ( awart IN s_abs ).corresponding contents of infotype p0001 are transferred to working area w_absence. DATA: w_t554t LIKE t554t. ENDIF. IF sy-subrc = 0. subprogram list_name loops over internal table p2001 to read the text of the absence type with routine re554t. PERFORM re554t USING sy-langu '01' p2001-awart atext. IF lines( p2001 ) > 0. rp_read_all_time_ity pn-begda pn-endda. p2001-endda. ENDFORM. P2001-awart. ENDLOOP. It is assumed that the second parameter (Personnel subarea grouping for absence and attendance types) has the constant value of “01”. WRITE: /30 p2001-begda. FORM list_name. LOOP AT p2001. p2001-abwtg. COLLECT w_absence INTO t_absence. The remaining entries of internal table p2001 are also transferred. LOOP AT p2001. FORM read_p2001. ENDFORM. Absence types For a list of individual absences. MOVE-CORRESPONDING p2001 TO w_absence. DATA: atext LIKE t554t-atext. MOVE-CORRESPONDING p0001 TO w_absence. SELECT SINGLE * FROM t554t INTO w_t554t WHERE sprsl = p_langu AND moabw = p_moabw AND awart = p_awart. 254 Reporting in HR . ENDLOOP. atext. Text Table Routine re554t reads text table T554T for the absence types in the logon language and makes the results available: FORM re554t USING p_langu p_moabw p_awart p_atext.

In this example. ENDLOOP. w_absence-abwtg. The various object types in infotype 1002 can contain a description. LOOP AT t_absence INTO w_absence. 6.2 Organizational Management As noted in Chapter 3. WRITE: / w_absence-persg.1 Sequential Evaluation Job description The following report illustrates the use of sequential evaluation. ENDFORM.10). and the job ID and job title are highlighted in color (see Figure 6. Figure 6. FORM list_sum. ELSE. CLEAR p_atext. ENDIF. w_absence-awart. atext.10 Sequential Evaluation: Job Description Organizational Management 255 . PERFORM re554t USING sy-langu '01' w_absence-awart atext. the description of the job (object type C) on a key date is output. the use of logical database PCH enables sequential and structural evaluations.2. ENDFORM. SKIP 2. w_absence-persk.p_atext = w_t554t-atext. The summary is output in a LOOP over table t_absence. DATA: atext LIKE t554t-atext. 6.

80 space. Infotype 1002 (description) is declared under INFOTYPES. PROVIDE * FROM p1002 BETWEEN pc-begda AND pc-endda WHERE p1002-langu = sy-langu. then the contents of infotype 1000 are available on the key date. pchobeg = sy-datum. Table Infotype The PROVIDE loop over infotype 1002 limits the values of the logon language. REPORT ythr_org_seq LINE-SIZE 80. is displayed on the selection screen. Key date Macro rh-sel-keydate ensures that at the INITIALIZATION event. DATA: t_pt1002 TYPE TABLE OF pt1002 WITH HEADER LINE. A macro populates the table during further processing. January 1 of the current year is made available as a default value (“01”). WRITE: / objec-objid. GET objec. Macro rh-get-tbdat reads the table entries in internal table t_ pt1002 for the table infotype. The table is characterized as a table infotype. will occur. FORMAT COLOR OFF. rather than a selection period. Default values for plan variant pchplvar and object type pchotype are also generated. Accordingly. the definition of internal table t_pt1002 is also required. rather than a structural evaluation. The object ID and the title of the object are output. By not specifying GDSTR. START-OF-SELECTION. objec-stext. FORMAT COLOR COL_GROUP INTENSIFIED ON. INITIALIZATION. pchplvar = '01'. a key date. pchobeg+4(4) = '0101'. TABLES: objec. please do not specify GDSTR with the TABLES statement. rh-sel-keydate. The contents of the internal table can now be output in a loop.In the declaration portion of the report. this ensures that a sequential evaluation. rh-get-tbdat p1002-infty p1002-tabnr t_pt1002. GET OBJEC If you use GET objec. INFOTYPES: 1002. pchotype = 'C'. 256 Reporting in HR .

position. it should be fixed and unchangeable. structural evaluations are much more common than are sequential evaluations Create staff assignments with the following information: Organizational unit and organizational title Position and title Personnel number and name (last name and first name) Organizational (object type “O”) elements are output at position 1. In this report. Therefore.LOOP AT t_pt1002.2 Structural Evaluation When using the logical database PCH. Varying background colors are used for organizational unit. the evaluation path should not appear with the selection parameters. rather. you must use version 900 of the selec- Displaying the Evaluation Path Organizational Management 257 .11 Structural Evaluation: Staff Assignment A structural evaluation with logical database PCH reads all the objects that it can reach with the selection parameters specified in the evaluation path. and personnel data.2. Line indentations occur to reflect the hierarchy. WRITE: / t_pt1002-tline. ENDLOOP. and the personnel numbers are output from position 30. Staff assignments Figure 6. The positions (object type “S”) are output from position 20. 6. ENDPROVIDE. Evaluation paths are set up in Customizing.

258 Reporting in HR . Auxiliary variable col is used to indent the organizational units: REPORT ythr_org_stru LINE-SIZE 80. TABLES: objec. At the INITIALIZATION event. Infotype 0002 must be declared to print the name. Figure 6. pchotype = 'O'.12 Attributes of the “Staff Assignment” Report The declaration section of the report recognizes that TABLES entry gdstr indicates the presence of a structural evaluation. coname(40). INFOTYPES: 0002. System variable syst-tvar0 is populated with the key date for the header: rh-sel-keydate. DATA: col LIKE struc-level. gdstr. the evaluation path is set along with the statements that should be familiar to you from the previous example.tion screen (structural evaluation without structure parameters) with the report attributes.

80 space. ENDFORM. col = struc-level * 2 . GET objec makes available all the objects on the evaluation path along GET OBJEC with their infotypes. PERFORM concat_name USING coname. objec-stext. Here. ENDIF. structure objec is used for object types “O” and “S. infotype 0002 is evaluated. FORMAT COLOR 2. Organizational Management 259 . coname. You can use the infotype tables declared in INFOTYPES for personnel master data. ENDPROVIDE. SKIP. The print position for object type “O” is set according to evaluation level struc-level. ENDIF. FORM concat_name USING p_conname. To output values. WRITE: AT col objec-objid. PROVIDE vorna nachn FROM p0002 BETWEEN pc-begda AND pc-endda. The object type is queried for object-specific formatting. END-OF-SELECTION. WRITE pc-begda TO syst-tvar0 DD/MM/YYYY.pchwegid = 'O-S-P'.” GET objec. START-OF-SELECTION. 80 space. ENDIF. WRITE: /30 objec-objid. WRITE: /20 objec-objid. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '. IF objec-otype = 'S'. FORMAT COLOR 3. IF objec-otype = 'O'. FORMAT COLOR 4. and the name is formatted with routine concat_name: IF objec-otype = 'P'. objec-stext. '. 80 space.

14).13 shows the results of the sample report that lists the payroll period and the net salaries paid under the name of the employee.3 Payroll Data In Section 3. Evaluating NetPay Figure 6. we discussed how to access and display payroll data. Figure 6.13 The “Overview NetPay” Report A summary is output at the end of the list.14 Error Messages in the “Overview NetPay” Report 260 Reporting in HR . Figure 6.6. The following example will address additional function modules that support the evaluation of payroll data.5. a list of errors is displayed (see Figure 6. If errors occur during processing.

WRITE: / pernr-pernr. 80 space. DATA: g_select TYPE i. ABAP memory must be initialized with the two function modules given below for the error list and report statistics: START-OF-SELECTION. INFOTYPES: 0002. Processing wage types from table RT of the payroll cluster requires the definition of working area w_rt. TABLES: pernr. PERFORM concat_name USING coname. CALL FUNCTION 'HR_REFRESH_ERROR_LIST'. FORMAT COLOR COL_GROUP INTENSIFIED ON. At the GET PERNR event. g_select = g_select + 1. w_rt TYPE pc207. DATA: t_result TYPE TABLE OF payus_result. coname.Evaluating payroll results requires the definition of internal table t_result and working area w_result. Additional data definitions are required for report statistics and the output of an error table. CALL FUNCTION 'HR_REFRESH_STAT_LIST'. DATA: coname(40). g_reject TYPE i. At the beginning of processing. w_result TYPE payus_result. DATA: error_int TYPE TABLE OF hrerror. the familiar processing occurs first. Function module HR_GET_PAYROLL_RESULTS imports the current payroll results of the data selection period into table t_result: CALL FUNCTION 'HR_GET_PAYROLL_RESULTS' EXPORTING pernr = pernr-pernr Payroll Data 261 . Evaluating payroll results REPORT ythr_pay_net LINE-SIZE 80. g_proces TYPE i. The number of selected employees is updated in variable g_select: GET PERNR GET pernr. rp_provide_from_last p0002 space pn-begda pn-begda. FORMAT COLOR OFF.

error table error_int is read from ABAP memory and output with function module HR_DISPLAY_ERROR_LIST. At the end of the selection. ENDIF. The function module updates error list error_int in ABAP memory with the ID “HRERRLIST”. Routine list outputs the “Overview NetPay” list for every personnel number. 262 Reporting in HR . CALL FUNCTION 'HR_APPEND_ERROR_LIST' EXPORTING pernr = pernr-pernr arbgb = sy-msgid msgty = 'E' msgno = sy-msgno msgv1 = sy-msgv1 msgv2 = sy-msgv2 msgv3 = sy-msgv3 msgv4 = sy-msgv4. function module HR_APPEND_ERROR_LIST is called.pabrj pabrp pabrj_end pabrp_end actual TABLES result_tab EXCEPTIONS no_results error_in_currency_conversion t500l_entry_not_found period_mismatch_error t549q_entry_not_found internal_error wrong_structure_of_result_tab Error List = = = = = pn-begda(4) pn-begda+4(2) pn-endda(4) pn-endda+4(2) 'A' = t_result = = = = = = = 1 2 3 4 5 6 7. If an error occurs. g_proces = g_proces + 1. END-OF-SELECTION. IF sy-subrc NE 0. g_reject = g_reject + 1. ELSE. PERFORM list.

NEW-PAGE. ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. CALL FUNCTION 'HR_DISPLAY_ERROR_LIST' EXPORTING no_popup = 'X' no_print = ' ' TABLES error = error_int EXCEPTIONS invalid_linesize = 1 OTHERS = 2. IF sy-subrc <> 0. '. CALL FUNCTION 'HR_DISPLAY_STAT_LIST' EXPORTING no_popup = 'X' no_print = ' ' EXCEPTIONS invalid_linesize = 1 OTHERS = 2. Payroll Data 263 . Routine concat_name formats the name: FORM concat_name USING p_conname. Function modules HR_APPEND_STAT_LIST and HR_DISPLAY_STAT_LIST execute the processing and output of report statistics: Report Statistics CALL FUNCTION 'HR_APPEND_STAT_LIST' EXPORTING selected = g_select processed = g_proces rejected = g_reject. ENDIF. IMPORT error_int FROM MEMORY ID 'HRERRLIST'. CONCATENATE p0002-nachn p0002-vorna INTO p_conname SEPARATED BY '. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDFORM. IF sy-subrc <> 0.

'/'.15 shows a list of time pairs and time type “0003” (skeleton time) that have been generated. This section explains how to read these clusters. as are payroll results. ENDFORM. w_result-evp-fpper(4). the results of time evaluation are stored in clusters.” FORM list. Figure 6. LOOP AT t_result INTO w_result. LOOP AT w_result-inter-rt INTO w_rt WHERE lgart = '/550'. It is assumed that the same wage types are not present with several period indicators during the evaluation of results. ENDLOOP. The horizontal line indicates the end of each week. ENDLOOP. 6. WRITE : /40 w_result-evp-fpper+4(2) . The values of wage type table RT are read at a deeper level in working area w_rt. Figure 6.15 Report on Time Evaluation 264 Reporting in HR . The net remuneration is found in technical wage type “/550.Wage type table The output of the payroll results is executed for each payroll period in a LOOP over internal table t_result. WRITE: w_rt-betrg. Please consider this fact when necessary.4 Results of time evaluation Time Management In time management.

pnpbegda = sy-datum. "old first of the week The month-end and first-of-the-month of the previous month are default values for the data selection period. INCLUDE rpppxd00. PERFORM last_day_in_month(sapfp500) USING pnpbegda pnpendda. Data declaration REPORT yrhr_time LINE-SIZE 80. In Section 3. here at the GET PERNR event. PERFORM clear_all. "first of the week odate_old LIKE pt-ldate. Time Management 265 . "last name. Unlike the previous examples. DATA: coname(40). PERFORM concat_name USING coname. System variables syst-tvar0 and syst-tvar1 are populated for the header. the conventions that are used here were explained. PERFORM day_minus_months(sapfp500) USING pnpbegda '1' pnpbegda. a new routine. WRITE pn-begda TO syst-tvar0 DD/MM/YYYY. WRITE: / pernr-pernr. WRITE pn-endda TO syst-tvar1 DD/MM/YYYY. FORMAT COLOR COL_GROUP INTENSIFIED ON. "Data for PCL1/2-Puffer DATA: BEGIN OF COMMON PART buffer. pcl2. INCLUDE: rpc2b200.The data declaration lists the includes required for buffering and the data description of the clusters. rp_provide_from_last p0002 space pn-begda pn-begda. Default values INITIALIZATION. INCLUDE rpppxd10.5. pcl1. TABLES: pernr. read_time. DATA: END OF COMMON PART. first name odate LIKE pt-ldate. INFOTYPES: 0002. lists and outputs the time evaluation data: GET pernr. pnpbegda+6(2) = '01'. START-OF-SELECTION.

IF ( NOT odate_old IS INITIAL ) AND ( odate_old <> odate ). b2-key-pernr = pernr-pernr . 266 Reporting in HR . FORM read_time. Routine concat_name formats the name: FORM concat_name USING p_conname. IF sy-subrc EQ 0. If the import was successful. Cluster B2 The routine read_time populates the key for reading cluster B2 of cluster table PCL2. WRITE: /35(12) pt-ldate. FORMAT COLOR OFF. (10) pt-begtm USING EDIT MASK '__:__:__'. LOOP AT pt. PERFORM read_time. ENDIF. NEW-LINE. When the week changes (which is recognized by routine get_first_day_in_ week). ENDFORM. "original rp-imp-c2-b2. CONCATENATE p0002-nachn p0002-vorna INTO p_ conname SEPARATED BY '. "Personnel number b2-key-pabrp = pnpbegda+4(2).coname. a horizontal line is output. Macro rp-imp-c2-b2 reads the cluster. "Payroll period b2-key-pabrj = pnpbegda(4). the time pairs from imported table PT are read and output. odate_old = odate. END-OF-SELECTION. Include rpppxm00 contains the standard routines for buffering the data when using macros: INCLUDE rpppxm00. "Payroll year b2-key-cltyp = '1'. (10) pt-endtm USING EDIT MASK '__:__:__'. ULINE AT 35. Time type “0003” (skeleton time) from imported table ZES is listed for each day. PERFORM get_first_day_in_week(sapfp500) USING pt-ldate '01' odate. '. 80 space.

LOOP AT zes WHERE reday = pt-ldate+6(2) AND ztart = '0003'.16 shows the list from Section 6.1 as formatted with function module REUSE_ALV_LIST_DISPLAY. ELSE. Formatting Output with the ABAP List Viewer 267 .5 Formatting Output with the ABAP List Viewer The formatting used in this chapter can be enhanced with additional features by employing the ABAP List Viewer (ALV).17). For example. You can configure the display to individual preferences and save the settings as a display variant. ENDLOOP. 6. Figure 6. Figure 6. * . you can sort the list displayed or download it to Excel.16 Output of a List with REUSE_ALV_LIST_DISPLAY Function module REUSE_ALV_GRID_DISPLAY offers another option (see Figure 6. ENDFORM.. ENDLOOP.. EXIT. WRITE: zes-anzhl. ENDIF.

The structure defined in the report for outputting display is used to define internal table t_display and working area w_display. INFOTYPES: 0002. DATA: t_display TYPE TABLE OF display. first name bankname(40).17 Output of a List with REUSE_ALV_GRID_DISPLAY TYPE-POOLS Declaration of TYPE-POOLS: slis is required to use ALV. "Name. and storing variants: REPORT yrhr_bank_alv. specifications for the layout. bankname(40). Additional definitions apply to field catalog alv_fieldcat. TABLES: pernr. w_display TYPE display. coname(40). DATA: coname(40). 0009. "Bank name TYPES: BEGIN OF display. INITIALIZATION. TYPE-POOLS: slis. END OF display. pernr LIKE pernr-pernr.Figure 6. alv_variant TYPE disvariant. bankn LIKE p0009-bankn. DATA: alv_fieldcat TYPE slis_t_fieldcat_alv. w_alv_fieldcat TYPE LINE OF slis_t_fieldcat_alv. alv_layout TYPE slis_layout_alv. bankl LIKE p0009-bankl. PERFORM last_day_in_month(sapfp500) 268 Reporting in HR .

CONCATENATE p0002-nachn p0002-vorna INTO p_coname SEPARATED BY '.USING sy-datum pnpbegda. p0009-bankn TO w_display-bankn. assignment occurs here for each individual field instead of using MOVECORRESPONDING: GET PERNR GET pernr. PERFORM clear_all. CLEAR: coname. DATA : bankdata TYPE bnka_bf. PERFORM read_bankname USING bankname. FORM read_bankname USING p_bankname. MOVE: pernr-pernr TO w_display-pernr. bankname TO w_display-bankname. rp_provide_from_last p0009 '0' pn-begda pn-begda. At the end of processing. ENDFORM. FORM concat_name USING p_coname. bankname. You should already be familiar with the routines listed below: FORM clear_all. Unlike the situation with a simple list. CALL FUNCTION 'HRCA_READ_BANK_ADDRESS_2' EXPORTING bank_country = p0009-banks bank_number = p0009-bankl Formatting Output with the ABAP List Viewer 269 . coname TO w_display-coname. PERFORM concat_name USING coname. p0009-bankl TO w_display-bankl. ENDFORM. END-OF-SELECTION. APPEND w_display TO t_display. '. START-OF-SELECTION. The familiar processing is executed at the GET PERNR event. here the output is performed in internal table t_ display with the use of working area w_display. table t_display is populated and can be output with routine show_list: Output PERFORM show_list. rp_provide_from_last p0002 space pn-begda pn-begda. To clarify this method.

APPEND w_alv_fieldcat TO alv_fieldcat. ELSE. 270 Reporting in HR . alv_layout-colwidth_optimize = 'X'.IMPORTING bank_data = bankdata EXCEPTIONS not_found = 1 OTHERS = 2. IF sy-subrc = 0. variables grid_titel and list_begda are defined and populated: FORM show_list. p_bankname = bankdata-banka. APPEND w_alv_fieldcat TO alv_fieldcat. w_alv_fieldcat-key = 'X'. The processing of routine show_list is new. To get a description of each of the fields. CLEAR w_alv_fieldcat. CLEAR w_alv_fieldcat. CONCATENATE 'Employees’ bank details on' list_begda INTO grid_title SEPARATED BY space. CLEAR p_bankname. w_alv_fieldcat-reptext_ddic = 'Name'. see the documentation for the function modules called below. list_begda(10). ENDFORM. alv_layout-zebra = 'X'. w_alv_fieldcat-fieldname = 'CONAME'. CLEAR w_alv_fieldcat. DATA: grid_title TYPE lvc_title. Layout For the layout that you want. ENDIF. To display the title. WRITE pn-begda TO list_begda DD/MM/YYYY. w_alv_fieldcat-fieldname = 'PERNR'. w_alv_fieldcat-ref_tabname = 'PERNR'. the appropriate transfer parameters of structure alv_layout are specified. Field Catalog Special characteristics are defined for individual columns of the output and recorded in the field catalog.

w_alv_fieldcat-ref_tabname = 'P0009'. w_alv_fieldcat-ref_tabname = 'P0009'. APPEND w_alv_fieldcat TO alv_fieldcat. w_alv_fieldcat-fieldname = 'BANKNAME'. WRITE: / 'Formatting error'. w_alv_fieldcat-ref_fieldname = 'BANKA'. IF sy-subrc <> 0. This function module encapsulates the call of function module REUSE_ALV_ LIST_DISPLAY for applications in HR. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING I_callback_program = 'YTHR_BANK_ALV' I_grid_title = grid_title is_layout = alv_layout it_fieldcat = alv_fieldcat i_save = 'A' is_variant = alv_variant TABLES t_outtab = t_display EXCEPTIONS program_error = 1 OTHERS = 2. CLEAR w_alv_fieldcat. CLEAR w_alv_fieldcat. Formatting Output with the ABAP List Viewer 271 . ENDIF. The parameter list includes parameters i_save and is_variant.w_alv_fieldcat-fieldname = 'BANKN'. APPEND w_alv_fieldcat TO alv_fieldcat. ENDFORM. w_alv_fieldcat-fieldname = 'BANKL'. APPEND w_alv_fieldcat TO alv_fieldcat. w_alv_fieldcat-ref_tabname = 'BNKA_BF'. function module REUSE_ALV_GRID_DISPLAY can be called and the output transferred. Once the field catalog has been completely populated. "show_list Function module HR_ALV_LIST_DISPLAY offers similar formatting options. both of which are required to store list variants.

354 Explorer 351 use 353 Basic pay 247 BL_ALLOW_DUP_LINES 311 Blocking indicator 146 Blocking logic 107 function module 107 Buffering 266 Cascading Style Sheets 398 CASE_SENSITVE_SEL 315 CE mode 91 Central person 91 Change of address 146 Check indicator 133 Checks 185 Cluster authorization 117 B1 64 B2 266 buffering 118 EXPORT 117 IMPORT 117 macro 117 TX 117 Cluster directory 73. 284. 191 BAdI Builder 190 BAdI class 125 BAPI 349 call 350.Index A ABAP List Viewer 267. variable 237 Asymmetrical 146 authority_check 129 Authorization check 77. 324 Absence type 254 Activity profile 137 ADD_FIELDS_SPLIT_DEP 316 Additional field 216 Additional HR fields 302 Ad-hoc Query 273. 324 calling 325 creating 326 selection 327 set operations 328 AGate 374 Application component 122 Area Menu Maintenance 275 Argument. 172 Business Application Programming Interface → API 349 Business Information Warehouse 274 Business Object Repository (BOR) 351 Business object type 349 C B BAdI 124 call 126 coding 192 filter 127 implementation 127. 124. 118 Cluster structure 68 Cluster table 88 Clusters 116 Composite role 131 Concurrent Employment 91 Concurrently employed person 91 Consistency of the data model 59 Content provider 417 Context 156 Context-dependent structural authorization check 159 Contraction 85 Creation rule 150 Currency conversion 250 Customer exit 122 Customer function 187 Customer objects 122 Customer report categories 82 Customer-defined settings 60 Index 445 . 99 Authorization concept 129 Authorization fields 129 Authorization generation 133 Authorization level 145 Authorization object 129 Authorization profile 130 Business Add-In 122.

56 F D Data retrieval 83 Data selection period 80. 256 GET PERNR LATE 91 GET_GROUP_ 91 GET_OBJEC_ 97. 96. 231 customer-specific 231 G GDSTR 96. 153. 97. 257 Events 241 Fast entry 205 Fast entry of actions 210 Feature 110. 213 Definition layer 124 Deleting 147 Depth of display 155 Design adjustments 398 Document evaluation 144 Double verification principle 145 Download 267 Dual host installation 375 Dynamic selection 81. 90 446 Index . 67 Date specifications 243 DBPNPCOM 101 DBPNPMAC 101 Decentralized time recording 148 Decision tree 30 Default value 185. 82 E Easy Web Transaction 386 Employee Self-Service 369 Enhancement project 187 Enhancement. 83. 112. 248 DATA_REQUIRED 314 Database program 78. 246 Error list 262 Error table 261 ESS 369 kiosk system 402 MOLGA 405 ESS scenario 146 ESS user exits 396 Evaluation sequential 96. 201 attribute 113 back value 113 decision tree 114. 167 Customer-specific enhancements 39 Customer-specific version of PA30 171 Customizing. 79 Database table PAnnnn 40 Database table PCL2 65. L&W Events 429 EXCEL 267 External object types 45. 84. 257 Evaluation path 93. 255 structural 96. 97. 94. 196. customer-defined 193 First of the month 265 Flow of the authorization check 165 FlowLogic 387. 98 GET_PAYROLL 88 GET_PAYROLL_ 90 GET_PERAS 91 GET_PERNR 77.Customer-specific authorization object 138. 201 maintenance 112 program operations 114 structure 113 Feature IVWID 42 Field attribute 33 Field catalog 270 Fields. 390 events 394 example 391 For Period 90 Form interface 344 Form Painter 345 Forms 331 attributes 344 creating 332 Creating metadata 333 printing 347 Function module exit 185 Function modules 108 Function Builder 108 HR 109 search 109 Functions 229. assign 195 Entry date 109.

HIS 273 I IAC 387 IGNORE_WAGE_TYPE_OPERA 315 IMG 122 Implementation Guide 23. 214 external infotypes 57 feature 30 header 29 infotype view 42 list screen 27 object identification 25 organizational management 214 screen modification 30 SPA/GPA parameter 28 structure of a feature 31 subtype 24. 277 call 277 customizing 280 HR Business Content 274 HR Forms Workplace 331. 251 Infotypes menus 42 INFOTYPES. statement 83 AS_PERSON_TABLE 91 MODE_N 84 Interface FI 242 Interface format 361 Interface status 200 Interface toolbox 349. 334 HR report 142 HR_ALV_LIST_DISPLAY 271 HR_ENTRY_DATE_ 246 HR_FEATURE_BACKFIELD_ 112 HR_FEATURE_BACKTABLE_ 112 HR_GET_PAYROLL_RESULTS_ 261 HRUSER 398 HTML business functions 384 HTML templates 388 Human Resources Information System. 240. 44 change 106 consistency check 60 control tables 48 create 219 data structure 34 default value 28 enhancement 185. 357 file layout 363 interface format 361 Internal object types 45 Internet Transaction Server 374 Interpretation of the assigned personnel number 146 Inverse relationship 57 ITS 374 files 375 instances 375 programming model 386 service parameter 380 iViews 370 J Job description 255 Join 86 partial interval 87 K Key date 107. 256 Kiosk systems 402 Knowledge provider 417 L L&W Events 370. 415 creating 435 Index 447 . 23.GET_PERNR_ 90 GET_PERSON 91 Global area 282 Global organizational level 133 H HIGH-DATE 101 HIS 273. 38 table infotypes 55 time management 226. 47 Implementation layer 124 Import 266 InfoSet Query 273. 324 calling 324 InfoSets 282 additional cross-Infoset fields 302 creating 290 creating additional fields 299 Infotype 21. 340 HR Metadata Workplace 333.

for forms 333 MetaDimension 336 customer-specific 338 MetaField 337 MetaFigure 337 MetaNet 334 creating 335 MetaStar 334. 83 PERSON_ONLY_ONCE 311 PFCG 372 Plan version 93 PLOG 144 PM01 193 PNP mode 91. 93 Operation 229 Organizational key 149 Organizational management 93 Organizational management data model 43 Organizational plan 152.customizing 429 LAST_RECORD_ONLY 312 Layout 270 Life and Work Events 415 List header 241 Local fields in queries 295 Logical database 77 PCH 93 PNP 79 PNPCE 91 Logical structure Pnnnn 53 LOW-DATE 101 Object ID 93 Object Navigator 183 Object type 44. 118. 88. 395 Modification group 203 Modifications without any 172 Module pool 33 Month-end 265 N Name formatting 102. 92 pnp-sw-found 100 448 Index . 335 customer-specific 338 MiniApps 370 Minimal authorization 174 Mixed mode 384. 242 Naming conventions 231 report categories 82 NO_DUPLICATE_LANGU 314 NO_INDIRECT_EVALUATION 315 O OBJEC 96 P_ABAP 141 P_APPL 139 P_ORGIN 135 P_ORGINCON 157 P_ORGXX 137 P_ORGXXCON 158 P_PERNR 140 P_TCODE 135 PA70 205 Pair table 61 Payroll 228 forms 331 Payroll data 260 Payroll infotypes 318 creating 320 Payroll program 118 Payroll results 21. 153 Overview of L&W tables 428 P M Macro 100 PCH 107 Main authorization switch 159 Master data 21 evaluation 239 Matchcode 80 Metadata. 266 PDB_PROCESS 77 PE01 229 PE04 233 Period of responsibility 161 Permissible organizational key 150 Person selection period 80. 261 evaluation 90 reading 118 Payroll status 106 Payroll wage types. definition 319 PCL2 88.

96 PCH 93 Selection view 83 Service PZLE_01 417 PZLE_02 416 PZLE_03 417 PZLE_04 417 PZLE_05 417 PZLE_06 416 PZLE_07 416 SIAC1 379 Single host installation 374 Sorting 80. web-enabling 410 Repository 183 Result data 21 RGDIR 118 RH-GET-TBDAT 108 RH-SEL-KEYDATE 107 RH-SEL-ONE-OBJID 107 Role 131. 103 RP_PROVIDE_FROM_LAST 103. 371 composite role 372 SAP enhancements 122. 88 SAP default class 80 Report class 239. 395 SAP Query 273. 56 Reorganizations 152 Repetitive structures 243 Report attribute 77 Report category 80. 83. 281. 267 SPLIT_DATA_REQUIRED 314 Index 449 . 46. 310 Report properties 93 Report statistics 263 Report. 308.Power transactions 386 PPCI 214 Primary infotype 42 PRIMARY_INFTY 313 PROC_PERNR_PARTIAL_AUTH 311 PROCESS_LOCKED_RECORD 311 Profile Generator 131 Projection 85 Proposed value 241 PROVIDE 84. 312 subtype 85 PROVIDE_FIELD 312 PSnnnn 38 PSYST 199 PUT_PERNR 77 Q Query creating 282 defining switches 308 local fields 295 Query Painter 283 country-specific role 372 single role 372 Role menu 132 Root object 155 RP_FILL_WAGE_TYPE_TABLE_EXT_ 248 RP_PROVIDE_FROM_FRST 100. 311 RP_READ_ALL_TIME_ITY 105 RP_SET_DATA_INTERVAL 102 RP_UPDATE 106 RP-EDIT-NAME 102 RP-SEL-EIN-AUS-INIT 101 RP-SET-NAME-FORMAT 102 RPTEDT00 331 RPUACG00 168 Rules 229 S R Relationship 44. 187 SAP Form Builder 331. 343 SAP GUI for HTML 387. 324 SAP Smart Forms 332. 274. sample connection of a 413 REPORT_CLASS 310 Reporting period 94 Reports 275 RHGRI23 280 Reports. 244. 332. 343 SAP* 156 SAPMPZ02 405 Schema 228 Screen 33 Screen control 203 SELECT 98 Selection criteria 81 Selection screen 78.

434 T77WWW_LECCP 427. 430 T77WWW_SDATA 423. 433 T77WWW_SRV 421. 256 Task descriptions 131 Template generation 389 TemSe 360 Test date 148 Test procedures 147 Text table 196. 432 T77WWW_SRVN 428. 61 Time logic 163 Time management 105 forms 331 Time recording devices 61 TIME_DEPENDENCY 313 Tolerance time 159 Transaction HRFORMS 340 HRUSER 398 PE50 331 PFCG 372 PPIS 277 PU12 357 SIAC1 379 SQ01 282 SQ02 290 SQ03 294 Transaction data 21 Transparent table HRPnnnn 53 450 Index . 155 STRUC 97 Structural authorization check 129 Structure HRIADMIN 52 HRIKEY 49 HRIKEYL 51 HRInnnn 52 PAKEY 34 pay99_result 90 payroll 90 PERNR 79. 431 T77WWW_LESTATUS 427. 429 T77WWW_MN 428. 431 T77WWW_CTP 428. 430 T77WWW_MNP 428. 433 T77WWW_CTT 428. 434 T77WWW_LECCT 427. 433 T77WWW_LECC 427. 429. 265 results 264 Time event 21. 429. 223. 254 Time constraint 84 Time constraint class 26 Time evaluation 228. 431 T77WWW_LE_EP 421. 433 T77WWW_SMAP 426. 429. 306 T52IC 321 T777D 55. query 308 infotype-specific 309 Symmetrical 146 Syntax check 235 T Table AQLDB 282 NT1 63 T500L 67 T522T 307 T526 303. 62 Table infotype 108. 429. 434 T77WWW_LEDATA 428. 428. 60 T777I 49 T777T 49 T777Z 49 T778O 44 T778T 49 T778V 47 T77AW 279 T77WWW_CD 428. 429. 429. 432 T77WWW_MNT 428. 432 TEVEN 61.SPLIT_DEPENDENT_AF 316 SPLIT_INDEPENDENT_AF 316 Standard area 282 Status indicator 121 Status vector 94. 83 Pnnnn 40 PSHD1 36 PSHDR_ 37 Style Editor 403 Style Sheet Designer 399 SU24 133 Subtype 24 Super user 142 Switches. 432 T77WWW_CT 428.

Transparent table PCL1 63 TRMAC 100 TYPE-POOLS 268 V Validation check 189 U W UPDATE 99 User groups 282. 392 publish 389 WGate 374 Index 451 . 293 User master records different 157 User menu. reports 275 Wage type table 264 WAP service 390 Web Application Builder 378 WebGUI 387 WebStudio 378.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->