SAP CASH_FLOW_CONSTRUCT_2 Function Module for Constructs Cash Flow
CASH_FLOW_CONSTRUCT_2 is a standard cash flow construct 2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Constructs Cash Flow 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 cash flow construct 2 FM, simply by entering the name CASH_FLOW_CONSTRUCT_2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: FV96
Program Name: SAPLFV96
Main Program: SAPLFV96
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CASH_FLOW_CONSTRUCT_2 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 'CASH_FLOW_CONSTRUCT_2'"Constructs Cash Flow.
EXPORTING
* I_CFLEISTE = ' ' "
IMPORTING
E_BFRATE = "
E_DATUM_LFZ = "
E_DRSALDO = "
E_RSALDO = "
TABLES
IBBAS = "
IBEPP = "
IKOPO = "
EXCEPTIONS
KEINE_TILGUNGSKONDITIONEN = 1 LAUFZEITENDE_FEHLT = 2 LAUFZEITENDE_NICHT_ERMITTELBAR = 3 LAUFZEIT_ODER_RATE_FEHLT = 4 NEGATIVE_TILGUNG_AUFGETRETEN = 5 EXCHANGE_RATE_ERROR = 6
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_SAPLFV96_001 Calculation Bases
EXIT_SAPLFV96_101 ISIS Securities - CASH_FLOW_CONSTRUCT_SECURITY Other Flows
IMPORTING Parameters details for CASH_FLOW_CONSTRUCT_2
I_CFLEISTE -
Data type: RCFLEISTEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CASH_FLOW_CONSTRUCT_2
E_BFRATE -
Data type: VZZBEPP-BFRATEOptional: No
Call by Reference: No ( called with pass by value option)
E_DATUM_LFZ -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_DRSALDO -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_RSALDO -
Data type: VZZBEPP-BNWHROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CASH_FLOW_CONSTRUCT_2
IBBAS -
Data type: VZZBBASOptional: No
Call by Reference: No ( called with pass by value option)
IBEPP -
Data type: VZZBEPPOptional: No
Call by Reference: No ( called with pass by value option)
IKOPO -
Data type: VVZZKOPOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
KEINE_TILGUNGSKONDITIONEN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LAUFZEITENDE_FEHLT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LAUFZEITENDE_NICHT_ERMITTELBAR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LAUFZEIT_ODER_RATE_FEHLT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NEGATIVE_TILGUNG_AUFGETRETEN -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCHANGE_RATE_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CASH_FLOW_CONSTRUCT_2 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_ibbas | TYPE STANDARD TABLE OF VZZBBAS, " | |||
| lv_e_bfrate | TYPE VZZBEPP-BFRATE, " | |||
| lv_i_cfleiste | TYPE RCFLEISTE, " SPACE | |||
| lv_keine_tilgungskonditionen | TYPE RCFLEISTE, " | |||
| lt_ibepp | TYPE STANDARD TABLE OF VZZBEPP, " | |||
| lv_e_datum_lfz | TYPE SY-DATUM, " | |||
| lv_laufzeitende_fehlt | TYPE SY, " | |||
| lt_ikopo | TYPE STANDARD TABLE OF VVZZKOPO, " | |||
| lv_e_drsaldo | TYPE SY-DATUM, " | |||
| lv_laufzeitende_nicht_ermittelbar | TYPE SY, " | |||
| lv_e_rsaldo | TYPE VZZBEPP-BNWHR, " | |||
| lv_laufzeit_oder_rate_fehlt | TYPE VZZBEPP, " | |||
| lv_negative_tilgung_aufgetreten | TYPE VZZBEPP, " | |||
| lv_exchange_rate_error | TYPE VZZBEPP. " |
|   CALL FUNCTION 'CASH_FLOW_CONSTRUCT_2' "Constructs Cash Flow |
| EXPORTING | ||
| I_CFLEISTE | = lv_i_cfleiste | |
| IMPORTING | ||
| E_BFRATE | = lv_e_bfrate | |
| E_DATUM_LFZ | = lv_e_datum_lfz | |
| E_DRSALDO | = lv_e_drsaldo | |
| E_RSALDO | = lv_e_rsaldo | |
| TABLES | ||
| IBBAS | = lt_ibbas | |
| IBEPP | = lt_ibepp | |
| IKOPO | = lt_ikopo | |
| EXCEPTIONS | ||
| KEINE_TILGUNGSKONDITIONEN = 1 | ||
| LAUFZEITENDE_FEHLT = 2 | ||
| LAUFZEITENDE_NICHT_ERMITTELBAR = 3 | ||
| LAUFZEIT_ODER_RATE_FEHLT = 4 | ||
| NEGATIVE_TILGUNG_AUFGETRETEN = 5 | ||
| EXCHANGE_RATE_ERROR = 6 | ||
| . " CASH_FLOW_CONSTRUCT_2 | ||
ABAP code using 7.40 inline data declarations to call FM CASH_FLOW_CONSTRUCT_2
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 BFRATE FROM VZZBEPP INTO @DATA(ld_e_bfrate). | ||||
| DATA(ld_i_cfleiste) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_e_datum_lfz). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_e_drsaldo). | ||||
| "SELECT single BNWHR FROM VZZBEPP INTO @DATA(ld_e_rsaldo). | ||||
Search for further information about these or an SAP related objects