cancel
Showing results for 
Search instead for 
Did you mean: 

Planned Working Time

Former Member
0 Kudos

hi all,

i got to create following program and i have no apab idea about it i had worked on functional part of sap-hr. so please help me

Create a program for checking infotype "Planned Working Time";

check if workschedule exists.

do explain me how to check workschedule existence

Accepted Solutions (0)

Answers (2)

Answers (2)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Just write this coding.

data itab type standard table of pa0007.

data wa type pa0007.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

PERNR = '22008476' "Give employee no.

INFTY = '0007' "Planned working time infotype

  • BEGDA = '18000101'

  • ENDDA = '99991231'

TABLES

INFTY_TAB = itab.

IF SY-SUBRC = 0.

loop at itab into wa.

write wa-schkz.

endloop.

ENDIF.

Specify the data for begda and endda if you know the date.

Kindly reward points by clikcing the star on the left of reply,if it helps.

Former Member
0 Kudos

hi jayanthi,

your code is not working i cannot exicute it.

do please tell me the change to be done in order to make it exicutable

Message was edited by:

anuj anuj

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You need to pass the value for pernr.Make it as parameter as below and give the valid value in selection screen.

parameters p_pernr type pa0001-pernr.

data itab type standard table of pa0007.

data wa type pa0007.

if not p_pernr is initial.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

PERNR = p_pernr "Give employee no.

INFTY = '0007' "Planned working time infotype

  • BEGDA = '18000101'

  • ENDDA = '99991231'

TABLES

INFTY_TAB = itab.

IF SY-SUBRC = 0.

loop at itab into wa.

write wa-schkz.

endloop.

ENDIF.

else.

message i000 with 'Enter pernr'.

leave list-processing.

endif.

amit_khare
Active Contributor
0 Kudos

Check for the existence of IT0007(table PA0007) field SCHKZ for the employees.

You can use FM HR_PERSONAL_WORK_SCHEDULE also for the same.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

cuold you please explain in detail please i am very new to hr-abap

amit_khare
Active Contributor
0 Kudos

Hi,

For writing report you need to check report programming in HR.

Check this link for Learning ABAP - HR.

I can give you the logic for your report.

Crate a selection screen and extract data for active employees from PA0000.

For those active employees check the existence of PA0007.

Regards,

Amit

Reward all the helpful replies.

Former Member
0 Kudos

the link which u have suggested in tht i can see nohr-abap programing.

please help me with the same, so that i could get my required job done

amit_khare
Active Contributor