SAP Function Modules

CASH_FORECAST_DK_SELECT_ITEM SAP Function module







CASH_FORECAST_DK_SELECT_ITEM is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CASH_FORECAST_DK_SELECT_ITEM into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FDTS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CASH_FORECAST_DK_SELECT_ITEM - CASH FORECAST DK SELECT ITEM





CALL FUNCTION 'CASH_FORECAST_DK_SELECT_ITEM' "
  EXPORTING
    ebene =                     " fdfiep-fdlev  Planning level
    fdgrp =                     " fdfiep-fdgrp  Planning Group
    date_low =                  " sy-datum
    date_high =                 " sy-datum
*   i_field_list =              " ftisc_yt_field
*   i_group_list =              " ftisc_yt_group  Table with Groups
*   i_xentvw = SPACE            " cmxentvw      Entry View
*   i_xpopup = SPACE            " char1
  IMPORTING
    e_xpopup =                  " char1
  TABLES
    s_bukrs =                   " range_c4      Company Code
    s_gsber =                   " range_c4      Business Area
    s_dispw =                   " range_c5      Planning Currency
*   s_segment =                 " range_c10     Segment
*   s_prctr =                   " range_c10
*   s_geber =                   " range_c10
*   s_grant_nbr =               " range_c20     Grant
    t_fdfiep =                  " sfdfiep
*   t_grouping =                " t038
  EXCEPTIONS
    E_NO_ITEMS_FOUND = 1        "
    .  "  CASH_FORECAST_DK_SELECT_ITEM

ABAP code example for Function Module CASH_FORECAST_DK_SELECT_ITEM





The ABAP code below is a full code listing to execute function module CASH_FORECAST_DK_SELECT_ITEM including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_e_xpopup  TYPE CHAR1 ,
it_s_bukrs  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_s_bukrs  LIKE LINE OF it_s_bukrs ,
it_s_gsber  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_s_gsber  LIKE LINE OF it_s_gsber ,
it_s_dispw  TYPE STANDARD TABLE OF RANGE_C5,"TABLES PARAM
wa_s_dispw  LIKE LINE OF it_s_dispw ,
it_s_segment  TYPE STANDARD TABLE OF RANGE_C10,"TABLES PARAM
wa_s_segment  LIKE LINE OF it_s_segment ,
it_s_prctr  TYPE STANDARD TABLE OF RANGE_C10,"TABLES PARAM
wa_s_prctr  LIKE LINE OF it_s_prctr ,
it_s_geber  TYPE STANDARD TABLE OF RANGE_C10,"TABLES PARAM
wa_s_geber  LIKE LINE OF it_s_geber ,
it_s_grant_nbr  TYPE STANDARD TABLE OF RANGE_C20,"TABLES PARAM
wa_s_grant_nbr  LIKE LINE OF it_s_grant_nbr ,
it_t_fdfiep  TYPE STANDARD TABLE OF SFDFIEP,"TABLES PARAM
wa_t_fdfiep  LIKE LINE OF it_t_fdfiep ,
it_t_grouping  TYPE STANDARD TABLE OF T038,"TABLES PARAM
wa_t_grouping  LIKE LINE OF it_t_grouping .


SELECT single FDLEV
FROM FDFIEP
INTO @DATA(ld_ebene).


SELECT single FDGRP
FROM FDFIEP
INTO @DATA(ld_fdgrp).

DATA(ld_date_low) = '20210129'.
DATA(ld_date_high) = '20210129'.
DATA(ld_i_field_list) = '20210129'.
DATA(ld_i_group_list) = '20210129'.
DATA(ld_i_xentvw) = '20210129'.
DATA(ld_i_xpopup) = '20210129'.

"populate fields of struture and append to itab
append wa_s_bukrs to it_s_bukrs.

"populate fields of struture and append to itab
append wa_s_gsber to it_s_gsber.

"populate fields of struture and append to itab
append wa_s_dispw to it_s_dispw.

"populate fields of struture and append to itab
append wa_s_segment to it_s_segment.

"populate fields of struture and append to itab
append wa_s_prctr to it_s_prctr.

"populate fields of struture and append to itab
append wa_s_geber to it_s_geber.

