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

abap-hr object

Former Member
0 Likes
721

how to read the psp-personal work schedule of each employee

Edited by: mahipal reddy on Apr 8, 2008 2:03 AM

how to read the psp-personal work schedule of each employee

Edited by: mahipal reddy on Apr 8, 2008 2:03 AM

2 REPLIES 2
Read only

venkat_o
Active Contributor
0 Likes
522

Mahipal reddy, You can read personal Work schedule rule for the employee from Infotype 0007 .table PA0007. -->Go to SE38-> give include LRHEIUXX check , u can see no of function module. Select which is suitable for your requirement. PSP --Personal shift plan. I believe u need to use HR_READ_TIMEDATA_PSP Regards, Venkat.O

Read only

Former Member
0 Likes
522

Hi,

It's so simple to read employee psp-pws. You can use FM: HR_PERSON_READ_WORK_SCHEDULE.

Check this sample code:


  DATA: l_enddate     TYPE d,
        l_startdate   TYPE d,
        lt_pdpnr       TYPE STANDARD TABLE OF pdpnr,
        lt_daypsp      TYPE STANDARD TABLE OF pdsppsp,
        lt_psp         TYPE STANDARD TABLE OF PDPSP,
        ls_pdpnr       TYPE pdpnr,
        ls_psp         LIKE LINE OF lt_psp.

    ls_pdpnr-pernr = 1006669.
    INSERT ls_pdpnr INTO lt_pdpnr INDEX 1.
    l_startdate = '20080401'.
    l_enddate = '20080430'.

  CALL FUNCTION 'HR_PERSON_READ_WORK_SCHEDULE'
    EXPORTING
      begin_date         = l_startdate
      end_date           = l_enddate
      read_from_database = 'X'
    TABLES
      pernr_tab          = lt_pdpnr
      psp                = lt_psp
      day_psp            = lt_daypsp
    EXCEPTIONS
      error_in_build_psp = 1
      OTHERS             = 2.

lt_pdpnr is table for your PERNR list.

lt_psp is table for psp-personal work schedule.

Regards,