Hierarchy
⤷ PY-ZA (Application Component) South Africa
⤷ P16C (Package) Human resources department customizing: South Africa
IMG Activity
ID | PY_ZA_ITA88_003 | BAdI: Read Payroll Data |
Transaction Code | S_L7D_24002843 | (empty) |
Created on | 20110617 | |
Customizing Attributes | PY_ZA_ITA88_003 | BAdI: Read Payroll Data |
Customizing Activity | PY_ZA_ITA88_003 | BAdI: Read Payroll Data |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | HR_ZA_BADI_PAY_READ |
Title
BAdI: Read Payroll Data
Use
This Business Add-In is used in the South African Reports (PY-ZA) component.
This Add-In enables you to read ITA88 relevant data from the payroll results. To acheive this, you can use the method GET_PAYROLL. This method has the following parameters:
- Parameter FLT_VAL
- Wagetype from feature WWITA
- Monthly Amount towards ITA88
- ITA88 T5WITA88 Row
Sample Code:
METHOD IF_EX_HR_ZA_BADI_PAY_READ~GET_PAYROLL.
DATA : FS_RGDIR TYPE PC261,
PAY TYPE PC261,
LFS_CRT TYPE PC208,
VAR_STDAT TYPE BEGDA ,
IT_RGDIR TYPE STANDARD TABLE OF PC261,
M_LGART TYPE HRPAY99_CRT,
LV_RELID TYPE T500L-RELID,
LV_MOLGA TYPE MOLGA,
LV_TYPE TYPE T52RELID-TYPENAME,
LV_TYPENAME TYPE HRPCLX_TYPE,
REF_PAYRESULT TYPE REF TO DATA.
FIELD-SYMBOLS : <LI_MITA> TYPE HRPAY99_CRT,
<PAYRESULT> TYPE ANY .
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = FS1-PERNR
* BUFFER =
* NO_AUTHORITY_CHECK = ' '
* IMPORTING
* MOLGA =
TABLES
IN_RGDIR = IT_RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0."Payroll not executed for employee
FS1-OTCDE = ''.
ELSE.
CALL FUNCTION 'PYXX_GET_RELID_FROM_PERNR'
EXPORTING
EMPLOYEE = FS1-PERNR
IMPORTING
RELID = LV_RELID
MOLGA = LV_MOLGA
EXCEPTIONS
ERROR_READING_INFOTYPE_0001 = 1
ERROR_READING_MOLGA = 2
ERROR_READING_RELID = 3
OTHERS = 4.
IF SY-SUBRC NE 0.
EXIT.
ELSE.
SELECT SINGLE TYPENAME
FROM T52RELID
INTO LV_TYPE
WHERE RELID EQ LV_RELID
AND TABNAME = 'PCL2'.
IF SY-SUBRC NE 0.
LV_RELID = 'RW'.
LV_TYPE = 'PAYZY_RESULT'.
ENDIF.
ENDIF.
LV_TYPENAME = LV_TYPE.
CREATE DATA REF_PAYRESULT TYPE (LV_TYPENAME).
ASSIGN REF_PAYRESULT->* TO <PAYRESULT>.
VAR_STDAT = FS1-ITED1.
LOOP AT IT_RGDIR INTO FS_RGDIR WHERE FPBEG LE VAR_STDAT
AND FPEND GE VAR_STDAT.
*read table i_rgdir with key fpbeg = var_sdate INTO fs_rgdir.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = LV_RELID
EMPLOYEENUMBER = FS1-PERNR
SEQUENCENUMBER = FS_RGDIR-SEQNR
CHANGING
PAYROLL_RESULT = <PAYRESULT>
EXCEPTIONS
ILLEGAL_ISOCODE_OR_CLUSTERID = 1
ERROR_GENERATING_IMPORT = 2
IMPORT_MISMATCH_ERROR = 3
SUBPOOL_DIR_FULL = 4
NO_READ_AUTHORITY = 5
NO_RECORD_FOUND = 6
VERSIONS_DO_NOT_MATCH = 7
ERROR_READING_ARCHIVE = 8
ERROR_READING_RELID = 9
OTHERS = 10.
ENDLOOP.
ASSIGN COMPONENT 'INTER-CRT' OF
STRUCTURE <PAYRESULT> TO <LI_MITA>.
*************Monthly Deduction
LOOP AT <LI_MITA> INTO LFS_CRT WHERE LGART EQ WAGETYPE
AND CUMTY EQ 'M' ."'MITA
MOVE LFS_CRT-BETRG TO FS1-ITAD1.
AMOUNT_MON = LFS_CRT-BETRG.
ENDLOOP.
ENDIF.
ENDMETHOD.
Prerequisites
You should only carry out this step if both of the following points apply:
- The SAP standard processes do not suit your needs
- You are a competent ABAP/4 programmer
Default
In the standard system, the Business Add-In is not activated.
Activities
After calling up the IMG activity, a dialog box appears, in which the existing implementations are displayed. Choose Change, and proceed as follows:
- From the tab index, choose Interface.
- Place the cursor on the method, and double-click to enter method processing.
- Enter the coding for the implementation between the statements
method
if_ex_hr_in_cco_processing ~ <Name of method>
andendmethod
. - Save and implement your coding. Return to the Edit Implementation screen.
- Save the entries on the Edit Implementation screen.
Note: You can also change the implementation, and then activate it at a later time. In such a case, end the processing stage at this point.
- Choose Activate
The coding you stored in the method will be run when the application program is executed.
Example
To display the sample code, choose Goto -> Sample Code -> Display.
See also
Business Attributes
ASAP Roadmap ID | 257 | Create User Exits |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | I | Valid for countries specified |
Customizing Attributes | Country Key | Country Name |
---|---|---|
PY_ZA_ITA88_003 | ZA | South Africa |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20110617 |
SAP Release Created in |