SAP TEST_WFM_PAYROLL_CALC Function Module for TEST_WFM_PAYROLL_CALC
TEST_WFM_PAYROLL_CALC is a standard test wfm payroll calc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for TEST_WFM_PAYROLL_CALC processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for test wfm payroll calc FM, simply by entering the name TEST_WFM_PAYROLL_CALC into the relevant SAP transaction such as SE37 or SE38.
Function Group: CRM_WFM_SCHED_STAT
Program Name: SAPLCRM_WFM_SCHED_STAT
Main Program: SAPLCRM_WFM_SCHED_STAT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TEST_WFM_PAYROLL_CALC pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'TEST_WFM_PAYROLL_CALC'"TEST_WFM_PAYROLL_CALC.
EXPORTING
IV_ORG_OBJID = "Object ID
IV_WEEK_OF = "Start Date
IV_PARTNER = "Business Partner Number
IMPORTING
ET_SEGS = "Shift Segment Table Type
ET_SHIFTS = "Shift Table Type
ET_SPLIT_SEGS = "Shift Segment Table Type
ET_BENEFIT_DAYS = "Table of Benefit Hours and Pay (by Day)
IMPORTING Parameters details for TEST_WFM_PAYROLL_CALC
IV_ORG_OBJID - Object ID
Data type: HROBJIDOptional: No
Call by Reference: Yes
IV_WEEK_OF - Start Date
Data type: BEGDATUMOptional: No
Call by Reference: Yes
IV_PARTNER - Business Partner Number
Data type: BU_PARTNEROptional: No
Call by Reference: Yes
EXPORTING Parameters details for TEST_WFM_PAYROLL_CALC
ET_SEGS - Shift Segment Table Type
Data type: WFMCAST_SHIFT_SEGMENTOptional: No
Call by Reference: Yes
ET_SHIFTS - Shift Table Type
Data type: WFMCAST_SHIFTOptional: No
Call by Reference: Yes
ET_SPLIT_SEGS - Shift Segment Table Type
Data type: WFMCAST_SHIFT_SEGMENTOptional: No
Call by Reference: Yes
ET_BENEFIT_DAYS - Table of Benefit Hours and Pay (by Day)
Data type: WFMCAST_PAID_BENEFIT_DAYOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for TEST_WFM_PAYROLL_CALC Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_et_segs | TYPE WFMCAST_SHIFT_SEGMENT, " | |||
| lv_iv_org_objid | TYPE HROBJID, " | |||
| lv_et_shifts | TYPE WFMCAST_SHIFT, " | |||
| lv_iv_week_of | TYPE BEGDATUM, " | |||
| lv_iv_partner | TYPE BU_PARTNER, " | |||
| lv_et_split_segs | TYPE WFMCAST_SHIFT_SEGMENT, " | |||
| lv_et_benefit_days | TYPE WFMCAST_PAID_BENEFIT_DAY. " |
|   CALL FUNCTION 'TEST_WFM_PAYROLL_CALC' "TEST_WFM_PAYROLL_CALC |
| EXPORTING | ||
| IV_ORG_OBJID | = lv_iv_org_objid | |
| IV_WEEK_OF | = lv_iv_week_of | |
| IV_PARTNER | = lv_iv_partner | |
| IMPORTING | ||
| ET_SEGS | = lv_et_segs | |
| ET_SHIFTS | = lv_et_shifts | |
| ET_SPLIT_SEGS | = lv_et_split_segs | |
| ET_BENEFIT_DAYS | = lv_et_benefit_days | |
| . " TEST_WFM_PAYROLL_CALC | ||
ABAP code using 7.40 inline data declarations to call FM TEST_WFM_PAYROLL_CALC
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects