Вы находитесь на странице: 1из 6

custom infotypes - Range 9000-9999 PM01- Creation of custom infotypes/ change in standard IT no select statements to be used.

( HR_READ_INFOTYPE) PPOM_OLD- tcode for staff assignment infotype HRP1000 and HRP1001 - Org. Mgmt. PP02- tcode to upload hig amout of data with respect to ORg. Unit. t588z- table for dynamic action position create- ppoce ( creation ogr. staffind (position)) RPTQT00 - tcode for time evaluation PBAS0001- User exit for HR infotype --> got to tcode cmod --> add a project --> use this BAPI ***** Applicants data goes to PB* tabels , once an employee is hired then data goes to PA* tabels. *** RPUDELPN- standard report to delete an emp. *** every infotype has a different screen alocated to it. Diff between abap & HRabap . **** Evry infotype table has 4s structure : 1. PAKEY : Key for HR Master Data ( stores key fields for infotype) 2. PSHD1 : HR Master Record: Control Field ( stores control dat a like changed on. changed by etc.) 3. PS0006 : HR Master Record: Infotype 0006 (Addresses) ( it is 0006) ( Stor es the master data for the infotype ) 4. CI INCLUDE : Test enhancement for infotype ( we can add z fields in to this include ) Tcode- PA40 - to hire an employee. T588m - table su14- to adjust the table ******************************************SAMPLE REPORT************************* ******** REPORT ZTEST_ISH_HR. INFOTYPES : 0001. TABLES pernr. START-OF-SELECTION. GET pernr. LOOP AT p0001 where begda GE '20120110' and endda EQ '99991231'. WRITE: / p0001-pernr, / p0001-werks.

ENDLOOP. ******************************************************************************** ********** MACROS : PNP - LDB fr HR reports SAPDBPNP - driver program for LDB PNP. DBPNPMAC - macros are inlcuded in the include. ******************************************************************************** ********** Repeat structure concept : Infotype 0008 -(wage Types) -------------Sample Report---------------------------REPORT ZTEST_HRWAGE. INFOTYPES: 0002, 0008. TABLES : PERNR. GET PERNR. TYPES: BEGIN LGA BET END OF OF BASIC_PAY, LIKE P0008-LGA01, LIKE P0008-BET01, BASIC_PAY.

DATA: wa_basic_pay TYPE basic_pay. DO 20 TIMES VARYING wa_BASIC_PAY-lga FROM P0008-LGA01 NEXT P0008-LGA02 VARYING wa_basic_pay-bet FROM p0008-bet01 NEXT p0008-bet02. WRITE:/ wa_BASIC_PAY-LGA. ENDDO. -------------------------------------------------------******************************************************************************** ********** Reading Time Data: infotype 2011- stores punching data , PA2011 doesnt exists because of high amoun t of data "TEVEN" is the table name for storing punching data. TEVEN is a cluster table ( stores data in zipped format ) RP-PROVIDE-FROM-LAST pnnnn SPACE pn-begda pn-endda. ******** if any subtype is there for It, the put subtype number instread of space. ----------Sample Report for macro-----REPORT ZHTR_ISH1.

INFOTYPES : 0002. SELECTION-SCREEN BEGIN OF BLOCK b1. PARAMETERS: pernr TYPE p0002-pernr OBLIGATORY, begda TYPE p0002-begda OBLIGATORY, endda TYPE p0002-endda OBLIGATORY. SELECTION-SCREEN END OF BLOCK b1. RP-READ-INFOTYPE pernr 0002 p0002 begda endda. LOOP AT p0002. WRITE : / p0002-vorna, p0002-nachn. ENDLOOP. --------------------------------------******************************************************************************** ********** HR REPORT CATEGORY ***** Used to modify selection screens . We can add custom fields using : SELECTION-SCREEN BEGIN OF BLOCK b1. PARAMETERS: p_nick TYPE pernr_d. SELECTION-SCREEN END OF BLOCK b1.

