Hierarchy
⤷ PY-ZA (Application Component) South Africa
⤷ P16C (Package) Human resources department customizing: South Africa
IMG Activity
ID | OHAZA_SPBADI01 | BADI: Maintain Salary Packaging Subscreens |
Transaction Code | S_L9C_94000250 | (empty) |
Created on | 20000911 | |
Customizing Attributes | OHAZA_SPBADI01 | BADI: Maintain Salary Packaging Subscreens |
Customizing Activity | OHAZA_SPBADI01 | BADI: Maintain Salary Packaging Subscreens |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | OHAZA_SPBADI01 |
Several parts of the Salary packaging screens are subscreens called by the main program. This includes the header information on both compare and modeling screen and the edit section on the modeling screen.
The Standard program SAPMP16B calls specific subscreens defined in SAPMP16B. With this BADI it is possible to call different subscreens in a separate program. There are two methods HEADER_SCREENS_GET and EDIT_SCREEN_GET.
method HEADER_SCREENS_GET
importing
employee_info type hrcm_empinfo
changing
header_program type sy-repid
model_header_program type sy-repid
model_header_screen type sy-dynnr
compare_header_screen type sy-dynnr
request_header_screen type sy-dynnr
The structure employee_info contains all information about the employee such personnel number, molga and other infotype 1 and 8 info. Depending thereon one can set an alternative program (header_program) with alternative screens for the compare and request screen or an alternative model screen in another program (model_header_program). This alternative programs and screens must exist.
method EDIT_SCREEN_GET
importing
component_info type spa_component_info
employee_info type hrcm_empinfo
changing
edit_program type sy-repid
add_editprogram type sy-repid
edit_screen type sy-dynnr
add_editscreen type sy-dynnr
add_edittitle type text60.
The standard program sets per salary component click specific screens to edit that component. It depends on the infotype of this component. In the method one can overwrite this assignment or assign a different screen for a new infotype. (e.g. new country infotype)
One can also create additional text on the add_edit_screen in a separate program add_editprogram. Structure spa_component_info contains all the customising attributes of a salary component.
The edit program and screen must be in a certain format.
It should have a top include with the following declarations:
tables: spack_screen.
data begin of common part hrspa.
data edit_component type spa_package_component.
data pay_frequ like t549r-zeinh.
data spa_emp_info like hrcm_empinfo.
data info_tab like spa_component_info occurs 1 with header line.
data changed_package_tab type spa_package_tab.
data disp_tab type spa_package_tab.
data pool_tab type spa_package_tab.
data end of common part hrspa.
The screen must have a structure as follows:
process before output.
module modify_screen.
module get_screen_fields.
process after input.
chain.
field edit_component-neamt. �all sub screen fields
field��
���.
module calc_component.
endchain.
chain.
field edit_component-neamt. �all subscreen fields
��.
module input_checks on chain-request.
endchain.
Includes for the pbo and pai modules
module modify_screen output.
perform modify_screen in program sapmp16b.
endmodule. " modify_screen OUTPUT
*convert the category string in the edit_component to the specific fields (if string is used)
module get_screen_fields output.
move edit_component-necat(x) to ����
move edit_component-necat+x(y) to ������
�����������
endmodule. " get_screen_fields OUTPUT
*reconvert fields to category string
module calc_component input.
edit_component-necat(x) = �������.
edit_component-necat+x(y) = �������.
������..
perform calculate_component in program sapmp16b.
endmodule. " calc_component INPUT
module input_checks input.
perform input_checks in program SAPMP16B using edit_component
endmodule. " input_checks INPUT
The alternative edit screen could only have text. Any buttons on the edit screen should be assigned the same screen groups as on screen 2300 in program SAPMP16B. This ensures that these buttons are inactive in the approval step of the workflow.
Example
Example for method header_screens_get:
if employee-info-molga = 16.
model_header_program = ALT_SAPMP16B.
model_header_screen = 2000.
endif.
Your alternative program ALT_SAPMP16B would display your text on screen 2000.
Example for method header_screens_get:
if component_info-infty = nnnn.
edit_screen = 2000.
alt_editprogram = ALT_SAPMP16B.
alt_editscrren = 2100.
endif.
Requirements
Standard settings
Recommendation
Activities
To implement a BADI, choose transaction se19, choose a name and the definition HRSPA_SUBSCREENS. Goto interface and double click on the methods to include your coding. For this interface only one class can be active. Activate your implementation. If there is another active class (other implementation) deactivate it and activate your implementation.
See the BADI documentation in se19 under help application help for more info on BADIs.
Further notes
Business Attributes
ASAP Roadmap ID | 257 | Create User Exits |
Mandatory / Optional | 3 | Nonrequired activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | I | Valid for countries specified |
Customizing Attributes | Country Key | Country Name |
---|---|---|
OHAZA_SPBADI01 | AU | Australia |
OHAZA_SPBADI01 | IE | Ireland |
OHAZA_SPBADI01 | NL | Netherlands |
OHAZA_SPBADI01 | ZA | South Africa |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20000911 |
SAP Release Created in | 46C |