Hierarchy

⤷

⤷

IMG Activity
ID | PAY_PT_SGL12 | BAdI: Unique Report - attachment C |
Transaction Code | S_L4H_49001859 | (empty) |
Created on | 20110328 | |
Customizing Attributes | PAY_PT_SGL12 | BAdI: Unique Report - attachment C |
Customizing Activity | PAY_PT_SGL12 | BAdI: Unique Report - attachment C |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | HR_PT_UNIQUE_RP_RFC |
Use
This Business Add-In (BAdI) is used in component Payroll - Portugal (PY-PT). This BAdI allows customizations in Attachment C of the Unique Report program (RPCUNRP0). The fill in of this BAdI is mandatory for the delivery of information on continuous training activities.
The BAdI is composed of the following methods:
- Reads additional data for the Unique Report (GET_DATA_ANEXO_RFC): this method adds or changes additional data for the Unique Report. The method is called at the end of the processing block END-OF-SELECTION of the program.
- Reads employee data (GET_EMPLOYEE_DATA): with this method you can change the fields of the structure Unique Report: Attachement RFC (PPTS_UNIQUE_RP_ANEXO_RFC_EES) to the creation of XML tag <worker>. The method is called in the processing block GET PERNR of the program.
- Lê dados da formação (GET_TRAINING_DATA): with this method you can add records to parameter CT_TRAINING for the creation of the XML tag <training>. The method is called in the processing block GET PERNR of the program.
- Reads employee and training data (Azores) (GET_EMPLOYEE_AZ_DATA): with this method you can change the fields of structure HR-PT: UR - substructure Attachment C - workers (Azores) (PPTS_UNIQUE_RP_ANEXO_RFC_EE_AZ) for the creation of the XML tag <worker> and the corresponding trainings. The method is called in the processing block GET PERNR of the program. The method includes only workers from Azores.
- Reads additional data for the Unique Report (Azores) (GET_DATA_ANEXO_RFC_AZ): this method adds or changes additional data for the Unique Report. The method is called in the end of the processing block END-OF-SELECTION of the program. The method includes only workers from Azores.
Requirements
Standard settings
To get more information on the standard settings (filters, individual or multiple use), check the tab Enhancement spot element definitions in BAdI Builder (transaction SE18).
Activities
See also
For more information on the BAdI implementation as part of the Enhancement Framework, see SAP Library for the NetWeaver platform in SAP Help Portal on http://help.sap.com/nw_platform. Choose a release and then select Application Help. In the SAP Library, select SAP NetWeaver Library: Function-Oriented View -> Application Server -> Application Server ABAP -> Application Development on AS ABAP -> ABAP Customer Development -> Enhancement Framework.
Example
- Implementation example of the method GET_EMPLOYEE_DATA:
method CL_HR_PT_UNIQUE_RP_RFC_BADI~GET_EMPLOYEE_DATA.
DATA ls_entri TYPE ppts_unique_rp_anexo_rfc_entri.
DATA ls_peri TYPE ppts_unique_rp_anexo_rfc_peri.
ls_peri-ref_period_attr = 'RU_PEDREF'.
ls_peri-ref_period = '01'.
APPEND ls_peri TO ls_entri-ref_period[].
ls_entri-training_id = '1'.
ls_entri-initiative_attr = 'RU_INICIAT'.
ls_entri-initiative = '01'.
ls_entri-train_schedule_attr = 'RU_HORFORM'.
ls_entri-train_schedule = '02'.
ls_entri-diploma_attr = 'RU_DIPLOM'.
ls_entri-diploma = '01'.
APPEND ls_entri TO cs_employee-entries[].
cs_employee-ee_regime_attr = 'RU_REREAP'.
cs_employee-ee_regime = '2'.
cs_employee-niss = '12345678901'.
cs_employee-name = 'Name of employee'.
cs_employee-freq_situation_attr = 'RU_SITFREQ'.
cs_employee-freq_situation = '01'.
endmethod.
- Implementation example of the method GET_TRAINING_DATA:
method CL_HR_PT_UNIQUE_RP_RFC_BADI~GET_TRAINING_DATA.
DATA ls_train TYPE ppts_unique_rp_anexo_rfc_train.
ls_train-train_area_attr = 'RU_AREAFORM'.
ls_train-train_area = '143'.
ls_train-modality_attr = 'RU_MODAL'.
ls_train-modality = '06'.
ls_train-duration = '244'.
ls_train-train_entity_attr = 'RU_ENTFORM'.
ls_train-train_entity = '06'.
ls_train-qualification_attr = 'RU_QUALIF'.
ls_train-qualification = '08'.
APPEND ls_train TO ct_training[].
endmethod.
- Implementation example of method GET_EMPLOYEE_AZ_DATA:
method CL_HR_PT_UNIQUE_RP_RFC_BADI~GET_EMPLOYEE_AZ_DATA.
DATA ls_employee TYPE PPTS_UNIQUE_RP_ANEXO_RFC_EE_AZ.
DATA ls_training TYPE PPTS_UNIQUE_RP_ANEXO_RFC_TR_AZ.
DATA lt_training TYPE PPTT_UNIQUE_RP_ANEXO_RFC_TR_AZ.
ls_employee-niss = '99999567890'.
ls_employee-ee_regime = '1'.
ls_employee-name = 'Name of employee'.
ls_employee-freq_situation = '01'.
ls_training-ref_period = '01'.
ls_training-train_area = '080'.
ls_training-modality = '04'.
ls_training-initiative = '02'.
ls_training-duration = '15'.
ls_training-train_schedule = '03'.
ls_training-train_entity_attr = '06'.
ls_training-diploma = '05'.
ls_training-qualification = '07'.
APPEND ls_training TO lt_training.
ls_training-ref_period = '02'.
ls_training-train_area = '080'.
ls_training-modality = '06'.
ls_training-initiative = '03'.
ls_training-duration = '50'.
ls_training-train_schedule = '03'.
ls_training-train_entity_attr = '05'.
ls_training-diploma = '01'.
ls_training-qualification = '08'.
APPEND ls_training TO lt_training.
ls_employee-trainings = lt_training.
*************************************************************
cs_employee = ls_employee.
endmethod.
- Implementation example of method GET_DATA_ANEXO_RFC_AZ:
method CL_HR_PT_UNIQUE_RP_RFC_BADI~GET_DATA_ANEXO_RFC_AZ.
DATA ls_employee TYPE PPTS_UNIQUE_RP_ANEXO_RFC_EE_AZ.
DATA lt_employee TYPE PPTT_UNIQUE_RP_ANEXO_RFC_EE_AZ.
DATA ls_training TYPE PPTS_UNIQUE_RP_ANEXO_RFC_TR_AZ.
DATA lt_training TYPE PPTT_UNIQUE_RP_ANEXO_RFC_TR_AZ.
*************************************************************
ls_employee-niss = '01234567890'.
ls_employee-ee_regime = '1'.
ls_employee-name = 'Name of employee'.
ls_employee-freq_situation = '01'.
ls_training-ref_period = '01'.
ls_training-train_area = '080'.
ls_training-modality = '04'.
ls_training-initiative = '02'.
ls_training-duration = '15'.
ls_training-train_schedule = '03'.
ls_training-train_entity_attr = '06'.
ls_training-diploma = '05'.
ls_training-qualification = '07'.
APPEND ls_training TO lt_training.
ls_employee-trainings = lt_training.
*************************************************************
APPEND ls_employee TO cs_rfc-employees.
*************************************************************
CLEAR ls_employee.
CLEAR ls_training.
CLEAR lt_training.
ls_employee-niss = '98765432191'.
ls_employee-ee_regime = '1'.
ls_employee-name = 'Name of employee'.
ls_employee-freq_situation = '01'.
ls_training-ref_period = '01'.
ls_training-train_area = '080'.
ls_training-modality = '04'.
ls_training-initiative = '02'.
ls_training-duration = '15'.
ls_training-train_schedule = '03'.
ls_training-train_entity_attr = '06'.
ls_training-diploma = '05'.
ls_training-qualification = '07'.
APPEND ls_training TO lt_training.
ls_training-ref_period = '02'.
ls_training-train_area = '080'.
ls_training-modality = '06'.
ls_training-initiative = '03'.
ls_training-duration =
Business Attributes
ASAP Roadmap ID | 105 | Define functions and processes |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | I | Valid for countries specified |
Customizing Attributes | Country Key | Country Name |
---|---|---|
PAY_PT_SGL12 | PT | Portugal |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20110519 |
SAP Release Created in |