PMS Template disabling header access and controlling pms dates

How to disable the header for the template so that user cant change:-
1. supervisor
2. validity date

goto se19
-> HRHAP00_ACC_HEADER (make a new badi base on this ie zhrap00_acc_header)
double click on GET_HEADER_ACCESS
S_HEADER_CUST_DISPLAY-APPRAISER = ' '. " to prevent user from changing the supervisor
S_HEADER_CUST_DISPLAY-VALIDITY_PERIOD = ' '. "to disable user from changing the dates


-> HRHAP00_DOC_DEF_DV (make a new badi base on this ie zHRHAP00_DOC_DEF_DV)
double click on DEFAULT_PERIOD

* changing default date to appraisal period
DATA: BEGDA TYPE DATUM,
ENDDA TYPE DATUM.
BEGDA = SY-DATUM.
BEGDA+4(4) = '0201'."february 01
ENDDA+4(4) = '0630'."june 30
ENDDA+0(4) = SY-DATUM+0(4) + 1. "adding current year

* set exporting data
S_PERIOD_VALIDITY-AP_START_DATE = BEGDA.
S_PERIOD_VALIDITY-AP_END_DATE = ENDDA.
NO_STANDARD_DEFAULTING = C_TRUE.



* note do remember you need to add the badi into sm34 so that the badi is shown under further template behaviour.
0 comments:

Post a Comment

message

Labels

NuffNang

Search google

Blog Archive

My Blog List

Twitter

Message

Followers