Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HR Related Problem

Former Member
0 Likes
522

Hi,

I have to classify all the employees in my company according to

1. Executive - EXEC

2. Non Executive - NONEXEC

3. Not Eligible - NE

The criteria for selecting EXEC is :

- P0000-STAT1=1 or 2

- P0758-CAREA = ‘US’’ (BEGDA <= Eligibility Date & ENDDA >= Eligibility Date

- P0008-ANSAL (as of Eligibility Date)< V_T511P amount in variable ZEXEC = < 181,000

- P0001-PERSK = 10, 11

- P0008-TRFAR = 01

- P0001-BTRTL = <>FS01

The Criteria for selecting non executive is

- P0000-STAT1=1 or 2

- P0758-CAREA = ‘US’ (BEGDA <= Eligibility Date & ENDDA >= Eligibility Date

- P0008-ANSAL (as of Eligibility Date) >= V_T511P amount in variable ZEXEC = >= 181,000

- P0001-PERSK = 10, 11

- P0008-TRFAR = 01

- P0001-BTRTL = <>FS01

How to write the selection criteria, How should my query look, it also should follow all the authorizations?

I am new to HR - Pls help me out with this problem.

Thank you

Hi,

I have to classify all the employees in my company according to

1. Executive - EXEC

2. Non Executive - NONEXEC

3. Not Eligible - NE

The criteria for selecting EXEC is :

- P0000-STAT1=1 or 2

- P0758-CAREA = ‘US’’ (BEGDA <= Eligibility Date & ENDDA >= Eligibility Date

- P0008-ANSAL (as of Eligibility Date)< V_T511P amount in variable ZEXEC = < 181,000

- P0001-PERSK = 10, 11

- P0008-TRFAR = 01

- P0001-BTRTL = <>FS01

The Criteria for selecting non executive is

- P0000-STAT1=1 or 2

- P0758-CAREA = ‘US’ (BEGDA <= Eligibility Date & ENDDA >= Eligibility Date

- P0008-ANSAL (as of Eligibility Date) >= V_T511P amount in variable ZEXEC = >= 181,000

- P0001-PERSK = 10, 11

- P0008-TRFAR = 01

- P0001-BTRTL = <>FS01

How to write the selection criteria, How should my query look, it also should follow all the authorizations?

I am new to HR - Pls help me out with this problem.

Thank you

3 REPLIES 3
Read only

Former Member
0 Likes
488

Hi,

Write the code as below:

REPORT RPDEMO.

TABLES: PERNR.

INFOTYPES: 0000, 0001,<Mention all infotypes>.

GET PERNR.

RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA

RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA

.................................................

.................................................

Repeat the same Command for all infotypes.

and check all the conditions from all infotypes for the respective Category EXECUTIVE and NON..

Put the related records into a sepearte Int table and display.

Regards,

Anji

Read only

0 Likes
488

Hi Anji,

I have to write BADI the name of the BADI is HRECM00_CP1GP, wherein i have to distinguish the the employees according to EXEC and NONEXEC. Now hot to go abot it

Read only

Former Member
0 Likes
488

Hi John,

This solution should resolve ur query. If resolved, reward points.

Rgds,

CK

TABLES: pa0000, "Infotype 0000 (Actions)

  • PA0758, (Not available)

pa0383, "Infotype 0383 (Compensation Package)

pa0008, "Infotype 0008 (Basic Pay)

pa0001. "Infotype 0001 (Org. Assignment)

DATA:

BEGIN OF gt_pa0000 OCCURS 0,

pernr TYPE pa0000-pernr,

stat1 TYPE pa0000-stat1,

END OF gt_pa0000,

BEGIN OF gt_pa0383 OCCURS 0,

pernr TYPE pa0383-pernr,

END OF gt_pa0383,

BEGIN OF gt_pa0001 OCCURS 0,

pernr TYPE pa0001-pernr,

persk TYPE pa0001-persk,

END OF gt_pa0001,

BEGIN OF gt_pa0008 OCCURS 0,

pernr TYPE pa0008-pernr,

ansal TYPE pa0008-ansal,

END OF gt_pa0008,

BEGIN OF gt_finalout OCCURS 0,

exe_pernr TYPE pa0383-pernr,

nonexe_pernr TYPE pa0383-pernr,

END OF gt_finalout.

DATA: zexec LIKE pa0008-ansal VALUE '181000'.

START-OF-SELECTION.

SELECT pernr

stat1

INTO TABLE gt_pa0000

FROM pa0000

WHERE begda <= sy-datum "Eligibility Date

AND endda >= sy-datum "Eligibility Date

AND stat1 = '1' OR

stat1 = '2'.

SELECT pernr

INTO TABLE gt_pa0383

FROM pa0383

FOR ALL ENTRIES IN gt_pa0000

WHERE pernr = gt_pa0000-pernr

AND begda <= sy-datum "Eligibility Date

AND endda >= sy-datum "Eligibility Date

AND carea = 'US'.

SELECT pernr

persk

INTO TABLE gt_pa0001

FROM pa0001

FOR ALL ENTRIES IN gt_pa0000

WHERE pernr = gt_pa0000-pernr

AND begda <= sy-datum

AND endda >= sy-datum

AND persk = '10' OR

persk = '11'

AND btrtl <> 'FA01'.

SELECT pernr

ansal

INTO TABLE gt_pa0008

FROM pa0008

FOR ALL ENTRIES IN gt_pa0000

WHERE pernr = gt_pa0000-pernr

AND begda <= sy-datum "Eligibility Date

AND endda >= sy-datum "Eligibility Date

AND trfar ='01'.

END-OF-SELECTION.

LOOP AT gt_pa0000.

READ TABLE gt_pa0008 WITH KEY pernr = gt_pa0000-pernr.

CHECK sy-subrc EQ 0.

  • Criteria for selecting EXEC is:

IF gt_pa0008-ansal < zexec.

MOVE gt_pa0008-pernr TO gt_finalout-exe_pernr.

  • Criteria for selecting NON-EXEC is:

ELSEIF gt_pa0008-ansal >= zexec.

MOVE gt_pa0008-pernr TO gt_finalout-nonexe_pernr.

ENDIF.

ENDLOOP.