SAP CASH_FORECAST_SELECT_AND_COMPR Function Module for Cash management and forecast: Select and compress according to table 038









CASH_FORECAST_SELECT_AND_COMPR is a standard cash forecast select and compr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Cash management and forecast: Select and compress according to table 038 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 forecast select and compr FM, simply by entering the name CASH_FORECAST_SELECT_AND_COMPR into the relevant SAP transaction such as SE37 or SE38.

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



Function CASH_FORECAST_SELECT_AND_COMPR 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_SELECT_AND_COMPR'"Cash management and forecast: Select and compress according to table 038
EXPORTING
* UNTIL_DATE = '00000000' "Selection up to this MRP date (inc
* I_XGLCURR = ' ' "
* I_XENTVW = ' ' "
* X_CASH_FORECAST = ' ' "X short term financial planning (c
* X_CASH_MANAGEMENT = ' ' "X cash management position (bank a
* X_GROUP_COMPRESSION = ' ' "X group compression according to T
* X_LEVEL_COMPRESSION = ' ' "X level compression according to T
* X_SUBACCOUNT_COMPRESSION = ' ' "X sub-account compression accordin
* X_ZERO_RECORDS = ' ' "X zero totals records are also sel
* X_GSBER_COMPRESSION = ' ' "
* I_EXTERNAL = ' ' "Character Field of Length 1

TABLES
S_BUKRS = "Select option company code
S_DISPW = "Select option MRP currency
S_GLIED = "Select option outline
S_GSBER = "Select option business area
* S_SEGMENT = "
* S_PRCTR = "
* S_GEBER = "
* S_GRANT_NBR = "
TAB_RF40V = "

EXCEPTIONS
NOT_FOUND_T038 = 1 NOT_FOUND_T038_GROUP = 2 NOT_FOUND_T038_LEVEL = 3 NO_AUTHORITY = 4
.



IMPORTING Parameters details for CASH_FORECAST_SELECT_AND_COMPR

UNTIL_DATE - Selection up to this MRP date (inc

Data type: FDSB-DATUM
Default: '00000000'
Optional: Yes
Call by Reference: Yes

I_XGLCURR -

Data type: CMXGLCURR
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_XENTVW -

Data type: CMXENTVW
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_CASH_FORECAST - X short term financial planning (c

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_CASH_MANAGEMENT - X cash management position (bank a

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_GROUP_COMPRESSION - X group compression according to T

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_LEVEL_COMPRESSION - X level compression according to T

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_SUBACCOUNT_COMPRESSION - X sub-account compression accordin

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_ZERO_RECORDS - X zero totals records are also sel

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

X_GSBER_COMPRESSION -

Data type: BOOLE-BOOLE
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_EXTERNAL - Character Field of Length 1

Data type: CHAR01
Default: SPACE
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for CASH_FORECAST_SELECT_AND_COMPR

S_BUKRS - Select option company code

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

S_DISPW - Select option MRP currency

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

S_GLIED - Select option outline

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

S_GSBER - Select option business area

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

S_SEGMENT -

Data type:
Optional: Yes
Call by Reference: Yes

S_PRCTR -

Data type:
Optional: Yes
Call by Reference: Yes

S_GEBER -

Data type:
Optional: Yes
Call by Reference: Yes

S_GRANT_NBR -

Data type:
Optional: Yes
Call by Reference: Yes

TAB_RF40V -

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

EXCEPTIONS details

NOT_FOUND_T038 - Outline not in table 038

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

NOT_FOUND_T038_GROUP - The group line items are missing i

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

NOT_FOUND_T038_LEVEL - The level line items are missing i

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

NO_AUTHORITY - No Authorization for Company Codes

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

Copy and paste ABAP code example for CASH_FORECAST_SELECT_AND_COMPR 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_s_bukrs  TYPE STANDARD TABLE OF STRING, "   
lv_until_date  TYPE FDSB-DATUM, "   '00000000'
lv_not_found_t038  TYPE FDSB, "   
lv_i_xglcurr  TYPE CMXGLCURR, "   SPACE
lv_i_xentvw  TYPE CMXENTVW, "   SPACE
lt_s_dispw  TYPE STANDARD TABLE OF CMXENTVW, "   
lv_x_cash_forecast  TYPE BOOLE-BOOLE, "   SPACE
lv_not_found_t038_group  TYPE BOOLE, "   
lt_s_glied  TYPE STANDARD TABLE OF BOOLE, "   
lv_x_cash_management  TYPE BOOLE-BOOLE, "   SPACE
lv_not_found_t038_level  TYPE BOOLE, "   
lt_s_gsber  TYPE STANDARD TABLE OF BOOLE, "   
lv_no_authority  TYPE BOOLE, "   
lv_x_group_compression  TYPE BOOLE-BOOLE, "   SPACE
lt_s_segment  TYPE STANDARD TABLE OF BOOLE, "   
lv_x_level_compression  TYPE BOOLE-BOOLE, "   SPACE
lt_s_prctr  TYPE STANDARD TABLE OF BOOLE, "   
lv_x_subaccount_compression  TYPE BOOLE-BOOLE, "   SPACE
lt_s_geber  TYPE STANDARD TABLE OF BOOLE, "   
lv_x_zero_records  TYPE BOOLE-BOOLE, "   SPACE
lt_s_grant_nbr  TYPE STANDARD TABLE OF BOOLE, "   
lv_x_gsber_compression  TYPE BOOLE-BOOLE, "   SPACE
lt_tab_rf40v  TYPE STANDARD TABLE OF RF40V, "   
lv_i_external  TYPE CHAR01. "   SPACE

  CALL FUNCTION 'CASH_FORECAST_SELECT_AND_COMPR'  "Cash management and forecast: Select and compress according to table 038
    EXPORTING
         UNTIL_DATE = lv_until_date
         I_XGLCURR = lv_i_xglcurr
         I_XENTVW = lv_i_xentvw
         X_CASH_FORECAST = lv_x_cash_forecast
         X_CASH_MANAGEMENT = lv_x_cash_management
         X_GROUP_COMPRESSION = lv_x_group_compression
         X_LEVEL_COMPRESSION = lv_x_level_compression
         X_SUBACCOUNT_COMPRESSION = lv_x_subaccount_compression
         X_ZERO_RECORDS = lv_x_zero_records
         X_GSBER_COMPRESSION = lv_x_gsber_compression
         I_EXTERNAL = lv_i_external
    TABLES
         S_BUKRS = lt_s_bukrs
         S_DISPW = lt_s_dispw
         S_GLIED = lt_s_glied
         S_GSBER = lt_s_gsber
         S_SEGMENT = lt_s_segment
         S_PRCTR = lt_s_prctr
         S_GEBER = lt_s_geber
         S_GRANT_NBR = lt_s_grant_nbr
         TAB_RF40V = lt_tab_rf40v
    EXCEPTIONS
        NOT_FOUND_T038 = 1
        NOT_FOUND_T038_GROUP = 2
        NOT_FOUND_T038_LEVEL = 3
        NO_AUTHORITY = 4
. " CASH_FORECAST_SELECT_AND_COMPR




ABAP code using 7.40 inline data declarations to call FM CASH_FORECAST_SELECT_AND_COMPR

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 DATUM FROM FDSB INTO @DATA(ld_until_date).
DATA(ld_until_date) = '00000000'.
 
 
DATA(ld_i_xglcurr) = ' '.
 
DATA(ld_i_xentvw) = ' '.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_cash_forecast).
DATA(ld_x_cash_forecast) = ' '.
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_cash_management).
DATA(ld_x_cash_management) = ' '.
 
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_group_compression).
DATA(ld_x_group_compression) = ' '.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_level_compression).
DATA(ld_x_level_compression) = ' '.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_subaccount_compression).
DATA(ld_x_subaccount_compression) = ' '.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_zero_records).
DATA(ld_x_zero_records) = ' '.
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_x_gsber_compression).
DATA(ld_x_gsber_compression) = ' '.
 
 
DATA(ld_i_external) = ' '.
 


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!