SAP CNFW_UPDATE_CURRENTFC_RFC Function Module for Update current forecast data
CNFW_UPDATE_CURRENTFC_RFC is a standard cnfw update currentfc rfc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update current forecast data 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 cnfw update currentfc rfc FM, simply by entering the name CNFW_UPDATE_CURRENTFC_RFC into the relevant SAP transaction such as SE37 or SE38.
Function Group: CNFW
Program Name: SAPLCNFW
Main Program: SAPLCNFW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CNFW_UPDATE_CURRENTFC_RFC 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 'CNFW_UPDATE_CURRENTFC_RFC'"Update current forecast data.
EXPORTING
I_CURRENT_VERSION = "Version
I_KOKRS = "Controlling Area
I_PERIOD = "Planning period
I_YEAR = "Fiscal Year
* I_PLAN_WBS_VERSION = "Version
* I_PLAN_NW_VERSION = "Version
TABLES
T_FORECAST_DIS = "Display Forecast Work Bench
* T_RETURN = "Return Parameter
IMPORTING Parameters details for CNFW_UPDATE_CURRENTFC_RFC
I_CURRENT_VERSION - Version
Data type: TKA09-VERSNOptional: No
Call by Reference: No ( called with pass by value option)
I_KOKRS - Controlling Area
Data type: TKA01-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_PERIOD - Planning period
Data type: COSS-PERBLOptional: No
Call by Reference: No ( called with pass by value option)
I_YEAR - Fiscal Year
Data type: COSS-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_PLAN_WBS_VERSION - Version
Data type: TKA09-VERSNOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PLAN_NW_VERSION - Version
Data type: TKA09-VERSNOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CNFW_UPDATE_CURRENTFC_RFC
T_FORECAST_DIS - Display Forecast Work Bench
Data type: CNFW_DISPLAY_STOptional: No
Call by Reference: Yes
T_RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CNFW_UPDATE_CURRENTFC_RFC 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: | ||||
| lt_t_forecast_dis | TYPE STANDARD TABLE OF CNFW_DISPLAY_ST, " | |||
| lv_i_current_version | TYPE TKA09-VERSN, " | |||
| lv_i_kokrs | TYPE TKA01-KOKRS, " | |||
| lt_t_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_i_period | TYPE COSS-PERBL, " | |||
| lv_i_year | TYPE COSS-GJAHR, " | |||
| lv_i_plan_wbs_version | TYPE TKA09-VERSN, " | |||
| lv_i_plan_nw_version | TYPE TKA09-VERSN. " |
|   CALL FUNCTION 'CNFW_UPDATE_CURRENTFC_RFC' "Update current forecast data |
| EXPORTING | ||
| I_CURRENT_VERSION | = lv_i_current_version | |
| I_KOKRS | = lv_i_kokrs | |
| I_PERIOD | = lv_i_period | |
| I_YEAR | = lv_i_year | |
| I_PLAN_WBS_VERSION | = lv_i_plan_wbs_version | |
| I_PLAN_NW_VERSION | = lv_i_plan_nw_version | |
| TABLES | ||
| T_FORECAST_DIS | = lt_t_forecast_dis | |
| T_RETURN | = lt_t_return | |
| . " CNFW_UPDATE_CURRENTFC_RFC | ||
ABAP code using 7.40 inline data declarations to call FM CNFW_UPDATE_CURRENTFC_RFC
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 VERSN FROM TKA09 INTO @DATA(ld_i_current_version). | ||||
| "SELECT single KOKRS FROM TKA01 INTO @DATA(ld_i_kokrs). | ||||
| "SELECT single PERBL FROM COSS INTO @DATA(ld_i_period). | ||||
| "SELECT single GJAHR FROM COSS INTO @DATA(ld_i_year). | ||||
| "SELECT single VERSN FROM TKA09 INTO @DATA(ld_i_plan_wbs_version). | ||||
| "SELECT single VERSN FROM TKA09 INTO @DATA(ld_i_plan_nw_version). | ||||
Search for further information about these or an SAP related objects