SAP PAYROLL_TAX_CALC_US_40 Function Module for Payroll tax calculation for the United States









PAYROLL_TAX_CALC_US_40 is a standard payroll tax calc us 40 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Payroll tax calculation for the United States 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 payroll tax calc us 40 FM, simply by entering the name PAYROLL_TAX_CALC_US_40 into the relevant SAP transaction such as SE37 or SE38.

Function Group: PBSI
Program Name: SAPLPBSI
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function PAYROLL_TAX_CALC_US_40 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 'PAYROLL_TAX_CALC_US_40'"Payroll tax calculation for the United States
EXPORTING
* CALC_OR_GROSSUP = 'C' "
INPUT_STRUCTURE = "

IMPORTING
OUTPUT_STRUCTURE = "

TABLES
TABLE_STRUCTURE = "

EXCEPTIONS
COMMUNICATION_FAILURE = 1 SYSTEM_FAILURE = 2 TEST_AUSNAHME = 3
.



IMPORTING Parameters details for PAYROLL_TAX_CALC_US_40

CALC_OR_GROSSUP -

Data type: PBSI_MISC-CHAR1
Default: 'C'
Optional: Yes
Call by Reference: No ( called with pass by value option)

INPUT_STRUCTURE -

Data type: PBSI_10
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for PAYROLL_TAX_CALC_US_40

OUTPUT_STRUCTURE -

Data type: PBSI_20
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for PAYROLL_TAX_CALC_US_40

TABLE_STRUCTURE -

Data type: PBSI_00
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

COMMUNICATION_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SYSTEM_FAILURE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TEST_AUSNAHME -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for PAYROLL_TAX_CALC_US_40 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_calc_or_grossup  TYPE PBSI_MISC-CHAR1, "   'C'
lt_table_structure  TYPE STANDARD TABLE OF PBSI_00, "   
lv_output_structure  TYPE PBSI_20, "   
lv_communication_failure  TYPE PBSI_20, "   
lv_system_failure  TYPE PBSI_20, "   
lv_input_structure  TYPE PBSI_10, "   
lv_test_ausnahme  TYPE PBSI_10. "   

  CALL FUNCTION 'PAYROLL_TAX_CALC_US_40'  "Payroll tax calculation for the United States
    EXPORTING
         CALC_OR_GROSSUP = lv_calc_or_grossup
         INPUT_STRUCTURE = lv_input_structure
    IMPORTING
         OUTPUT_STRUCTURE = lv_output_structure
    TABLES
         TABLE_STRUCTURE = lt_table_structure
    EXCEPTIONS
        COMMUNICATION_FAILURE = 1
        SYSTEM_FAILURE = 2
        TEST_AUSNAHME = 3
. " PAYROLL_TAX_CALC_US_40




ABAP code using 7.40 inline data declarations to call FM PAYROLL_TAX_CALC_US_40

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.

"SELECT single CHAR1 FROM PBSI_MISC INTO @DATA(ld_calc_or_grossup).
DATA(ld_calc_or_grossup) = 'C'.
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!