SAP CASH_FLOW_CONSTRUCT_SECURITY Function Module for Securities: Generate Condition-Based Flows









CASH_FLOW_CONSTRUCT_SECURITY is a standard cash flow construct security SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Securities: Generate Condition-Based Flows 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 security FM, simply by entering the name CASH_FLOW_CONSTRUCT_SECURITY into the relevant SAP transaction such as SE37 or SE38.

Function Group: FV97
Program Name: SAPLFV97
Main Program: SAPLFV97
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CASH_FLOW_CONSTRUCT_SECURITY 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_SECURITY'"Securities: Generate Condition-Based Flows
EXPORTING
* I_BUKRS = ' ' "Company Code
* I_KOKO = ' ' "Condition header
* I_RLDEPO = ' ' "Securities Account
I_VWPANLA = "Class master data
* I_FLG_NEW_CALCULATOR = "Flag: über neuen Finanzstromrechner rechnen

IMPORTING
E_BFRATE = "wird nicht mehr versorgt
E_DATUM_LFZ = "End of Term
E_DRSALDO = "
E_RSALDO = "
E_YIELD = "

TABLES
I_BEPP = "Flows
I_KOPO = "Condition Items
* I_T056P = "Reference Interest Table

EXCEPTIONS
KEINE_TILGUNGSKONDITIONEN = 1 LAUFZEITENDE_FEHLT = 2 LAUFZEITENDE_NICHT_ERMITTELBAR = 3 LAUFZEIT_ODER_RATE_FEHLT = 4 NEGATIVE_TILGUNG_AUFGETRETEN = 5 FLOW_TYPE_NOT_FOUND = 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_SAPLFV97_101 Securities Cash Flow Calculator: Modify Flows

IMPORTING Parameters details for CASH_FLOW_CONSTRUCT_SECURITY

I_BUKRS - Company Code

Data type: T001-BUKRS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KOKO - Condition header

Data type: VZZKOKO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RLDEPO - Securities Account

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VWPANLA - Class master data

Data type: VWPANLA
Optional: No
Call by Reference: No ( called with pass by value option)

I_FLG_NEW_CALCULATOR - Flag: über neuen Finanzstromrechner rechnen

Data type: XFELD
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CASH_FLOW_CONSTRUCT_SECURITY

E_BFRATE - wird nicht mehr versorgt

Data type: VZZBEPP-BFRATE
Optional: No
Call by Reference: No ( called with pass by value option)

E_DATUM_LFZ - End of Term

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

E_DRSALDO -

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

E_RSALDO -

Data type: VZZBEPP-BNWHR
Optional: No
Call by Reference: No ( called with pass by value option)

E_YIELD -

Data type: TB_PYIELD
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CASH_FLOW_CONSTRUCT_SECURITY

I_BEPP - Flows

Data type: VZZBEPP
Optional: No
Call by Reference: No ( called with pass by value option)

I_KOPO - Condition Items

Data type: VVZZKOPO
Optional: No
Call by Reference: No ( called with pass by value option)

I_T056P - Reference Interest Table

Data type: T056P
Optional: Yes
Call by Reference: Yes

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)

FLOW_TYPE_NOT_FOUND - Bewegung ohne Bewegungsart vorhanden

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CASH_FLOW_CONSTRUCT_SECURITY 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_i_bepp  TYPE STANDARD TABLE OF VZZBEPP, "   
lv_i_bukrs  TYPE T001-BUKRS, "   SPACE
lv_e_bfrate  TYPE VZZBEPP-BFRATE, "   
lv_keine_tilgungskonditionen  TYPE VZZBEPP, "   
lv_i_koko  TYPE VZZKOKO, "   SPACE
lt_i_kopo  TYPE STANDARD TABLE OF VVZZKOPO, "   
lv_e_datum_lfz  TYPE SY-DATUM, "   
lv_laufzeitende_fehlt  TYPE SY, "   
lt_i_t056p  TYPE STANDARD TABLE OF T056P, "   
lv_i_rldepo  TYPE T056P, "   SPACE
lv_e_drsaldo  TYPE SY-DATUM, "   
lv_laufzeitende_nicht_ermittelbar  TYPE SY, "   
lv_e_rsaldo  TYPE VZZBEPP-BNWHR, "   
lv_i_vwpanla  TYPE VWPANLA, "   
lv_laufzeit_oder_rate_fehlt  TYPE VWPANLA, "   
lv_e_yield  TYPE TB_PYIELD, "   
lv_i_flg_new_calculator  TYPE XFELD, "   
lv_negative_tilgung_aufgetreten  TYPE XFELD, "   
lv_flow_type_not_found  TYPE XFELD. "   

  CALL FUNCTION 'CASH_FLOW_CONSTRUCT_SECURITY'  "Securities: Generate Condition-Based Flows
    EXPORTING
         I_BUKRS = lv_i_bukrs
         I_KOKO = lv_i_koko
         I_RLDEPO = lv_i_rldepo
         I_VWPANLA = lv_i_vwpanla
         I_FLG_NEW_CALCULATOR = lv_i_flg_new_calculator
    IMPORTING
         E_BFRATE = lv_e_bfrate
         E_DATUM_LFZ = lv_e_datum_lfz
         E_DRSALDO = lv_e_drsaldo
         E_RSALDO = lv_e_rsaldo
         E_YIELD = lv_e_yield
    TABLES
         I_BEPP = lt_i_bepp
         I_KOPO = lt_i_kopo
         I_T056P = lt_i_t056p
    EXCEPTIONS
        KEINE_TILGUNGSKONDITIONEN = 1
        LAUFZEITENDE_FEHLT = 2
        LAUFZEITENDE_NICHT_ERMITTELBAR = 3
        LAUFZEIT_ODER_RATE_FEHLT = 4
        NEGATIVE_TILGUNG_AUFGETRETEN = 5
        FLOW_TYPE_NOT_FOUND = 6
. " CASH_FLOW_CONSTRUCT_SECURITY




ABAP code using 7.40 inline data declarations to call FM CASH_FLOW_CONSTRUCT_SECURITY

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 BUKRS FROM T001 INTO @DATA(ld_i_bukrs).
DATA(ld_i_bukrs) = ' '.
 
"SELECT single BFRATE FROM VZZBEPP INTO @DATA(ld_e_bfrate).
 
 
DATA(ld_i_koko) = ' '.
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_e_datum_lfz).
 
 
 
DATA(ld_i_rldepo) = ' '.
 
"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



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!