SAP IWP2_MCP_CALC_TIME_BASED_CYCLE Function Module for NOTRANSL: Mehrfachzählerplan: Terminieren Zeitzyklus
IWP2_MCP_CALC_TIME_BASED_CYCLE is a standard iwp2 mcp calc time based cycle SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Mehrfachzählerplan: Terminieren Zeitzyklus 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 iwp2 mcp calc time based cycle FM, simply by entering the name IWP2_MCP_CALC_TIME_BASED_CYCLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: IWP2
Program Name: SAPLIWP2
Main Program: SAPLIWP2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function IWP2_MCP_CALC_TIME_BASED_CYCLE 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 'IWP2_MCP_CALC_TIME_BASED_CYCLE'"NOTRANSL: Mehrfachzählerplan: Terminieren Zeitzyklus.
EXPORTING
IS_MPLA = "
IS_MHIS = "
IV_NEXT_ABNUM = "Maintenance Plan Call Number
IV_PREVIOUS_ABNUM = "Maintenance Plan Call Number
IV_TERMA = "Preventive Maintenance I/O Table
IV_IND_OFFSET = "Checkbox
IV_START_DATE = "Date and Time, Current (Application Server) Date
IV_START_TIME = "Date and time, local time for user
IT_MHIS = "
IT_MHIO = "
IMPORTING
EV_NPLDA = "Next planned date
EV_NZAEH = "Next Planned Counter Reading
EV_USERMOD = "Checkbox
EV_ADNZAEH = "Next Planned Counter Reading
CHANGING
CS_MMPT = "
IMPORTING Parameters details for IWP2_MCP_CALC_TIME_BASED_CYCLE
IS_MPLA -
Data type: WC_WMPLAOptional: No
Call by Reference: Yes
IS_MHIS -
Data type: WC_WMHISOptional: No
Call by Reference: Yes
IV_NEXT_ABNUM - Maintenance Plan Call Number
Data type: MPLA-ABNUMOptional: No
Call by Reference: Yes
IV_PREVIOUS_ABNUM - Maintenance Plan Call Number
Data type: MPLA-ABNUMOptional: No
Call by Reference: Yes
IV_TERMA - Preventive Maintenance I/O Table
Data type: MHIS-TERMAOptional: No
Call by Reference: Yes
IV_IND_OFFSET - Checkbox
Data type: XFELDOptional: No
Call by Reference: Yes
IV_START_DATE - Date and Time, Current (Application Server) Date
Data type: SY-DATUMOptional: No
Call by Reference: Yes
IV_START_TIME - Date and time, local time for user
Data type: SY-TIMLOOptional: No
Call by Reference: Yes
IT_MHIS -
Data type: WC_T_WMHISOptional: No
Call by Reference: Yes
IT_MHIO -
Data type: WC_T_WMHIOOptional: No
Call by Reference: Yes
EXPORTING Parameters details for IWP2_MCP_CALC_TIME_BASED_CYCLE
EV_NPLDA - Next planned date
Data type: MHIS-NPLDAOptional: No
Call by Reference: Yes
EV_NZAEH - Next Planned Counter Reading
Data type: MHIS-NZAEHOptional: No
Call by Reference: Yes
EV_USERMOD - Checkbox
Data type: XFELDOptional: No
Call by Reference: Yes
EV_ADNZAEH - Next Planned Counter Reading
Data type: MHIS-ADNZAEHOptional: No
Call by Reference: Yes
CHANGING Parameters details for IWP2_MCP_CALC_TIME_BASED_CYCLE
CS_MMPT -
Data type: WC_WMMPTOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for IWP2_MCP_CALC_TIME_BASED_CYCLE 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_cs_mmpt | TYPE WC_WMMPT, " | |||
| lv_is_mpla | TYPE WC_WMPLA, " | |||
| lv_ev_nplda | TYPE MHIS-NPLDA, " | |||
| lv_is_mhis | TYPE WC_WMHIS, " | |||
| lv_ev_nzaeh | TYPE MHIS-NZAEH, " | |||
| lv_iv_next_abnum | TYPE MPLA-ABNUM, " | |||
| lv_ev_usermod | TYPE XFELD, " | |||
| lv_iv_previous_abnum | TYPE MPLA-ABNUM, " | |||
| lv_iv_terma | TYPE MHIS-TERMA, " | |||
| lv_ev_adnzaeh | TYPE MHIS-ADNZAEH, " | |||
| lv_iv_ind_offset | TYPE XFELD, " | |||
| lv_iv_start_date | TYPE SY-DATUM, " | |||
| lv_iv_start_time | TYPE SY-TIMLO, " | |||
| lv_it_mhis | TYPE WC_T_WMHIS, " | |||
| lv_it_mhio | TYPE WC_T_WMHIO. " |
|   CALL FUNCTION 'IWP2_MCP_CALC_TIME_BASED_CYCLE' "NOTRANSL: Mehrfachzählerplan: Terminieren Zeitzyklus |
| EXPORTING | ||
| IS_MPLA | = lv_is_mpla | |
| IS_MHIS | = lv_is_mhis | |
| IV_NEXT_ABNUM | = lv_iv_next_abnum | |
| IV_PREVIOUS_ABNUM | = lv_iv_previous_abnum | |
| IV_TERMA | = lv_iv_terma | |
| IV_IND_OFFSET | = lv_iv_ind_offset | |
| IV_START_DATE | = lv_iv_start_date | |
| IV_START_TIME | = lv_iv_start_time | |
| IT_MHIS | = lv_it_mhis | |
| IT_MHIO | = lv_it_mhio | |
| IMPORTING | ||
| EV_NPLDA | = lv_ev_nplda | |
| EV_NZAEH | = lv_ev_nzaeh | |
| EV_USERMOD | = lv_ev_usermod | |
| EV_ADNZAEH | = lv_ev_adnzaeh | |
| CHANGING | ||
| CS_MMPT | = lv_cs_mmpt | |
| . " IWP2_MCP_CALC_TIME_BASED_CYCLE | ||
ABAP code using 7.40 inline data declarations to call FM IWP2_MCP_CALC_TIME_BASED_CYCLE
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 NPLDA FROM MHIS INTO @DATA(ld_ev_nplda). | ||||
| "SELECT single NZAEH FROM MHIS INTO @DATA(ld_ev_nzaeh). | ||||
| "SELECT single ABNUM FROM MPLA INTO @DATA(ld_iv_next_abnum). | ||||
| "SELECT single ABNUM FROM MPLA INTO @DATA(ld_iv_previous_abnum). | ||||
| "SELECT single TERMA FROM MHIS INTO @DATA(ld_iv_terma). | ||||
| "SELECT single ADNZAEH FROM MHIS INTO @DATA(ld_ev_adnzaeh). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_iv_start_date). | ||||
| "SELECT single TIMLO FROM SY INTO @DATA(ld_iv_start_time). | ||||
Search for further information about these or an SAP related objects