******************************************************************************** ********** LDB PNPCE used for concurrent employement. ****** we use here GET PERAS not get pernr. ( GCP role , emp ids are diierent ) infotype used is 0709. One person id is used for all emp id used at all locations. ******************************************************************************** ********** SQVI- tcode for creation of an infoquerry -Join between table (Layout) No auth required for user in this case.. ******************************************************************************** ********** planned working time--- IT 0007 Work schedule button*** Fm used : HR_PERSON_READ_WORK_SCHEDULE

CALL FUNCTION 'HR_PERSON_READ_WORK_SCHEDULE' EXPORTING BEGIN_DATE = END_DATE = * GROUPING_DWS = * GROUPING_ATTENDENCE = * GROUPING_SUBSTITUTE = * READ_FROM_DATABASE = ' ' * IM_READ_NO_LOCKED_RECORDS = TABLES PERNR_TAB = PSP = DAY_PSP = * EXCEPTIONS * ERROR_IN_BUILD_PSP = 1 * OTHERS = 2 .

FM: HR_TIME_RESULTS_IN_INTERVAL

PCL2 : cluster table for storing data time & payroll level. PCL4 : table to store change log ( data changed also) ( Standard Report name for PCL4- RPUAUD00) ******************************************************************************** ************** Tcode- PPOCE to create position and org unit. use FM "RH_STRUC_GET" to read realation ship data field ACT_WEGID = O-S-P ******************************************************************************** ************** *************PAYROLL**************** tcode to view payroll - pc_payresult

-----------------Sample Report----------------------------

REPORT ZTEST_MDCPAY. DATA: DATA: DATA: DATA : DATA: payroll TYPE pay99_result. wa_rt LIKE LINE OF payroll-inter-rt. iv_relid LIKE t500l-relid. itab1 TYPE hrpy_rgdir OCCURS 10 WITH HEADER LINE. itab TYPE pc261 OCCURS 0 WITH HEADER LINE.

DATA : begda endda

TYPE TYPE

dats, dats.

iv_relid = 'IN'. " country of the employee SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. PARAMETERS: p_pernr TYPE pernr_d, p_begda LIKE sy-datum, p_endda LIKE sy-datum. SELECTION-SCREEN END OF BLOCK b1. START-OF-SELECTION. BREAK-POINT. * SELECT * * FROM hrpy_rgdir * INTO TABLE itab * WHERE pernr = p_pernr * AND fpend >= p_begda * AND fpend <= p_endda * AND void = ' '. CALL FUNCTION 'CU_READ_RGDIR_NEW' " FM TO READ INDEX EXPORTING persnr = p_pernr check_read_authority = 'X' IMP_CLIENT = IMPORTING MOLGA = TABLES in_rgdir = itab EXCEPTIONS NO_RECORD_FOUND = 1 IMPORT_MISMATCH_ERROR = 2 NO_READ_AUTHORITY = 3 OTHERS = 4 . IF sy-subrc <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. LOOP AT itab where fpbeg = p_begda and fpend = p_endda. itab1-pernr = p_pernr. itab1-seqnr = itab-seqnr. itab1-srtza = itab-srtza. APPEND itab1. ENDLOOP. READ TABLE itab1 WITH KEY srtza = 'A'. CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT' EXPORTING clusterid = iv_relid employeenumber = itab1-pernr sequencenumber = itab1-seqnr read_only_international = 'X' " FM TO READ ACTUAL PAYROLL

* * * * * * * * * *

CHANGING payroll_result EXCEPTIONS illegal_isocode_or_clusterid error_generating_impowa_rt impowa_rt_mismatch_error subpool_dir_full no_read_authority no_record_found versions_do_not_match error_reading_archive error_reading_relid OTHERS BREAK-POINT.

= payroll = 1 = 2 = 3 = = = = = = = 4 5 6 7 8 9 10.

LOOP AT payroll-inter-rt INTO wa_rt WRITE: / wa_rt-lgart , wa_rt-betrg. ENDLOOP.

WHERE betrg IS NOT INITIAL.

----------------------------------------------------------******************************************************************************** **************

Вам также может понравиться