Processing 'Time Data'.
· Dependence of time data on validity period
· Importing time data
· Processing time data using internal tables
Time Data and Validity Period
· Time data always applies to a specific validity period.
· The validity periods of different types of time data are not always the same as the date selection period specified in the selection screen.
Date selection period |---------------|
Leave |-------------|
· PROVIDE in this case is therefore not used for time infotypes.
Importing Time Data
· GET PERNR reads all time infotypes from the lowest to highest system data, not only those within the date selection period.
· To prevent memory overload, add MODE N to the infotype declaration. This prevents the logical database from importing all data into infotype tables at GET PERNR.
· Use macro RP-READ-ALL-TIME-ITY to fill infotype table.
INFOTYPES: 2001 MODE N.
GET PERNR.
RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.
LOOP AT P0021.
If P0021-XYZ = ' '. A=B. Endif.
ENDLOOP.
Processing Time Data
· Once data is imported into infotype tables, you can use an internal table to process the interested data.
DATA: BEGIN OF ITAB OCCURS 0,
BUKRS LIKE P0001-BUKRS, "COMPANY
WERKS LIKE P0001-WERKS, "PERSONNEL AREA
AWART LIKE P2001-AWART, "ABS./ATTEND. TYPE
ASWTG LIKE P2001-ASWTG, "ABS./ATTEND. DAYS
END OF ITAB.
GET PERNR.
RP-PROVIDE-FROM-LAST P0001 SAPCE PN/BEGDA PN/ENDDA.
CLEAR ITAB.
ITAB-BUKRS = P0001-BURKS. ITAB-WERKS = P0001-WERKS.
RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA.
LOOP AT P2001.
ITAB-AWART = P2001-AWART. ITAB-ASWTG = P2001-ASWTG.
COLLECT ITAB. (OR: APPEND ITAB.)
ENDLOOP.
** 출처 : http://www.erpgenie.com/
* e-abap님에 의해서 게시물 이동되었습니다 (2007-04-24 11:53)
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
10 | Process Infotypes [1] | 김대영 | 2007.04.24 | 2924 |
» | HR Time Data [2] | 김대영 | 2007.04.24 | 2942 |
8 | Processing Payroll infotypes/Cluster [1] | 김대영 | 2007.04.24 | 5079 |
7 | HR ABAP 프로그래밍 [12] | sapjoy | 2007.03.13 | 2820 |
6 | HR350 Programming in HR관련입니다. [5] | 하얀콩 | 2007.03.27 | 1823 |
5 | HR306 CONFIG TIME관련입니다.. [1] | 하얀콩 | 2007.03.10 | 1702 |
4 | [re] HR 덤프 부탁드립니다.. [3] | sapjoy | 2007.03.09 | 2675 |
3 | HR-용어집 [10] | sapjoy | 2007.01.30 | 2828 |
2 | hr [11] | hr | 2007.01.22 | 2348 |
1 | HR305_Master_Data [9] | hr | 2007.01.22 | 2812 |