Upload
muhammad-javeed
View
213
Download
0
Embed Size (px)
Citation preview
7/30/2019 abap-hr que and ans
1/11
1) What is the difference between ABAP and HR ABAP
2) What is logical data base
3) What are logical data bases used in hr module4) What is the difference between PNP and PNPCE
5) Explain GET PERNR concept when we use logical data base
6) Explain the program flow when we use logical database PNP or PNPCE7) What are the program names for logical database PNP and PNPCE
Personnel Administration (PA):
Posted on January 26th, 2009 in PA by admin
PA involves administrating employee data, commonly referred to MasterData. Master Data contains all employee data used in HR processing. Master Data includes
Personal (Eg. address), Organizational (Position description), Benefits (Insurance, Pension),
Time & Payroll.
Master Data is stored in Infotypes. Infotypes are tables (for user Data entry screen) that containlogically related employee data. Data can be stored for specific periods, which includes current
and historical.
Components of PA:
Personnel Area: represents a division of a company code into subunits. It is an organizational
entity representing an area within an organization defined by specific aspects of personnel
administration, time management and payroll. Personnel areas are subdivided into personnel
subareas. Personnel area is specific to HR and is a four character alphanumeric identification.Eg. Personnel area 100 is for employees in Karnataka, 200 is for Chennai.
Personnel Subarea: is a further subdivision of Personnel area. It may represent geographical
locations. Functions include:1. Set groupings for Time Management, so that work schedules, substitution and absence and
leave types can be setup for individual personnel subareas.
2. Generate default pay scale type and area for an employees basic pay.
3. Define public holiday calendar.
Employee Groups: divides or groups employees into various categories. Eg. Active employees,
Retired employees, Contractors. Employee groups are used to generate default values for payroll
accounting area and basic pay.
Employee Subgroups: are further differentiated within the employee group. Eg. Salariedemployees, Hourly employees, Unionized employees, Executives. The employee subgroup
grouping for the payroll rule allows you to define different payroll procedures for different
employee subgroups. For eg. you can specify whether an employees pay should be determinedon hourly or monthly basis. The employee subgroup grouping for the work schedule defines the
validity of work schedule, and the attendance or absence quota type determines the validity of
time quotas.
http://abaphr.com/?p=760http://abaphr.com/?cat=9http://abaphr.com/?cat=9http://abaphr.com/?p=7607/30/2019 abap-hr que and ans
2/11
Introduction on SAP HR module
Posted on January 26th, 2009 in ABAP-hrby admin
The SAP HR module enables companies to effectively manage information
about the people in their organization. It is integrated with other SAP modules and externalsystems. From the Organization Management perspective, companies can model a business
hierarchy, the relationships of employees to various business units and the reporting structureamong employees. The Personnel Administration (PA) sub module helps employers to track
employee master data, work schedules, salary and benefits information. The Personnel
Development (PD) functionality focuses on employees skills, qualifications and career plans.Finally, the Time Evaluation and Payroll sub modules process attendance and absences, gross
salary and tax calculations, and payments to employees and third party vendors.
What is HR?
The task of Human Resource Management is to produce the organizational hierarchies,relationship between employees and to allow storage and administration ofemployee data.
Useful Transaction codes in SAP HR module
Posted on January 18th, 2009 in ABAP-hrby admin
Master Data
PA10 Personnel File
PA20 Display HR Master DataPA30 Maintain HR Master Data
PA40 Personnel Events
PA41 Change Hiring DataPA42 Fast Data Entry for Events
PRMD Maintain HR Master Data
PRMF Travel Expenses: Feature TRVFDPRML Set Country Grouping via Popup
PRMM Personnel Events
PRMO Travel Expenses: Feature TRVCOPRMP Travel Expenses: Feature TRVPA
Macros in HR-ABAP
Posted on December 22nd, 2008 in ABAP-hrby admin
Most commonly used Macros in HR ABAP ?
http://abaphr.com/?p=521http://abaphr.com/?cat=6http://abaphr.com/?p=521http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
3/11
Macro contains some part of source code which it will be useful for number of applications.
( Like function modules )
Generally we use two macros in HR ABAPRP-PROVIDE-FROM-LAST
RP-PROVIDE-FROM-FRST
The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid in
the data selection period.The macro RP-PROVIDE-FROM-FRST retrieves the first(start)data record which is valid in the
data selection period.
What is Logical Database ?
Posted on December 16th, 2008 in ABAP-hrby admin
Logical database in SAP
The LDB is special type of ABAP program that combines the contents of certain related databasetables and retrieve some related data and make it available to application programs.
In other words, a LDB is a method by which ABAP programs read and process the data. The
sequence in which the data is supplied to the program is determined by a tree structure.
The LDB usually consists of the following components:
StructureSelections
Database programs
Logical databases have a tree structure.A logical database can contain a maximum of 300 tables
SAPDBPNP is the name of the database program for the logical database PNP.
How are logical database used
Difference between ABAP and HR ABAP
Posted on November 20th, 2008 in ABAP-hrby admin
ABAP vs HR ABAP
http://abaphr.com/?p=452http://abaphr.com/?cat=6http://abaphr.com/?p=231http://abaphr.com/?cat=6http://abaphr.com/?cat=6http://abaphr.com/?p=452http://abaphr.com/?cat=6http://abaphr.com/?p=231http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
4/11
The following concepts are defined in ABAP HR which is different with other modules.
Use of Infotypes
The use of Logical Database
Use of Macros and Provide statement
Storage and Access of data Authorization checks
There is nothing much difference between abap and hr abap. The way we retrieve the data from
data base is deferent.
In general ABAP data is stored in Tables, but coming to HR ABAP employee data is sorted
through Infotypes. The way we retrieve the data from infotypes is deferent in hr abap.
In general ABAP we use Logical data base very rare, as in HR ABAP most of the programs use
Logical data base to select data from Infotypes by using Get event.
In ABAP we use read statement to read particular record, still in HR ABAP we do use read
statement apart from that we have Macros and provide statement.
Macro is pre defined code (like function module) which reads data from internal table (internalinfotype) based on dates.
Provide statement is like Select statement but selects data from internal table
Storage and access of data in hr abap is completely deferent in hr abap comparing with ABAP.We use transaction code PA20 and PA30 to maintain data in infotypes.
PA20 is display mode and PA30 is change mode. We can create, change, display, copy, and
delete in infotypes with PA30 transaction.
For Infotypes authorizations can be maintained infotype and subtype (field) level as HR data is
more sensitive and secrete.
Will discuss in detail of above bullet points as a separately.
More information on sap hr-abap infotypes
Posted on November 11th, 2008 in ABAP-hrby admin
More information on SAP hr abap infotypes:
Infotype data is period-based (time-dependent), in other words, it is only valid
for specific periods. For this reason, each record has a start date and an end date.
The database does not normally contain only one record for each infotype and
personnel number but several records with different validity periods.
E.g. 0001 Org Assignment
0000 Actions
http://abaphr.com/?p=145http://abaphr.com/?cat=6http://abaphr.com/?cat=6http://abaphr.com/?p=145http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
5/11
Sap hr Infotype ranges:
0000 to 0999 HR Master data / Applicant data (PA)
1000 to 1999 Organizational Management (OM)2000 to 2999 Time data (TM)
4000 to 4999 Applicant data9000 to 9999 Customer definedMost commonly used infotypes in SAP HR:
ABAP vs HR-ABAP
Posted on November 10th, 2008 in ABAP-hrby admin
What is the difference between abap and abap hr?
The following concepts are defined in ABAP HR which is different with other modules .
Use of Infotypes
The use of Logical Database
Use of Macros and Provide statement
Storage and Access of data
Authorization checks
Infotype concept in sap hr, Creation of infotype,
Enhancement of infotype
Posted on November 6th, 2008 in ABAP-hrby admin
What is Infotype?
Infotypes are information units through which we can enter the data into tables. TheInfotypes are used to group related data fields together. In general words its data entry
screen from where we can store the data into tables. Naming conversion of infotype is
four digits numerical. Each infotype will have corresponding data base table to it.
For example
Infotype 0006 is Address
http://abaphr.com/?p=140http://abaphr.com/?cat=6http://abaphr.com/?cat=6http://abaphr.com/?p=110http://abaphr.com/?p=110http://abaphr.com/?cat=6http://abaphr.com/?cat=6http://abaphr.com/?p=140http://abaphr.com/?cat=6http://abaphr.com/?p=110http://abaphr.com/?p=110http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
6/11
The data stored for this infotype in table PA0006.
We can view the infotype data in two ways using below transactions:
Useful function modules in ABAP-HR
Posted on November 3rd, 2008 in ABAP-hrby admin
RS_PROGRAM_CHECK_NAME: To check program names if you are generating them.RS_CORR_INSERT : To insert the correction request in the repository.
REPS_OBJECT_ACTIVATE: To activate repository objects, for example - to activate a newly
generated program.
RS_DELETE_PROGRAM: To delete the program.
RS_ACCESS_PERMISSION: To lock or unlock a program.
Function Modules related to Date and Time Calculations
CALCULATE_DATE: Calculates the future date based on the input .
DATE_TO_DAY: Returns the Day for the entered date.
DATE_COMPUTE_DAY: Returns weekday for a date
DATE_GET_WEEK: Returns week for a date
RP_CALC_DATE_IN_INTERVAL: Add days / months to a date
Function Modules related to (ALV) ADVANCED LIST VIEWER
Useful function modules in ABAP-HRPosted on November 3rd, 2008 in ABAP-hrby admin
RS_PROGRAM_CHECK_NAME: To check program names if you are generating them.RS_CORR_INSERT : To insert the correction request in the repository.
REPS_OBJECT_ACTIVATE: To activate repository objects, for example - to activate a newly
generated program.
RS_DELETE_PROGRAM: To delete the program.
RS_ACCESS_PERMISSION: To lock or unlock a program.
Function Modules related to Date and Time Calculations
CALCULATE_DATE: Calculates the future date based on the input .
DATE_TO_DAY: Returns the Day for the entered date.
DATE_COMPUTE_DAY: Returns weekday for a date
DATE_GET_WEEK: Returns week for a date
RP_CALC_DATE_IN_INTERVAL: Add days / months to a date
http://abaphr.com/?p=29http://abaphr.com/?cat=6http://abaphr.com/?p=29http://abaphr.com/?cat=6http://abaphr.com/?p=29http://abaphr.com/?cat=6http://abaphr.com/?p=29http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
7/11
Function Modules related to (ALV) ADVANCED LIST VIEWER
REUSE_ALV_LIST_DISPLAY: ABAP List viewer (LIST DISPLAY)
REUSE_ALV_GRID_DISPLAY: ALV GridControl full screen
REUSE_ALV_FIELDCATALOG_MERGE: Create field catalog from dictionary structure or
internal table
Function Module related to Change Tracking
CHANGEDOCUMENT_READ_HEADERS: Read and format change documents
DAY_ATTRIBUTES_GET: Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES: To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2: Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES: Find the difference between two dates in years, months and
days.
FIMA_DAYS_AND_MONTHS_AND_YEARS: Find the difference between two dates inyears, months and days.
MONTH_NAMES_GET: Get the names of the month
IDWT_READ_MONTH_TEXT: Get the MONTH TextWEEK_GET_FIRST_DAY : Get the first dayof the week
HRGPBS_HESA_DATE_FORMAT: Format the date in dd/mm/yyyy formatSD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report thedifference in hoursL_MC_TIME_DIFFERENCE: Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS: Returns the last day of the monthDATE_CHECK_PLAUSIBILITY: Check for the invalid date.
DATE_2D_TO_4D_CONVERSION : Year entry: 2-character to 4-character.
DAY_IN_WEEK: Input date and will give the name of the day 1-monday,2-Tuesday.
SD_DATETIME_DIFFERENCE: Give the difference in Days and Time for 2 dates
Function Modules Related To Formatting
CLOI_PUT_SIGN_IN_FRONT : Displays the negative sign in front of the numeral.
RKD_WORD_WRAP: Wrap text into several lines
CONVERSION_EXIT_ALPHA_INPUT : Pad zeros to the number at the left
CONVERSION_EXIT_ALPHA_OUTPUT : Eliminate zeros to the number at the left
READ_EXCHANGE_RATE: Exchange Conversion
SPELL_AMOUNT: Transforms numeric values into text
Function Modules Related To Dialog Prompts
POPUP_TO_CONFIRM: Displays a popup dialog with a user defined message for confirmation
POPUP_TO_GET_VALUE: Displays a popup dialog requesting a value for a particular table-fieldname
7/30/2019 abap-hr que and ans
8/11
SAPGUI_PROGRESS_INDICATOR : Displays a progress bar with text to denote the percentage ofcompletion and status
FILENAME_GET: Displays a popup dialog to get the presentation server filename
F4_DATE: Displays a popup dialog to choose date
POPUP_TO_SELECT_MONTH: Display a pop-up to select a month
GET_PRINT_PARAMETERS: Printer parameters
Function modules related to RFC communication
RFC_CONNECTION_CLOSE: Close a RFC connection
RFC_GET_SYSTEM_INFO : Give systems information of a remote system
Function modules related to reading/writing files
FILE_READ_AND_CONVERT_SAP_DATA : Uploads the file from either presentation or applicationserver into an internal table
SUBST_GET_FILE_LIST: To get the list of files from Application Server.
ALSM_EXCEL_TO_INTERNAL_TABLE : Legacy Data Transfer w/ Excel
WS_FILE_DELETE: Delete files on UNIX server
PFL_COPY_OS_FILE: Copy UNIX files
EPS_GET_DIRECTORY_LISTING: Returns all files from a Server directory
Function Modules related to sending emails
SO_NEW_DOCUMENT_ATT_SEND_API1 - Sends emails with texts and attachmentsSO_NEW_DOCUMENT_SEND_API1 - Sends emails with texts.
Function Modules related to F4 Help
F4IF_INT_TABLE_VALUE_REQUEST - F4 help also returning the value to be displayed in internal table
Function Modules related to data maintenance
VIEW_MAINTENANCE_CALL - To maintain data from a table
Function Modules related to FI, CO and SD Modules
FOR_ALL_SKC1A : Account subtotal
VC_I_GET_CONFIGURATION : Sales Purchase details configuration
7/30/2019 abap-hr que and ans
9/11
SD_PRINT_TERMS_OF_PAYMENT : Print terms for unique payment
SD_PRINT_TERMS_OF_PAYMENT_SPLI : Print terms for some parcels payment
J_1B_NF_DOCUMENT_READ : Read NF details
J_1B_NF_VALUE_DETERMINATION : Read values from NF returned combined withJ_1B_NF_DOCUMENT_READ using.
Most commonly used Macros in HR ABAP ?
Macro contains some part of source code which it will be useful for number of applications.
( Like function modules )
Generally we use two macros in HR ABAP
RP-PROVIDE-FROM-LAST
RP-PROVIDE-FROM-FRST
The macro RP-PROVIDE-FROM-LAST retrieves the last(latest) data record which is valid inthe data selection period.
The macro RP-PROVIDE-FROM-FRST retrieves the first(start)data record which is valid in the
data selection period.
For every macro, whether the operation was successful or not will be checked with PNP-SW-
FOUND.If PNP-SW-FOUND = 1 , then the operation is successful. ( same as sy-subrc but the value is in
reverse case)
The macro RP-READ-INFOTYPE retrieves all the data record(s) which is valid in the dataselection period.
If SY-SUBRC = 0 , then the process is successful.
All the Macros are stored in table TRMAC
Whenever you are using the macros like
RP-PROVIDE-FROM-LAST orRP-PROVIDE-FROM-FRST,
check whether you have included logical database PNP in program attributes.
7/30/2019 abap-hr que and ans
10/11
It is not necessary to include logical database PNP/PNPCE in your program when you are using
the macro like
RP-READ-INFOTYPE ABCDE , where
A corresponds to PERNR which describes for which personnel number you require records.
Bcorresponds to INFOTYPE which describes from which infotype you require records.
Ccorresponds to data structure of the declared infotype (internal table like P0000 for infotype
0000) where all the records of the particular personnel number will be stored.
D corresponds to Start date.
E corresponds to End date.
More information on sap hr-abap infotypes
Posted on November 11th, 2008 in ABAP-hrby admin
More information on SAP hr abap infotypes: Infotype data is period-based (time-dependent), in other words, it is only valid
for specific periods. For this reason, each record has a start date and an end date.
The database does not normally contain only one record for each infotype andpersonnel number but several records with different validity periods.
E.g. 0001 Org Assignment
0000 Actions
Sap hr Infotype ranges:
0000 to 0999 HR Master data / Applicant data (PA)
1000 to 1999 Organizational Management (OM)2000 to 2999 Time data (TM)
4000 to 4999 Applicant data9000 to 9999 Customer defined
Most commonly used infotypes in SAP HR:
0000 Actions
0001 Org. Assignment0002 Personal Data
0003 Payroll Status
http://abaphr.com/?p=145http://abaphr.com/?cat=6http://abaphr.com/?cat=6http://abaphr.com/?p=145http://abaphr.com/?cat=67/30/2019 abap-hr que and ans
11/11
0006 Addresses
0007 Planned Working Time
0008 Basic Pay0009 Bank Details
0014 Recur. Payments/Deds.
0015 Additional Payments0021 Family details
0022 Education details
0041 Date Specifications0167 Health Plans
0168 Insurance Plans
0169 Savings Plan
0170 Flexible Spending Account0171 Gen. Benefits Information
0221 Manual Checks
0267 One time Payment off-cycle
2001 HR Time Record: Infotype 2001 (Absences)
2002 HR Time Record: Infotype 2002 (Attendances)2006 HR Time Record: Infotype 2006 (Absence Quotas)
2005 HR Time Record: Infotype 2005 (Overtime)
2007 HR Time Record: Infotype 2007 (Attendance Quotas)