WFCSMDST_FCAST_WERKS_CREATE_M is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name WFCSMDST_FCAST_WERKS_CREATE_M into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
WFCSMDST
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'WFCSMDST_FCAST_WERKS_CREATE_M' "Create Forecast per Plant (RFC Function Module)
EXPORTING
pi_werks = " t001w-werks Plant
* pi_packetsize = 300 " wrpacketsize Package Size
* pi_pl_date = SY-DATUM " wfcs_date Date
* pi_simulation = ' ' " wfcs_boolean Flag:Simulation (kein COMMIT)
* pi_runtime_meas_profile = '0' " wfcs_runtime_profile Validity Period: Detail Level
* pi_bapiret2_get = ' ' " wfcs_boolean Flag: Fehlerprotokoll erstellen
* pi_short_fcast_msg = ' ' " wfcs_boolean Flag:Prognosemeldung als BAPIRET2
* TABLES
* ti_sel_matnr = " wfcs_sel_matnr Selection Range for Material
* ti_sel_date = " wfcs_sel_date Selektionsranges für letztes Prognosedatum PROP-PRDAT
* ti_sel_perkz = " wfcs_sel_perkz Selection Range for Period Indicator
* ti_sel_periv = " wfcs_sel_periv Selection Range for Posting Periods
* ti_sel_prmod = " wfcs_sel_prmod Selection Range for Forecast Model
* ti_sel_matkl = " wfcs_sel_matkl Selection Range for Material Group
* te_bapiret2 = " bapiret2 Error Log
* te_runtime_info = " wfcs_runtime_info Ergebnis Laufzeitmessung
EXCEPTIONS
NO_AUTHORIZATION = 1 " Fehlende Berechtigung zur Prognosedurchführung
. " WFCSMDST_FCAST_WERKS_CREATE_M
The ABAP code below is a full code listing to execute function module WFCSMDST_FCAST_WERKS_CREATE_M including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_ti_sel_matnr | TYPE STANDARD TABLE OF WFCS_SEL_MATNR,"TABLES PARAM |
| wa_ti_sel_matnr | LIKE LINE OF it_ti_sel_matnr , |
| it_ti_sel_date | TYPE STANDARD TABLE OF WFCS_SEL_DATE,"TABLES PARAM |
| wa_ti_sel_date | LIKE LINE OF it_ti_sel_date , |
| it_ti_sel_perkz | TYPE STANDARD TABLE OF WFCS_SEL_PERKZ,"TABLES PARAM |
| wa_ti_sel_perkz | LIKE LINE OF it_ti_sel_perkz , |
| it_ti_sel_periv | TYPE STANDARD TABLE OF WFCS_SEL_PERIV,"TABLES PARAM |
| wa_ti_sel_periv | LIKE LINE OF it_ti_sel_periv , |
| it_ti_sel_prmod | TYPE STANDARD TABLE OF WFCS_SEL_PRMOD,"TABLES PARAM |
| wa_ti_sel_prmod | LIKE LINE OF it_ti_sel_prmod , |
| it_ti_sel_matkl | TYPE STANDARD TABLE OF WFCS_SEL_MATKL,"TABLES PARAM |
| wa_ti_sel_matkl | LIKE LINE OF it_ti_sel_matkl , |
| it_te_bapiret2 | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_te_bapiret2 | LIKE LINE OF it_te_bapiret2 , |
| it_te_runtime_info | TYPE STANDARD TABLE OF WFCS_RUNTIME_INFO,"TABLES PARAM |
| wa_te_runtime_info | LIKE LINE OF it_te_runtime_info . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_pi_werks | TYPE T001W-WERKS , |
| it_ti_sel_matnr | TYPE STANDARD TABLE OF WFCS_SEL_MATNR , |
| wa_ti_sel_matnr | LIKE LINE OF it_ti_sel_matnr, |
| ld_pi_packetsize | TYPE WRPACKETSIZE , |
| it_ti_sel_date | TYPE STANDARD TABLE OF WFCS_SEL_DATE , |
| wa_ti_sel_date | LIKE LINE OF it_ti_sel_date, |
| ld_pi_pl_date | TYPE WFCS_DATE , |
| it_ti_sel_perkz | TYPE STANDARD TABLE OF WFCS_SEL_PERKZ , |
| wa_ti_sel_perkz | LIKE LINE OF it_ti_sel_perkz, |
| ld_pi_simulation | TYPE WFCS_BOOLEAN , |
| it_ti_sel_periv | TYPE STANDARD TABLE OF WFCS_SEL_PERIV , |
| wa_ti_sel_periv | LIKE LINE OF it_ti_sel_periv, |
| ld_pi_runtime_meas_profile | TYPE WFCS_RUNTIME_PROFILE , |
| it_ti_sel_prmod | TYPE STANDARD TABLE OF WFCS_SEL_PRMOD , |
| wa_ti_sel_prmod | LIKE LINE OF it_ti_sel_prmod, |
| ld_pi_bapiret2_get | TYPE WFCS_BOOLEAN , |
| it_ti_sel_matkl | TYPE STANDARD TABLE OF WFCS_SEL_MATKL , |
| wa_ti_sel_matkl | LIKE LINE OF it_ti_sel_matkl, |
| ld_pi_short_fcast_msg | TYPE WFCS_BOOLEAN , |
| it_te_bapiret2 | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_te_bapiret2 | LIKE LINE OF it_te_bapiret2, |
| it_te_runtime_info | TYPE STANDARD TABLE OF WFCS_RUNTIME_INFO , |
| wa_te_runtime_info | LIKE LINE OF it_te_runtime_info. |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name WFCSMDST_FCAST_WERKS_CREATE_M or its description.
WFCSMDST_FCAST_WERKS_CREATE_M - Create Forecast per Plant (RFC Function Module) WFCSMDST_FCAST_PREPARE_M - Read Master Data/Movement Data and Configure Time Buffer Settings WFCSMDST_FCAST_POST_M - Update Results of Forecast Run WFCSMDST_FCAST_M - Run Complete Standard Forecast WFCSMDST_FCAST_DISPLAY_M - Display Forecast Results in Simulation Run WFCSMDST_FCAST_CREATE_M - Create Forecast and Format Result