HR ABAP Interview Questions and Answers


1)       Difference Between ABAP & HR-ABAP ?
ABAP and HR-ABAP are almost similar but HR-ABAP has some different approach to program like logical    database (like PNP & PCH) are extensively used in HR-ABAP. Infotypes and Infotypes related tables are used in HR-ABAP. Some specific comments like provide ...endprovide are used in HR-ABAP but not generally in ABAP.

2)       Infotype ?
The data fields of HR master data, time management and recruitment are grouped logically into information types or infotypes for short.

Examples of infotypes are "Family/Related Person", "Organizational Assignment, "Basic Pay".
Infotype Category’s:

o    Infotypes 0000 - 0999 - HR master data  and sometimes for applicant data
o    Infotypes 1000 - 1999 - organizational management
o    Infotypes 2000 - 2999 - time data
o    Infotypes 4000 - 4999 - applicant data
o    Infotypes 9000 - 9999 - customers

3)       Subtype ?
 Subtypes are subdivisions of infotypes. The various subtypes of an infotype can be assigned different time constraints, and a separate data history can be maintained for each.

4)       Difference Between PNP & PNPCE LDB ?
 PNP : (HR Master Data )

The logical database PNP performs the following functions in Reporting:
o   provides the standard selection screen for the HR master data
o   makes the specified selections
o   checks whether the user has the necessary authorizations to read the data

The logical database is assigned to a report by maintaining the "Logical database PNP" report attribute.

The selection screen can then be created by assigning a HR report class.
In the report itself, the persons, along with the specified infotypes at the GET PERNR event are retrieved from the logical database in accordance with the selections entered. Furthermore, the system checks the authorization for data access.

You can use the GET PAYROLL event to evaluate payroll results.
PNPCE : (HR Master Data (Incl. Concurrent Employment) )
The PNPCE logical database supports the evaluation of HR master data. It includes the functions of the PNP logical database and offers additional evaluation options. Therefore, you should use the PNPCE logical database instead of the PNP logical database for all new developments.

The enhanced functionality of PNPCE in comparison to PNP essentially concerns the evaluation of Concurrent Employment, that is, the possibility to group evaluate several assignments/personnel numbers of a person. The new events 'GET PERSON' and 'GET GROUP' as well as an enhanced syntax for the INFOTYPES statement (addition AS PERSON TABLE) for the procurement of infotype data enable you to use the new functionality. The use of these new functions is optional. You can run a PNPCE report that does not use the new events and the addition for the INFOTYPES statement in a PNP-compatible session. Since the PNPCE also has an improved selection screen, each report benefits from this even if the report does not use the functions for evaluating Concurrent Employment.

5)       What is Payroll Control Record ?

T-Code  : PA03
Payroll object that Payroll Control Record is important for the payroll run, and which contains all the information      on a payroll area

The payroll control record has the following functions:

It locks the personnel numbers, for which payroll should be run, against master data changes that affect the payroll past or present.
It locks the payroll for the period during which payroll-relevant changes are made to the master data for the personnel numbers being processed.

It makes the following information available for the system:

What is the next payroll period for which regular payroll should be run?

Up to what date is retroactive accounting carried out?

What status does the payroll currently have? (for example, Released for Payroll or Check Payroll Results)
When you carry out a payroll run, the system automatically changes the payroll status in the payroll control record. You can also change the status manually under Payroll ->Tools ->Control Record.

The control record contains the following information:
Payroll area ,  Payroll status , Payroll period , Earliest possible retroactive accounting period  , Last change made to the control record

When you create the control record in your live system, please note the following: the payroll period that you enter at the start of the live payroll run must be 1 period lower than the period with which you want to perform the live payroll run for the first time.
You want to carry out the first payroll run in period 5 1999. In the payroll control record, you must enter 4 1999 as the period. If you set the payroll control record for the first payroll run to status Released for Payroll, the system increases the period by 1 and payroll is run for period 5 1999.

Scenario for locking pernr :
There will be some cases where the pernr is still active and able to get salary,say he went for some onsite.In thiscase,we lock this pernr and run payroll.

