SAP ISW_COMPUTE_DATE Function Module for Calculates Order Date Based on Service Frequency
ISW_COMPUTE_DATE is a standard isw compute date SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Calculates Order Date Based on Service Frequency 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 isw compute date FM, simply by entering the name ISW_COMPUTE_DATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EEWA_ORDER_INT
Program Name: SAPLEEWA_ORDER_INT
Main Program: SAPLEEWA_ORDER_INT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISW_COMPUTE_DATE 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 'ISW_COMPUTE_DATE'"Calculates Order Date Based on Service Frequency.
EXPORTING
* X_FROM = "Date and Time, Current (Application Server) Date
* X_TO = "Date and Time, Current (Application Server) Date
* X_DAY = "Indicator
* X_MNTH = "Indicator
* X_WEEK = "Indicator
* X_SMORDER = "Table Type for Container Movements
* X_NO_CALID = "
* X_SIMULATION = "Simulation Indicator
* X_WDO_BPEM = "BPEM Waste Disposal Order
IMPORTING
Y_ORDERPREP = "Structure of Waste Disposal Order Dates
CHANGING
* XY_OBJ = "Operative Data Structure of Waste Disposal Order
* XY_BULK_ORDER = "Transfer Structure for Data on Bulk Refuse Order
TABLES
* XT_SERVFREQ = "Generated Table for View &
* XT_HEWAOBJH = "Service Frequency (History for EWAOBJ)
* YT_ORDERPREP = "Structure of Waste Disposal Order Dates
* YT_ALV = "Structure for Field Catalog of Service Frequency
* YT_BULK_GOODS = "IS-U Waste: Bulk Refuse Order Data
EXCEPTIONS
GENERAL_FAULT = 1 NOT_FOUND = 2 NOT_QUALIFIED = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLEEWA_ORDER_INT_001 Calculate Planned Values for Waste Disposal Order
EXIT_SAPLEEWA_ORDER_INT_002 Supplying Header Data of Waste Disposal Order with Customer Data
EXIT_SAPLEEWA_ORDER_INT_003 Supplying Item Data of Waste Disposal Order with Customer Data
EXIT_SAPLEEWA_ORDER_INT_004 Enter all Data for Structure IVB_W for Extrapolation of Waste Disp. Orders
IMPORTING Parameters details for ISW_COMPUTE_DATE
X_FROM - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
X_TO - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
X_DAY - Indicator
Data type: REGEN-KENNZXOptional: Yes
Call by Reference: No ( called with pass by value option)
X_MNTH - Indicator
Data type: REGEN-KENNZXOptional: Yes
Call by Reference: No ( called with pass by value option)
X_WEEK - Indicator
Data type: REGEN-KENNZXOptional: Yes
Call by Reference: No ( called with pass by value option)
X_SMORDER - Table Type for Container Movements
Data type: T_ISUWA_SORDEROptional: Yes
Call by Reference: No ( called with pass by value option)
X_NO_CALID -
Data type: KENNZXOptional: Yes
Call by Reference: No ( called with pass by value option)
X_SIMULATION - Simulation Indicator
Data type: KENNZXOptional: Yes
Call by Reference: No ( called with pass by value option)
X_WDO_BPEM - BPEM Waste Disposal Order
Data type: CL_ISU_WA_ORDER_BPEMOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ISW_COMPUTE_DATE
Y_ORDERPREP - Structure of Waste Disposal Order Dates
Data type: ISU_ORDER_DATESOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for ISW_COMPUTE_DATE
XY_OBJ - Operative Data Structure of Waste Disposal Order
Data type: ISUWA_ORDEROptional: Yes
Call by Reference: Yes
XY_BULK_ORDER - Transfer Structure for Data on Bulk Refuse Order
Data type: ISUWA_BULK_ORDEROptional: Yes
Call by Reference: Yes
TABLES Parameters details for ISW_COMPUTE_DATE
XT_SERVFREQ - Generated Table for View &
Data type: V_EWAOBJOptional: Yes
Call by Reference: Yes
XT_HEWAOBJH - Service Frequency (History for EWAOBJ)
Data type: EWAOBJHOptional: Yes
Call by Reference: Yes
YT_ORDERPREP - Structure of Waste Disposal Order Dates
Data type: ISU_ORDER_DATESOptional: Yes
Call by Reference: Yes
YT_ALV - Structure for Field Catalog of Service Frequency
Data type: ISU_ROBJ_DATES_ALVOptional: Yes
Call by Reference: Yes
YT_BULK_GOODS - IS-U Waste: Bulk Refuse Order Data
Data type: EEWA_BULKY_DATAOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
GENERAL_FAULT -
Data type:Optional: No
Call by Reference: Yes
NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
NOT_QUALIFIED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ISW_COMPUTE_DATE 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_xy_obj | TYPE ISUWA_ORDER, " | |||
| lv_x_from | TYPE SY-DATUM, " | |||
| lt_xt_servfreq | TYPE STANDARD TABLE OF V_EWAOBJ, " | |||
| lv_y_orderprep | TYPE ISU_ORDER_DATES, " | |||
| lv_general_fault | TYPE ISU_ORDER_DATES, " | |||
| lv_x_to | TYPE SY-DATUM, " | |||
| lv_not_found | TYPE SY, " | |||
| lt_xt_hewaobjh | TYPE STANDARD TABLE OF EWAOBJH, " | |||
| lv_xy_bulk_order | TYPE ISUWA_BULK_ORDER, " | |||
| lv_x_day | TYPE REGEN-KENNZX, " | |||
| lt_yt_orderprep | TYPE STANDARD TABLE OF ISU_ORDER_DATES, " | |||
| lv_not_qualified | TYPE ISU_ORDER_DATES, " | |||
| lv_x_mnth | TYPE REGEN-KENNZX, " | |||
| lt_yt_alv | TYPE STANDARD TABLE OF ISU_ROBJ_DATES_ALV, " | |||
| lv_x_week | TYPE REGEN-KENNZX, " | |||
| lt_yt_bulk_goods | TYPE STANDARD TABLE OF EEWA_BULKY_DATA, " | |||
| lv_x_smorder | TYPE T_ISUWA_SORDER, " | |||
| lv_x_no_calid | TYPE KENNZX, " | |||
| lv_x_simulation | TYPE KENNZX, " | |||
| lv_x_wdo_bpem | TYPE CL_ISU_WA_ORDER_BPEM. " |
|   CALL FUNCTION 'ISW_COMPUTE_DATE' "Calculates Order Date Based on Service Frequency |
| EXPORTING | ||
| X_FROM | = lv_x_from | |
| X_TO | = lv_x_to | |
| X_DAY | = lv_x_day | |
| X_MNTH | = lv_x_mnth | |
| X_WEEK | = lv_x_week | |
| X_SMORDER | = lv_x_smorder | |
| X_NO_CALID | = lv_x_no_calid | |
| X_SIMULATION | = lv_x_simulation | |
| X_WDO_BPEM | = lv_x_wdo_bpem | |
| IMPORTING | ||
| Y_ORDERPREP | = lv_y_orderprep | |
| CHANGING | ||
| XY_OBJ | = lv_xy_obj | |
| XY_BULK_ORDER | = lv_xy_bulk_order | |
| TABLES | ||
| XT_SERVFREQ | = lt_xt_servfreq | |
| XT_HEWAOBJH | = lt_xt_hewaobjh | |
| YT_ORDERPREP | = lt_yt_orderprep | |
| YT_ALV | = lt_yt_alt | |
| YT_BULK_GOODS | = lt_yt_bulk_goods | |
| EXCEPTIONS | ||
| GENERAL_FAULT = 1 | ||
| NOT_FOUND = 2 | ||
| NOT_QUALIFIED = 3 | ||
| . " ISW_COMPUTE_DATE | ||
ABAP code using 7.40 inline data declarations to call FM ISW_COMPUTE_DATE
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 DATUM FROM SY INTO @DATA(ld_x_from). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_x_to). | ||||
| "SELECT single KENNZX FROM REGEN INTO @DATA(ld_x_day). | ||||
| "SELECT single KENNZX FROM REGEN INTO @DATA(ld_x_mnth). | ||||
| "SELECT single KENNZX FROM REGEN INTO @DATA(ld_x_week). | ||||
Search for further information about these or an SAP related objects