Professional Documents
Culture Documents
Abap HR Programing PDF
Abap HR Programing PDF
ABAP HR Programming in HR
HR-ABAP
SAP
ABAP HR Prerequisites
Knowledge of
ABAP Programming
Logical Database
Module pool programming
SAP Scripts
SAP
ABAP HR Training will cover
Definition
Units of information.
SAP
ABAP HR Uses of Infotype
Name
Personal DOB
Data Nationality
Marital Status
INFOTYPES
Street
Addresses City
Pin code
State
SAP
ABAP HR Uses of Infotype
• An initial screen
• A single screen
• A list screen
SAP
ABAP HR Initial Screens
Transaction code
‘PM01’.
SAP
ABAP HR Creating PA infotypes – PM01
SAP
ABAP HR Creating PA infotypes – Maintain Structure
SAP
ABAP HR Creating PA infotypes – Infotype Table
SAP Creating PA info types – Infotype Table
ABAP HR
(Primary Key)
SAP
ABAP HR Creating PA infotypes – Preview
SAP
ABAP HR Enhancement of PA Infotype
Result
You have included additional fields in the standard single field for an
infotype
SAP
ABAP HR Enhancing a Single Screen – PM01
SAP Enhancing a Single Screen – Maintain
ABAP HR
Structure
SAP
ABAP HR Enhancing a Single Screen – Screen Preview
Enhanced Field
SAP
ABAP HR Enhancing PA Infotype – CI INCLUDE
Only those PA Tables can be Enhanced, having structure CI Include
CI_P0000
SAP
ABAP HR HR Macros
RP_PROVIDE_FROM_LAST
RP_PROVIDE_FROM_FIRST
RP_SET_DATA_INTERVAL
RP_READ_INFOTYPE
SAP
ABAP HR Macros Modules
M acro M odules
TABLES: PERNR.
INFOTYPES: 0001, " Organizational Assignment
0002, "Personal Data
0006, " Addresses
....
GET PERNR.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
WRITE...
* * * Include program DBPNPMAC.
DEFINE RP_PROVIDE_FROM_LAST.
PNP-SW-FOUND = '0'.
. . .
END-OF-DEFINITION.
SAP
ABAP HR Infotype Record Processing
G ET P E RN R.
R P_ PR O VI DE _F RO M _L AS T <P n nn n> S PA C E PN-B EG D A PN -E ND D A.
I F PN P -S W- FO U ND = 1 .
W R IT E. ..
E ND IF .
SAP
ABAP HR Infotype Record Importing
PAnnnn
START-OF-SELECTION.
RP_SET_DATA_INTERVAL '<
Pnnnn>' PN-BEGDA PN-ENDDA.
GET PERNR.
Table
Pnnnn
SAP
ABAP HR Function HR_READ_INFOTYPE
Reading Infotypes Without Logical DB (1)
PAnnnn
INFOTYPES: <nnnn>.
...
CALL FUNCTION
'HR_READ_INFOTYPE'...
SAP
ABAP HR Function HR_READ_INFOTYPE
INFOTYPES: 0002.
DATA: return LIKE SY-SUBRC.
IMPORTING
SUBRC = return
TABLES
INFTY_TAB = P0002
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2.
SAP
ABAP HR HR Macro – Summary
3. Authorization check
SAP
ABAP HR Logical database PNP - Screening
SAP
ABAP HR Functions of Logical database PNP
Data Retrieval
INFOTYPES: 0001,
0002,
0007.
GET PERNR.
SAP
ABAP HR Processing Master Data using PROVIDE
Processing Master Data
TABLES: PERNR.
INFOTYPES:0001, " Actions
0002, "Personal Data
0006, " Addresses
....
GET PERNR.
PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE...
ENDPROVIDE.
SAP
ABAP HR Processing Master Data using PROVIDE
Loop Nesting
GET PERNR.
PROVIDE * FROM P0002
BETWEEN PN-BEGDA AND PN-ENDDA. Infotype
WRITE... loop
ENDPROVIDE.
Employee
PROVIDE * FROM P0006 loop
BETWEEN PN-BEGDA AND PN-ENDDA. Infotype
WRITE... loop
ENDPROVIDE.
END-OF-SELECTION.
SAP
ABAP HR Joins in PROVIDE
Join / Creating Intervals
Personal
Data (0002)
Organizational
Assignment (0001)
Join
SAP
ABAP HR Joins in PROVIDE
Join / Coding
TABLES: PERNR.
INFOTYPES:0001, " Organizational Assignment
0002, "Personal Data
0006, " Addresses
....
GET PERNR.
PROVIDE * FROM P0001
* FROM P0002
BETWEEN PN-BEGDA AND PN- ENDDA.
WRITE...
ENDPROVIDE.
SAP
ABAP HR Joins and Projection in PROVIDE
TABLES: PERNR.
INFOTYPES:0001, "Organizational Assignment
0002, "Personal Data
....
GET PERNR.
PROVIDE STELL
ENAME FROM P0001
GBDAT FROM P0002
BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE...
ENDPROVIDE.
SAP
ABAP HR PA Letters Infotype – Customer Defined
Business Needs:
[Signatory] / SECRETARY
[Designation]
SAP
ABAP HR Structure for PA letter Infotype
Structure: PS9011
Component Component Data Len De Short Text
Type Type c
LDATE ZLDATE DATS 8 0 Letter Date
Table: ZHR_LTYPE
Data
Fields Field Type Type Len Dec Short Text
Definition
Each database object, for example, PCL1 or PCL2, with the type
Import/Export file consists of related areas. These areas are known
as clusters, for example. RX, RD.
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
ABAP HR Display of Cluster data – Payroll Result
SAP
SAP
ABAP HR Reading Cluster Directory
ABAP HR
Structure: PAY99_RESULT
EVP INTER Structure PAY99_INTERNATIONAL NAT
Structure PC261 Dummy
VERSC RT CRT BT for national
Type PC202 Type HRPAY99_RT Type HRPAY99_CRT part