6)       What is Time Constraint ?
 A time constraint indicates whether more than one infotype record may be available at one time. The following time constraint indicators are permissible :

1 : An infotype record must be available at all times. This record may have no time gaps. You may not delete the record last stored on the database because all records of this infotype would otherwise be deleted.
2: Only one record may be available at one time, but time gaps are permitted.
3: Any number of records may be valid at one time, and time gaps are permitted.
A = Infotype exists just once from Jan.1 1800 to Dec.12 999
B = IT exists for maximum of once from Jan.1 1800 to Dec.12 9999
T = Time constraint is based on subtype or subtype table
Z = Time constraint for time management infotypes -> T554Y

7)       Advantages & Disadvantages of LDB ?
Advantages : -  The programmer need not worry about the primary key for each table. Because Logical database knows how the different tables relate to each other, and can issue the SELECT command with proper where clause to retrieve the data.

1) An easy-to-use standard user interface.
2) Check functions, which check that user input is complete, correct, and plausible.
3) Meaningful data selection.
4) Central authorization checks for database accesses.
5) Good read access performance while retaining the hierarchical data view determined by the application logic.
6) No need of programming for retrieval, meaning for data selection

Disadvantages : - 1) If you do not specify a logical database in the program attributes, the GET events never occur.
2) There is no ENDGET command, so the code block associated with an event ends with the next event statement (such as another GET or an END-OF-SELECTION).

3) Fast in case of lesser no. of tables But if the table is in the lowest level of hierarchy, all upper level tables should be read so performance is slower.

8)       Object : An individual element of information in the system. All objects are classified according to object type. Objects that belong to the same object type share relationships and possess certain types of characteristics.

Object Types : An object type let us classify objects according to features and types of information and arrange them in categories.

Objects
Types
Organizational Unit
O
Job
C
Position
S
Cost Center
K
Person
P
Budget
BU
Task
T

Relationships:
Relationships are special subtypes of info type 1001.  Each relationshiphas two relationship types , indicated by A and B. For each relationship created (A or B), the corresponding inverse relationship is automatically set up.

Steps are -

1. Call Function Module PYXX_GET_RELID_FROM_PERNR to get the area identifier for cluster in tables PCLx.

CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
EXPORTING
               employee = pernr-pernr
IMPORTING
                relid = relid
                molga = molga

where relid is Area Cluster Identifier and molga is Country Grouping
2. Call Function Module CU_READ_RGDIR Passing the Values of molga(Country Grouping from previos Function module)

CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
                  persnr = pernr-pernr
IMPORTING
                 molga = molga
TABLES
                 in_rgdir = in_rgdir

where in_rgdir contains cluster Directory (For Export and Import of Payroll Results)
3. Call Function Module CD_READ_LAST for Reading the RGDIR directory with latest valid record

CALL FUNCTION 'CD_READ_LAST'
EXPORTING
            begin_date = pnpbegda
           end_date = pnpendda
IMPORTING
            out_seqnr = out_seqnr
TABLES
            rgdir = in_rgdir

where pnpbegda is the Latest Begin date, pnpendda is the Latest End date, out_seqnr is the sequence number and in_rgdir contains Cluster Directory
4. Call Function Module to retrieve Payroll Results   PYXX_READ_PAYROLL_RESULT

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
             clusterid = relid
           employeenumber = pernr-pernr
           sequencenumber = out_seqnr
CHANGING
            payroll_result = it_result

The Payroll Results are collected in Internal Table It_Result.

10 ) What is a Wagetype ?
Wage types are used to assign payments and deductions as well as to control the payroll program. You need wage types to pay employees.

In the SAP system there are two main categories:

- Primary or dialog wage types
- Secondary or technical wage types



In the standard delivered SAP HR system you can find many sample wage types both dialog (codes starting with letter eg. Mxxx) and technical ones.
Customer defined dialog wage type codes must start with digit.
You can recognize technical wage types as they have a slash (/) as the first character in the code name.
Technical wage types are not part of the employee's master data. System defines their value during payroll processing.
11 ) What is a repetitive Structure ?
Repetitive structures in HR denotes the table which has the same type of field structures(which stores same kind of values). For example, Table for Basic Pay Infotype 0008 is PA0008. This table stores all the wage types assigned to an employee in its fields LGAXX, BETXX, ANZXX, EINXX and OPKXX. Here XX denotes the number 01-40. These fields are repeated for 40 times, as it is defined in SAP system(We can maintain 40 different wage types for an employee in Standards).

