SAP CNFW_UPDATE_CURRENTFC Function Module for Update Current Forecast Manually
CNFW_UPDATE_CURRENTFC is a standard cnfw update currentfc 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 Manually 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 FM, simply by entering the name CNFW_UPDATE_CURRENTFC 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): Normal Function Module
Update:

Function CNFW_UPDATE_CURRENTFC 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'"Update Current Forecast Manually.
EXPORTING
I_CURRENT_VERSION = "Version
I_KOKRS = "Controlling Area
I_PERIOD = "Period block
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
I_CURRENT_VERSION - Version
Data type: TKA09-VERSNOptional: No
Call by Reference: Yes
I_KOKRS - Controlling Area
Data type: TKA01-KOKRSOptional: No
Call by Reference: Yes
I_PERIOD - Period block
Data type: COSS-PERBLOptional: No
Call by Reference: Yes
I_YEAR - Fiscal Year
Data type: COSS-GJAHROptional: No
Call by Reference: Yes
I_PLAN_WBS_VERSION - Version
Data type: TKA09-VERSNOptional: Yes
Call by Reference: Yes
I_PLAN_NW_VERSION - Version
Data type: TKA09-VERSNOptional: Yes
Call by Reference: Yes
TABLES Parameters details for CNFW_UPDATE_CURRENTFC
T_FORECAST_DIS - Display Forecast Work Bench
Data type: CNFW_DISPLAY_STOptional: Yes
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 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' "Update Current Forecast Manually |
| 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 | ||
ABAP code using 7.40 inline data declarations to call FM CNFW_UPDATE_CURRENTFC
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