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 Module: Job Classification Start Date

Former Member
0 Likes
681

Hi,

My situation is this: I need the start date (p0001-begda) that is tied to a job classification (job key) or p0001-stell. Each time an Action occurs, this creates an Org. Assignment record (0001). So I may have multiple records on different dates tied to the same job. What I need is the p0001-begda from the 1st time the employee entered the job (where the job key changed). Is there a simple piece of code that would accomplish this? Any help would be appreciated - thanks,

Jim

3 REPLIES 3
Read only

former_member226519
Active Contributor
0 Likes
635

use ldb PNP.

tables: pernr.

infotypes: 0001.

...

start-of-selection.

get pernr.

loop at p0001 where stell = my_stell.

exit.

endloop.

  • P0001 is sorted by BEGDA, overlapping records are not allowed, so you will get the first record.

Read only

0 Likes
635

And my_stell would be designated as what? I need the first begda where the job changed. Thx,

Jim

Read only

0 Likes
635

Hi,

DATA I_COUNT TYPE I.
loop at p0001.

AT FIRST STELL.
" IF Count is 1 that is first job when the count is 2 the job is changed and exit the loop.
I_COUNT = I_COUNT + 1.
IF I_COUNT EQ 2.
EXIT.
ENDIF.
ENDAT.
endloop.