Now if we want to fetch any specific wage type from these fields, we have to check for each field, as the wage type may be stored in any of these fields.
Infotypes which have repetitive structures in HR

0008 (Basic Pay).
0025 (Appraisals).
0041 (Date Specifications).
0052 (Wage Maintenance)

We need to use DO VARYING loop syntax.
To use this method of evaluation, define a field string whose structure corresponds to the fields in
one line of the repetitive structure.
In this field string, one line of the basic pay wage types is evaluated each time the loop is
executed.
Examples
ABAP - DO VARYING - UNICODE programming
ABAP - DO VARYING - NON-UNICODE programming

12 ) Relation Between OM & PA ?

13) Explain GET PERNR concept when we use logical data base ?

14) Explain the program flow when we use logical database PNP or PNPCE ?

15) What are the program names for logical database PNP and PNPCE ?
SAPDBPNP
SAPDBPNPCE

16 ) What is report category and for what purpose do we use report category ?

17) Why do we require Infotypes for HR module ?

18) What are the transaction codes to create the Infotypes ?
PM01

19) What is the process to enhance the Infotype ?
Go to PM01, enhance IT tab and provide the Infotype number for which you require to enhance, click on create all button(you can create individually structure, module pool program also). It will take you to the CI_nnnn structure, provide the fields you want to add – activate.

20) Importance of PA20, PA30 and PA40 ?
PA20 – Display HR Master Data
PA30 – Maintain HR Master Data
PA40 – Personnel Actions

21) How can we decide weather we can enhance the standard Infotype or not ?
Only PA Tables Can be Enhanced, Having Structure CI_INCLUDE

Go to PM01à Enter Infotype NumberàSelect Single Screen TABàChoose Customer Include à Click on Edit Tab à Enter Fields in the Stucture à generate Screen.

22) What is PAKEY structure, PSHD1 structure and what type of fields it contains?
PAKEY Contains :PERNR, OBJPS ,SEQNR,SUBTY.

23) What is PS structure?
PS Structures have basic data fields of an employee in every Infotype. These data fields will vary for every Infotype and included in respective Infotype to hold the data.

Infotype 0002 – PS0002 will have personal data fields
Infotype 0008 – PS0008 will have pay related data fields etc…

24) What are the payroll related Infotypes?
The basic Infotypes used for payroll are 0, 1, 3, 7, 8, 9, 580, 591, 45, 41, 57, 267 and others.

25) What are the time related Infotypes?
All the 2 series  Infotypes.

26) What are the personnel administration related Infotypes?
All Infotypes 0000 to 0999

27) What are the organizational related Infotypes?
1000 to 1999 Infotypes

28) What is Macro?
Macro is a set of reusable statements which can be used several times in programs.

29) What are the standard macros do we use in HR ABAP ?
30) What is PNP-SW-FOUND ?

we can say PNP-SW-FOUND returns a code after execution of HR Macro.

After using HR macros like, rp_provide_from_last , rp_provide_from_frst ..etc
it returns either 0 / 1.
we can check the above return code using PNP-SW-FOUND.

if PNP-SW-FOUND = 0.  -----------> Successful (found the record)
if PNP-SW-FOUND = 1.  -----------> UnSuccessful (not found the record)

31) What is the difference between select statement and provide statement ?

SELECT statements are used to fetch the data from DATABASE tables.
PROVIDE is used to fetch the data from Internal Tables (multiple IT by joining).

32) Which function module reads the data for particular Infotype ?
      HR_READ_INFOTYPE – to retrieve data from PA tables
      RH_READ_INFTY         – to retrieve data from OM Infotypes

33) How do you retrieve the data for repetitive structures ?
Repetitive structure is same sequence for fields varying by numeric digits. 
We do have repetitive structure in Infotype 0008 [Basic Pay] and Infotype-0041[Date Specifications].

