HR模块的一些概念以及常用的函数

HR模块的一些概念以及常用的函数

一 HR Components
1. PA-Personnel Management (Master data :0000-0999)
Personnel Administration
Time Management
Payroll
Benefits
Recruitment
Business Trip Management
Table :PAnnnn
Structure:Pnnnn
pannnn:pa master data
pbnnnn: pa applicant data
人事管理主数据:人事管理:入职,分配部门,个人基本信息。。。
(针对员工) 工资管理
福利待遇
出差管理
。。。
时间管理(针对项目)
招聘管理 (针对应聘者)
2.PD-Personnel Development & Planning(Master data:1000-1999)
Organisational Management
Training & Event Management
Personnel Development
Shift Planning
Qualifications / Skills Catalogue
Personnel Costs
Table:HRPnnnn
Stucture:PHInnnn
针对组织部门:认识发展以及计划
组织管理
培训及活动管理:计划
人事发展 :对部门等的要求
shift计划 :串休
技术证书等:级别要求
人事花费:培训,活动等
3.Maintain Object(T-code:pp01)
Main Object Type : Organisational Plan Organisation Unit (O)
Position (S)
Job(C)
Task(T)
Person(P)
Other Object Types Work Centers
Cost Centers
Qualifications
4.Logical Database
PNP: Personnel Administration
PNPCE: Enhance for personnel administration
PCH: Personnel Planning
PAP: Recruitment
pnp 很多时候都替换成了pnpce, 但是使用 Get payroll 的时候 要用pnp 。提到Get Payroll 要注意的是时间不在用pn-begda pn- endda 了 而是要用 pybegda pyendda 或者 pn-begps pn-endps ,前者比较多,这两个的区别有在研究中,用的时候可以 debug一下 看看有没有数据 (*^__^*) 嘻嘻…… 。还有个小技巧,在screen中,不知道field的名称 可以F1查询哦~~

PNP—Table: pernr
Get pernr
PNPCE—-Table:pernr
Nodes:peras
Get peras
PCH—- Table:objec
Get objec.
PAP暂时没用过,以后如果用到在补充。。。待续中。。。。

T-code:se36 see the logical database

顺序:tables: pernr.
nodes:peras.
infotypes:0001.
start-of-selection.
select data. “select要写在get之前,因为get相当于loop,写在里面效率低
Get peras.
read or loop .
end-of-selection.
5.Report Category
change screening
Create a report category and assign it to report
二 Reading Infotypes
1. MACRO(T-code:se11->trmac)
常用 rp_provide_from_last Pnnnn space pn-begda pn-endda(取最新一条数据)
次常用 rp_set_data_interval Pnnnn pn-begda pn-endda
rp_read_all_time_ity
rp_get_hire_date
rp-read-<table>
space or subtype
begda <pn-endda
endda >pn-begda.
pnp-sw-found = 1. 取到数据
2.Function
HR_READ_INFOTYPE
HR_READ_SUBTYPE
HR_INFOTYPE_OPERATION updating infotype records.
operation:MOD(change),COPY,DEL,INS (insert),LIS9(delimit)
3.provide * from p0001
* from p0002
between pn-begda and pn-endda
where……
比较常用的是前两个 尤其第一个 第三个很少用到
三 Time Data
1.Importing Time Data into an Internal Table

INFOTYPES : 0001,
2001 MODE N. ” when mode n,infotype 2001 can’t be got into p2001 using get pernr or peras.
DATA : BEGIN OF ITAB OCCURS 0,
BUKRS LIKE P0001-BUKRS, ” company code
WERKS LIKE P0001-WERKS, ” personnel area
AWART LIKE P2001-AWART, ” 出勤/缺勤的类型
ABWTG LIKE P2001-ABWTG, ” 出勤/缺勤的天数
END OF ITAB.

GET PERNR.

RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
MOVE-CORRESPONDING P0001 TO ITAB.

RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA. “use this macro to get 2001 time data into p2001

LOOP AT P2001.
MOVE-CORRESPONDING P2001 TO ITAB.
ENDLOOP.

2.Processing Repeat Strictures

* Define Work Area.
DATA: BEGIN OF WAGETYPES,
LGA LIKE P0008-LGA01,
BET LIKE P0008-BET01,
ANZ LIKE P0008-ANZ01,
EIN LIKE P0008-EIN01,
OPK LIKE P0008-OPK01,
END OF WAGETYPES.

GET PERNR.
RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.

DO 20 TIMES VARYING WAGETYPES FROM P0008-LGA01
NEXT P0008-LGA02.
IF not WAGETYPES-LGA IS INITIAL.
WRITE: / WAGETYPES-LGA, WAGETYPES-BET.
ENDIF.
ENDDO.

HR有几个表很特别 就目前知道的是 0008 和0041 都是要do ** times
TABLES:pernr,t548t. ” Date Types
INFOTYPES:0001, ” org.assignment
0041. ” data specification
DATA:BEGIN OF dtype, ” useful in p0014 (Date Specifications)
dar LIKE p0041-dar01, ” Date type
dat LIKE p0041-dat01, ” Date for date type
END OF dtype.
GET pernr.
DO 12 TIMES VARYING dtype-dar FROM p0041-dar01
NEXT p0041-dar02.
IF dtype-dar IS INITIAL.
EXIT.
ELSE.
IF dtype-dar IN datetype. “eq 01
CLEAR data_tab_wa.
endif.

四 Cluster Database Table
1. RPCnxyz:
n=1,2 pcl1 or 2.
xy= cluster eg.RX (pcln-relid) : 不同的pcl是不一样的
z=0 international or country indicater ,always 0.
Macros are used to access the data via the buffer.
2. PCL1 DB for HR work areas
PCL2 Accounting results(time, payroll…)
PCL3 Recruitment data
PCL4 Documents
PCL5 Cost planning

compile payroll results
3.Importing / exporting cluster data
TABLES: PCLn.
INCLUDE RPCnxyz. “Cluster definition
xy-KEY-FIELD = <Value>.
RP-IMP-Cn-xy. / RP-EXP-Cn-xy. ” macro
*display
IF SY-SUBRC NE 0.
WRITE: / ‘Export Failed’.
ENDIF.
4. Display last payroll results use function
RGDIR:Stored payroll results
read cluster directory : CU_READ_RGDIR.
process cluster directory : CU_READ_last
read payroll results: PYXX_READ_PAYROLL_RESULTS
Function module CD_EVALUATION_PERIODS enables you to process table RGDIR.
display the wage types from the results table RT

payroll driver RPCALCn0,use hr data (pannnn) and last payroll results (pcl2)

分享到:

发表评论

昵称

沙发空缺中,还不快抢~