"populate fields of struture and append to itab
append wa_s_grant_nbr to it_s_grant_nbr.

"populate fields of struture and append to itab
append wa_t_fdfiep to it_t_fdfiep.

"populate fields of struture and append to itab
append wa_t_grouping to it_t_grouping. . CALL FUNCTION 'CASH_FORECAST_DK_SELECT_ITEM' EXPORTING ebene = ld_ebene fdgrp = ld_fdgrp date_low = ld_date_low date_high = ld_date_high * i_field_list = ld_i_field_list * i_group_list = ld_i_group_list * i_xentvw = ld_i_xentvw * i_xpopup = ld_i_xpopup IMPORTING e_xpopup = ld_e_xpopup TABLES s_bukrs = it_s_bukrs s_gsber = it_s_gsber s_dispw = it_s_dispw * s_segment = it_s_segment * s_prctr = it_s_prctr * s_geber = it_s_geber * s_grant_nbr = it_s_grant_nbr t_fdfiep = it_t_fdfiep * t_grouping = it_t_grouping EXCEPTIONS E_NO_ITEMS_FOUND = 1 . " CASH_FORECAST_DK_SELECT_ITEM
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_xpopup  TYPE CHAR1 ,
ld_ebene  TYPE FDFIEP-FDLEV ,
it_s_bukrs  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_s_bukrs  LIKE LINE OF it_s_bukrs,
ld_fdgrp  TYPE FDFIEP-FDGRP ,
it_s_gsber  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_s_gsber  LIKE LINE OF it_s_gsber,
ld_date_low  TYPE SY-DATUM ,
it_s_dispw  TYPE STANDARD TABLE OF RANGE_C5 ,
wa_s_dispw  LIKE LINE OF it_s_dispw,
ld_date_high  TYPE SY-DATUM ,
it_s_segment  TYPE STANDARD TABLE OF RANGE_C10 ,
wa_s_segment  LIKE LINE OF it_s_segment,
ld_i_field_list  TYPE FTISC_YT_FIELD ,
it_s_prctr  TYPE STANDARD TABLE OF RANGE_C10 ,
wa_s_prctr  LIKE LINE OF it_s_prctr,
ld_i_group_list  TYPE FTISC_YT_GROUP ,
it_s_geber  TYPE STANDARD TABLE OF RANGE_C10 ,
wa_s_geber  LIKE LINE OF it_s_geber,
ld_i_xentvw  TYPE CMXENTVW ,
it_s_grant_nbr  TYPE STANDARD TABLE OF RANGE_C20 ,
wa_s_grant_nbr  LIKE LINE OF it_s_grant_nbr,
ld_i_xpopup  TYPE CHAR1 ,
it_t_fdfiep  TYPE STANDARD TABLE OF SFDFIEP ,
wa_t_fdfiep  LIKE LINE OF it_t_fdfiep,
it_t_grouping  TYPE STANDARD TABLE OF T038 ,
wa_t_grouping  LIKE LINE OF it_t_grouping.


SELECT single FDLEV
FROM FDFIEP
INTO ld_ebene.


"populate fields of struture and append to itab
append wa_s_bukrs to it_s_bukrs.

SELECT single FDGRP
FROM FDFIEP
INTO ld_fdgrp.


"populate fields of struture and append to itab
append wa_s_gsber to it_s_gsber.
ld_date_low = '20210129'.

"populate fields of struture and append to itab
append wa_s_dispw to it_s_dispw.
ld_date_high = '20210129'.

"populate fields of struture and append to itab
append wa_s_segment to it_s_segment.
ld_i_field_list = '20210129'.

"populate fields of struture and append to itab
append wa_s_prctr to it_s_prctr.
ld_i_group_list = '20210129'.

"populate fields of struture and append to itab
append wa_s_geber to it_s_geber.
ld_i_xentvw = '20210129'.

"populate fields of struture and append to itab
append wa_s_grant_nbr to it_s_grant_nbr.
ld_i_xpopup = '20210129'.

"populate fields of struture and append to itab
append wa_t_fdfiep to it_t_fdfiep.

"populate fields of struture and append to itab
append wa_t_grouping to it_t_grouping.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CASH_FORECAST_DK_SELECT_ITEM or its description.