To retrieve the data from repetitive structures we use DO… VARYING .
34) Can we develop program without logical database for hr module data retrieval ?

35) By using which FM we can upload data into Infotype ?
36) If yes then why do we require logical database ?

37) What is the transaction code to display the payroll results ?
PC_PAYRESULT

38) What is payroll driver ?
HINCALC0 Used to Simulate / Run the Payroll of Employee/ Employees.

39) Where the payroll results are stored ?

40) Explain the concept of clusters in payroll ?

41) How do you read the data from clusters?

42) What is retro active accounting ?
43) In which cluster time results are stored?

       B2 Cluster is Used to Store the Evalution of Time results
45) What is personnel area ?

46) What is personnel sub area?

47) What is payroll area ?
48) What is the difference between semi-monthly and Bi-weekly payroll area ?

49) What is sequence number?
50) What is For-period and In-period ?

51) What is off cycle payroll run ?
52) How do you execute the payroll ?

53) What is schema and transaction code ?

54) What is functions and transaction code ?

55) What is features and transaction code ?

56) What is the transaction code to modify the hr form ?

57) What are the FM do we use in OM ?

58) What is object in OM?
 Object : An individual element of information in the system. All objects are classified according to object type. Objects that belong to the same object type share relationships and possess certain types of characteristics.

Object Types : An object type let us classify objects according to features and types of information and arrange them in categories.

Objects
Types
Organizational Unit
O
Job
C
Position
S
Cost Center
K
Person
P
Budget
BU
Task
T

59) Which FM do you use to find out who is reporting to whom ?
      Fm to Get Reporting Manager of an Employee : RH_GET_LEADER

        Pre requisites : Get the Plans from PA0001 Based on penr.
Importing Parameters are :
Use Plvar = 01. ( Always )
Key Date  = Sy-datum
Otype       = S      ( By Default )
Objid        = Plans  ( u need to Fetch from PA0001 Based On Pernr )

U will get Manager ID in Exporting parameters :

LEADER_TYPE = P
LEADER_ID   = ( Manager Id ).

60) What all are the differences did you find in hr module between 4.7 and ECC6 versions ?
61) Transaction Code to Create OM Infotypes?
       PPCI

62) in Which Time Constraint does the infotype records depend on the Subtype ?
       Time Constraint - T

63)Which Infotype records Can  not be deleted ?
      Infotype records with Time Constraint – A.

64) RP_PROVIDE_FROM_LAST Contains How Many Parameters ?
     RP_PROVIDE_FROM_LAST Contains 4 Parameters , Those are
     Infotype , Subtype , Begin date , Enddate.

If you do not want to specify a particular Subtype then Enter a Space.
EX : RP_PROVIDE_FROM_LAST <Pnnnn> Space/Sub type PN-BEGDA PN-ENDDA.

65) What are the pre requisites to Run the Payroll?
66) What are Dynamic Actions? Give few examples?
Ans: Dynamic actions when triggered by the system. They are result of some personnel action. If changes are made (personnel action) to the personnel data of an info type, then has an effect on the data of a second info type, the system automatically displays the info type. One of the main purposes of the dynamic action (of the system) is to have a consistent and coherent data. These actions are started automatically by the system, unlike the Personnel actions which you start by yourself. The best example is when an action is carried out like hiring; it needs to populate a set of info types. In the initial entry of details in info type 0000 is personnel action. Then the system automatically displays next info types- which are result of dynamic action.

67) What is a Cluster?

68) What should we need to do in case of include is not showing in Where used list ( It is working in Dev and not working in QTY , Staging ).
A: Go to SE38 …> Display Code …> Utilities …> Update Navigation Index….

 That’s it….!

Comments

  1. Thanks for sharing this great information on Oracle Fusion HCM. Actually I was looking for the same information on internet for Oracle Fusion HCM Interview Questions and Answers and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about Fusion financial by attending Oracle Fusion HCM Training.

    ReplyDelete

Post a Comment

Popular posts from this blog

SAP ABAP-Internal Table Operations and Example Program

BDC (Batch Data Communication) - SAP ABAP