SAP BAPIW4W5INFOUSSIMULATECREATION Function Module for Employee W4/W5 Information: Simulate Record Creation
BAPIW4W5INFOUSSIMULATECREATION is a standard bapiw4w5infoussimulatecreation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Employee W4/W5 Information: Simulate Record Creation 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 bapiw4w5infoussimulatecreation FM, simply by entering the name BAPIW4W5INFOUSSIMULATECREATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: PAW4_US
Program Name: SAPLPAW4_US
Main Program: SAPLPAW4_US
Appliation area: P
Release date: 04-May-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPIW4W5INFOUSSIMULATECREATION 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 'BAPIW4W5INFOUSSIMULATECREATION'"Employee W4/W5 Information: Simulate Record Creation.
EXPORTING
EMPLOYEENUMBER = "Personnel number
* EXEMPTIONAMOUNT = "Exemption amount
* ADDEXEMPAMOUNT = "Additional exemption amount
* NOOFPERSEXMPT = "Number of personal exemptions
* NOOFDEPEXMPT = "Number of dependent exemptions
* EICSTATUS = "EIC status
* FORMULANUMBER = "Formula number
* TAXEXMPTINDIC = "Tax exemption indicator
* CURRENCY = 'USD' "Currency key
* NOCOMMIT = "Commit control at BAPI interface
* NRATAX = "Non-resident tax calculation indicator
VALIDITYBEGIN = "Start date
* LNMCH = "Check if last name is Different on SSN Card
* FORMULANUMBER_C = "Formula number
* VALIDITYEND = '99991231' "End date
TAXAUTHORITYTYPE = "Tax authority record type
TAXSTATUS = "Tax status
* NOOFEXEMPTIONS = "Number of exemptions
* ADDTAXAMOUNT = "Additional tax amount
* ADDTAXPERCENT = "Additional tax percentage
* NOOFADDEXEMPT = "Number of additional exemptions
IMPORTING
RETURN = "Return messages
EMPLOYEENUMBER = "Personnel number
SUBTYPE = "Subtype
OBJECTID = "Object ID
LOCKINDICATOR = "Lock indicator
VALIDITYBEGIN = "Start date
VALIDITYEND = "End date
RECORDNUMBER = "Record number
IMPORTING Parameters details for BAPIW4W5INFOUSSIMULATECREATION
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0210-EMPLOYEENOOptional: No
Call by Reference: No ( called with pass by value option)
EXEMPTIONAMOUNT - Exemption amount
Data type: BAPIP0210-EXEMPTIONAMOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDEXEMPAMOUNT - Additional exemption amount
Data type: BAPIP0210-ADDEXEMPAMOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
NOOFPERSEXMPT - Number of personal exemptions
Data type: BAPIP0210-NOOFPERSEXMPTOptional: Yes
Call by Reference: No ( called with pass by value option)
NOOFDEPEXMPT - Number of dependent exemptions
Data type: BAPIP0210-NOOFDEPEXMPTOptional: Yes
Call by Reference: No ( called with pass by value option)
EICSTATUS - EIC status
Data type: BAPIP0210-EICSTATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
FORMULANUMBER - Formula number
Data type: BAPIP0210-FORMULANUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
TAXEXMPTINDIC - Tax exemption indicator
Data type: BAPIP0210-TAXEXMPTINDICOptional: Yes
Call by Reference: No ( called with pass by value option)
CURRENCY - Currency key
Data type: BAPIP0210-CURRENCYDefault: 'USD'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NOCOMMIT - Commit control at BAPI interface
Data type: BAPI_STAND-NO_COMMITOptional: Yes
Call by Reference: No ( called with pass by value option)
NRATAX - Non-resident tax calculation indicator
Data type: BAPIP0210-NRATXOptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Start date
Data type: BAPIP0210-VALIDBEGINOptional: No
Call by Reference: No ( called with pass by value option)
LNMCH - Check if last name is Different on SSN Card
Data type: BAPIP0210-LNMCHOptional: Yes
Call by Reference: No ( called with pass by value option)
FORMULANUMBER_C - Formula number
Data type: BAPIP0210-FORMULANUMBER_COptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYEND - End date
Data type: BAPIP0210-VALIDENDDefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TAXAUTHORITYTYPE - Tax authority record type
Data type: BAPIP0210-TAXAUTHORITYTYPEOptional: No
Call by Reference: No ( called with pass by value option)
TAXSTATUS - Tax status
Data type: BAPIP0210-TAXSTATUSOptional: No
Call by Reference: No ( called with pass by value option)
NOOFEXEMPTIONS - Number of exemptions
Data type: BAPIP0210-NOOFEXEMPTIONSOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDTAXAMOUNT - Additional tax amount
Data type: BAPIP0210-ADDTAXAMOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDTAXPERCENT - Additional tax percentage
Data type: BAPIP0210-ADDTAXPERCENTOptional: Yes
Call by Reference: No ( called with pass by value option)
NOOFADDEXEMPT - Number of additional exemptions
Data type: BAPIP0210-NOOFADDEXEMPTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPIW4W5INFOUSSIMULATECREATION
RETURN - Return messages
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0210-EMPLOYEENOOptional: No
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0210-SUBTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID - Object ID
Data type: BAPIP0210-OBJECTIDOptional: No
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator
Data type: BAPIP0210-LOCKINDICOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Start date
Data type: BAPIP0210-VALIDBEGINOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - End date
Data type: BAPIP0210-VALIDENDOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Record number
Data type: BAPIP0210-RECORDNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPIW4W5INFOUSSIMULATECREATION 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_return | TYPE BAPIRETURN1, " | |||
| lv_employeenumber | TYPE BAPIP0210-EMPLOYEENO, " | |||
| lv_exemptionamount | TYPE BAPIP0210-EXEMPTIONAMOUNT, " | |||
| lv_addexempamount | TYPE BAPIP0210-ADDEXEMPAMOUNT, " | |||
| lv_noofpersexmpt | TYPE BAPIP0210-NOOFPERSEXMPT, " | |||
| lv_noofdepexmpt | TYPE BAPIP0210-NOOFDEPEXMPT, " | |||
| lv_eicstatus | TYPE BAPIP0210-EICSTATUS, " | |||
| lv_formulanumber | TYPE BAPIP0210-FORMULANUMBER, " | |||
| lv_taxexmptindic | TYPE BAPIP0210-TAXEXMPTINDIC, " | |||
| lv_currency | TYPE BAPIP0210-CURRENCY, " 'USD' | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_nratax | TYPE BAPIP0210-NRATX, " | |||
| lv_validitybegin | TYPE BAPIP0210-VALIDBEGIN, " | |||
| lv_employeenumber | TYPE BAPIP0210-EMPLOYEENO, " | |||
| lv_lnmch | TYPE BAPIP0210-LNMCH, " | |||
| lv_formulanumber_c | TYPE BAPIP0210-FORMULANUMBER_C, " | |||
| lv_subtype | TYPE BAPIP0210-SUBTYPE, " | |||
| lv_validityend | TYPE BAPIP0210-VALIDEND, " '99991231' | |||
| lv_objectid | TYPE BAPIP0210-OBJECTID, " | |||
| lv_taxauthoritytype | TYPE BAPIP0210-TAXAUTHORITYTYPE, " | |||
| lv_taxstatus | TYPE BAPIP0210-TAXSTATUS, " | |||
| lv_lockindicator | TYPE BAPIP0210-LOCKINDIC, " | |||
| lv_validitybegin | TYPE BAPIP0210-VALIDBEGIN, " | |||
| lv_noofexemptions | TYPE BAPIP0210-NOOFEXEMPTIONS, " | |||
| lv_validityend | TYPE BAPIP0210-VALIDEND, " | |||
| lv_addtaxamount | TYPE BAPIP0210-ADDTAXAMOUNT, " | |||
| lv_recordnumber | TYPE BAPIP0210-RECORDNR, " | |||
| lv_addtaxpercent | TYPE BAPIP0210-ADDTAXPERCENT, " | |||
| lv_noofaddexempt | TYPE BAPIP0210-NOOFADDEXEMPT. " |
|   CALL FUNCTION 'BAPIW4W5INFOUSSIMULATECREATION' "Employee W4/W5 Information: Simulate Record Creation |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| EXEMPTIONAMOUNT | = lv_exemptionamount | |
| ADDEXEMPAMOUNT | = lv_addexempamount | |
| NOOFPERSEXMPT | = lv_noofpersexmpt | |
| NOOFDEPEXMPT | = lv_noofdepexmpt | |
| EICSTATUS | = lv_eicstatus | |
| FORMULANUMBER | = lv_formulanumber | |
| TAXEXMPTINDIC | = lv_taxexmptindic | |
| CURRENCY | = lv_currency | |
| NOCOMMIT | = lv_nocommit | |
| NRATAX | = lv_nratax | |
| VALIDITYBEGIN | = lv_validitybegin | |
| LNMCH | = lv_lnmch | |
| FORMULANUMBER_C | = lv_formulanumber_c | |
| VALIDITYEND | = lv_validityend | |
| TAXAUTHORITYTYPE | = lv_taxauthoritytype | |
| TAXSTATUS | = lv_taxstatus | |
| NOOFEXEMPTIONS | = lv_noofexemptions | |
| ADDTAXAMOUNT | = lv_addtaxamount | |
| ADDTAXPERCENT | = lv_addtaxpercent | |
| NOOFADDEXEMPT | = lv_noofaddexempt | |
| IMPORTING | ||
| RETURN | = lv_return | |
| EMPLOYEENUMBER | = lv_employeenumber | |
| SUBTYPE | = lv_subtype | |
| OBJECTID | = lv_objectid | |
| LOCKINDICATOR | = lv_lockindicator | |
| VALIDITYBEGIN | = lv_validitybegin | |
| VALIDITYEND | = lv_validityend | |
| RECORDNUMBER | = lv_recordnumber | |
| . " BAPIW4W5INFOUSSIMULATECREATION | ||
ABAP code using 7.40 inline data declarations to call FM BAPIW4W5INFOUSSIMULATECREATION
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 EMPLOYEENO FROM BAPIP0210 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single EXEMPTIONAMOUNT FROM BAPIP0210 INTO @DATA(ld_exemptionamount). | ||||
| "SELECT single ADDEXEMPAMOUNT FROM BAPIP0210 INTO @DATA(ld_addexempamount). | ||||
| "SELECT single NOOFPERSEXMPT FROM BAPIP0210 INTO @DATA(ld_noofpersexmpt). | ||||
| "SELECT single NOOFDEPEXMPT FROM BAPIP0210 INTO @DATA(ld_noofdepexmpt). | ||||
| "SELECT single EICSTATUS FROM BAPIP0210 INTO @DATA(ld_eicstatus). | ||||
| "SELECT single FORMULANUMBER FROM BAPIP0210 INTO @DATA(ld_formulanumber). | ||||
| "SELECT single TAXEXMPTINDIC FROM BAPIP0210 INTO @DATA(ld_taxexmptindic). | ||||
| "SELECT single CURRENCY FROM BAPIP0210 INTO @DATA(ld_currency). | ||||
| DATA(ld_currency) | = 'USD'. | |||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single NRATX FROM BAPIP0210 INTO @DATA(ld_nratax). | ||||
| "SELECT single VALIDBEGIN FROM BAPIP0210 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single EMPLOYEENO FROM BAPIP0210 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single LNMCH FROM BAPIP0210 INTO @DATA(ld_lnmch). | ||||
| "SELECT single FORMULANUMBER_C FROM BAPIP0210 INTO @DATA(ld_formulanumber_c). | ||||
| "SELECT single SUBTYPE FROM BAPIP0210 INTO @DATA(ld_subtype). | ||||
| "SELECT single VALIDEND FROM BAPIP0210 INTO @DATA(ld_validityend). | ||||
| DATA(ld_validityend) | = '99991231'. | |||
| "SELECT single OBJECTID FROM BAPIP0210 INTO @DATA(ld_objectid). | ||||
| "SELECT single TAXAUTHORITYTYPE FROM BAPIP0210 INTO @DATA(ld_taxauthoritytype). | ||||
| "SELECT single TAXSTATUS FROM BAPIP0210 INTO @DATA(ld_taxstatus). | ||||
| "SELECT single LOCKINDIC FROM BAPIP0210 INTO @DATA(ld_lockindicator). | ||||
| "SELECT single VALIDBEGIN FROM BAPIP0210 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single NOOFEXEMPTIONS FROM BAPIP0210 INTO @DATA(ld_noofexemptions). | ||||
| "SELECT single VALIDEND FROM BAPIP0210 INTO @DATA(ld_validityend). | ||||
| "SELECT single ADDTAXAMOUNT FROM BAPIP0210 INTO @DATA(ld_addtaxamount). | ||||
| "SELECT single RECORDNR FROM BAPIP0210 INTO @DATA(ld_recordnumber). | ||||
| "SELECT single ADDTAXPERCENT FROM BAPIP0210 INTO @DATA(ld_addtaxpercent). | ||||
| "SELECT single NOOFADDEXEMPT FROM BAPIP0210 INTO @DATA(ld_noofaddexempt). | ||||
Search for further information about these or an SAP related objects