SAP CASH_FORECAST_LEVEL_AND_DATE Function Module for
CASH_FORECAST_LEVEL_AND_DATE is a standard cash forecast level and date SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 forecast level and date FM, simply by entering the name CASH_FORECAST_LEVEL_AND_DATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FDIS
Program Name: SAPLFDIS
Main Program: SAPLFDIS
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CASH_FORECAST_LEVEL_AND_DATE 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_FORECAST_LEVEL_AND_DATE'".
EXPORTING
* AKTYP = 'H' "H document is created, V document update
I_BKPF = "
I_BSEG = "
* I_T001 = "
* PAYMENT_HISTORY = ' ' "X-customer payment history is recorded
IMPORTING
E_BSEG = "
EXCEPTIONS
NOT_FOUND_T035 = 1 NOT_FOUND_T036 = 2 NOT_FOUND_T039 = 3 NOT_FOUND_T042 = 4 WRONG_LEVEL = 5
IMPORTING Parameters details for CASH_FORECAST_LEVEL_AND_DATE
AKTYP - H document is created, V document update
Data type: T020-AKTYPDefault: 'H'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BKPF -
Data type: BKPFOptional: No
Call by Reference: No ( called with pass by value option)
I_BSEG -
Data type: BSEGOptional: No
Call by Reference: No ( called with pass by value option)
I_T001 -
Data type: T001Optional: Yes
Call by Reference: No ( called with pass by value option)
PAYMENT_HISTORY - X-customer payment history is recorded
Data type: KNB1-XZVERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CASH_FORECAST_LEVEL_AND_DATE
E_BSEG -
Data type: BSEGOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND_T035 - Planning group not in table 035
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_T036 - Planning level not in table 036
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_T039 - Source symbol not in table 039
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_T042 - Company code not in table 042
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_LEVEL - Level (not) part of cash management position
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CASH_FORECAST_LEVEL_AND_DATE 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: | ||||
| lv_aktyp | TYPE T020-AKTYP, " 'H' | |||
| lv_e_bseg | TYPE BSEG, " | |||
| lv_not_found_t035 | TYPE BSEG, " | |||
| lv_i_bkpf | TYPE BKPF, " | |||
| lv_not_found_t036 | TYPE BKPF, " | |||
| lv_i_bseg | TYPE BSEG, " | |||
| lv_not_found_t039 | TYPE BSEG, " | |||
| lv_i_t001 | TYPE T001, " | |||
| lv_not_found_t042 | TYPE T001, " | |||
| lv_wrong_level | TYPE T001, " | |||
| lv_payment_history | TYPE KNB1-XZVER. " SPACE |
|   CALL FUNCTION 'CASH_FORECAST_LEVEL_AND_DATE' " |
| EXPORTING | ||
| AKTYP | = lv_aktyp | |
| I_BKPF | = lv_i_bkpf | |
| I_BSEG | = lv_i_bseg | |
| I_T001 | = lv_i_t001 | |
| PAYMENT_HISTORY | = lv_payment_history | |
| IMPORTING | ||
| E_BSEG | = lv_e_bseg | |
| EXCEPTIONS | ||
| NOT_FOUND_T035 = 1 | ||
| NOT_FOUND_T036 = 2 | ||
| NOT_FOUND_T039 = 3 | ||
| NOT_FOUND_T042 = 4 | ||
| WRONG_LEVEL = 5 | ||
| . " CASH_FORECAST_LEVEL_AND_DATE | ||
ABAP code using 7.40 inline data declarations to call FM CASH_FORECAST_LEVEL_AND_DATE
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 AKTYP FROM T020 INTO @DATA(ld_aktyp). | ||||
| DATA(ld_aktyp) | = 'H'. | |||
| "SELECT single XZVER FROM KNB1 INTO @DATA(ld_payment_history). | ||||
| DATA(ld_payment_history) | = ' '. | |||
Search for further information about these or an SAP related objects