SAP Function Modules

RS_DME_DTG_GETCOUNTS_OPTIMIZED SAP Function module - Get Frequency Distribution using SQL Aggregation Methods







RS_DME_DTG_GETCOUNTS_OPTIMIZED 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 RS_DME_DTG_GETCOUNTS_OPTIMIZED into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RS_DME_DTG_GETCOUNTS_OPTIMIZED - RS DME DTG GETCOUNTS OPTIMIZED





CALL FUNCTION 'RS_DME_DTG_GETCOUNTS_OPTIMIZED' "Get Frequency Distribution using SQL Aggregation Methods
* EXPORTING
*   i_learn_dbtab =             " rsdmem_data_store  Data Store for Training
*   ir_node_itab =              " data
*   is_where_list_curr =        " rsdmu_s_where_list
*   i_t_where_list_prev =       " rsdmu_t_where_list
*   i_t_rec_weights =           " rsdmu_t_recids
*   i_pruning_call =            " rsdmem_bool_ch  Data Element for Character Boolean
*   i_t_db_fields =             " rsdmu_t_db_fields
  IMPORTING
    e_t_disc_list =             " rsdmsd_sorted_dattr_freq  Sorted Discrete Attributes
    e_t_cont_list =             " rsdmsd_sorted_cattr_freq  Sorted Continuous Attributes & Class Frequencies
    e_t_cont_val_list =         " rsdmsd_sorted_cattr_val  Sorted Continuous Attribute Values
    e_t_cont_list_un =          " rsdmsd_sorted_cattr_freq  Sorted Continuous Attributes & Class Frequencies
    e_total_weight =            " rsdmem_wt_sum  Cumulative Weights
    e_itab_data_used =          " rsdmem_bool_ch  Itab optimization used
    e_itab_data_created =       " rsdmem_bool_ch  Itab optimization used
    er_filtered_itab =          " data
    e_unknown_wt =              " rsdmem_wt_sum  Unknown Records Weight
* TABLES
*   i_t_nodeattr =              " rsdmsd_attr_list  Attribute List  (for Internal Usage)
*   i_t_nodewhere =             " rsdmsd_whereclause  Where Clause
*   e_t_unknown_recids =        " rsdmsd_recid  Unknown Record IDs with corresponding weights
    .  "  RS_DME_DTG_GETCOUNTS_OPTIMIZED

ABAP code example for Function Module RS_DME_DTG_GETCOUNTS_OPTIMIZED





The ABAP code below is a full code listing to execute function module RS_DME_DTG_GETCOUNTS_OPTIMIZED 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_t_disc_list  TYPE RSDMSD_SORTED_DATTR_FREQ ,
ld_e_t_cont_list  TYPE RSDMSD_SORTED_CATTR_FREQ ,
ld_e_t_cont_val_list  TYPE RSDMSD_SORTED_CATTR_VAL ,
ld_e_t_cont_list_un  TYPE RSDMSD_SORTED_CATTR_FREQ ,
ld_e_total_weight  TYPE RSDMEM_WT_SUM ,
ld_e_itab_data_used  TYPE RSDMEM_BOOL_CH ,
ld_e_itab_data_created  TYPE RSDMEM_BOOL_CH ,
ld_er_filtered_itab  TYPE DATA ,
ld_e_unknown_wt  TYPE RSDMEM_WT_SUM ,
it_i_t_nodeattr  TYPE STANDARD TABLE OF RSDMSD_ATTR_LIST,"TABLES PARAM
wa_i_t_nodeattr  LIKE LINE OF it_i_t_nodeattr ,
it_i_t_nodewhere  TYPE STANDARD TABLE OF RSDMSD_WHERECLAUSE,"TABLES PARAM
wa_i_t_nodewhere  LIKE LINE OF it_i_t_nodewhere ,
it_e_t_unknown_recids  TYPE STANDARD TABLE OF RSDMSD_RECID,"TABLES PARAM
wa_e_t_unknown_recids  LIKE LINE OF it_e_t_unknown_recids .

DATA(ld_i_learn_dbtab) = 'Check type of data required'.
DATA(ld_ir_node_itab) = 'Check type of data required'.
DATA(ld_is_where_list_curr) = 'Check type of data required'.
DATA(ld_i_t_where_list_prev) = 'Check type of data required'.
DATA(ld_i_t_rec_weights) = 'Check type of data required'.
DATA(ld_i_pruning_call) = 'Check type of data required'.
DATA(ld_i_t_db_fields) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_nodeattr to it_i_t_nodeattr.

"populate fields of struture and append to itab
append wa_i_t_nodewhere to it_i_t_nodewhere.

"populate fields of struture and append to itab
append wa_e_t_unknown_recids to it_e_t_unknown_recids. . CALL FUNCTION 'RS_DME_DTG_GETCOUNTS_OPTIMIZED' * EXPORTING * i_learn_dbtab = ld_i_learn_dbtab * ir_node_itab = ld_ir_node_itab * is_where_list_curr = ld_is_where_list_curr * i_t_where_list_prev = ld_i_t_where_list_prev * i_t_rec_weights = ld_i_t_rec_weights * i_pruning_call = ld_i_pruning_call * i_t_db_fields = ld_i_t_db_fields IMPORTING e_t_disc_list = ld_e_t_disc_list e_t_cont_list = ld_e_t_cont_list e_t_cont_val_list = ld_e_t_cont_val_list e_t_cont_list_un = ld_e_t_cont_list_un e_total_weight = ld_e_total_weight e_itab_data_used = ld_e_itab_data_used e_itab_data_created = ld_e_itab_data_created er_filtered_itab = ld_er_filtered_itab e_unknown_wt = ld_e_unknown_wt * TABLES * i_t_nodeattr = it_i_t_nodeattr * i_t_nodewhere = it_i_t_nodewhere * e_t_unknown_recids = it_e_t_unknown_recids . " RS_DME_DTG_GETCOUNTS_OPTIMIZED
IF SY-SUBRC EQ 0. "All OK 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_t_disc_list  TYPE RSDMSD_SORTED_DATTR_FREQ ,
ld_i_learn_dbtab  TYPE RSDMEM_DATA_STORE ,
it_i_t_nodeattr  TYPE STANDARD TABLE OF RSDMSD_ATTR_LIST ,
wa_i_t_nodeattr  LIKE LINE OF it_i_t_nodeattr,
ld_e_t_cont_list  TYPE RSDMSD_SORTED_CATTR_FREQ ,
ld_ir_node_itab  TYPE DATA ,
it_i_t_nodewhere  TYPE STANDARD TABLE OF RSDMSD_WHERECLAUSE ,
wa_i_t_nodewhere  LIKE LINE OF it_i_t_nodewhere,
ld_e_t_cont_val_list  TYPE RSDMSD_SORTED_CATTR_VAL ,
ld_is_where_list_curr  TYPE RSDMU_S_WHERE_LIST ,
it_e_t_unknown_recids  TYPE STANDARD TABLE OF RSDMSD_RECID ,
wa_e_t_unknown_recids  LIKE LINE OF it_e_t_unknown_recids,
ld_e_t_cont_list_un  TYPE RSDMSD_SORTED_CATTR_FREQ ,
ld_i_t_where_list_prev  TYPE RSDMU_T_WHERE_LIST ,
ld_e_total_weight  TYPE RSDMEM_WT_SUM ,
ld_i_t_rec_weights  TYPE RSDMU_T_RECIDS ,
ld_e_itab_data_used  TYPE RSDMEM_BOOL_CH ,
ld_i_pruning_call  TYPE RSDMEM_BOOL_CH ,
ld_e_itab_data_created  TYPE RSDMEM_BOOL_CH ,
ld_i_t_db_fields  TYPE RSDMU_T_DB_FIELDS ,
ld_er_filtered_itab  TYPE DATA ,
ld_e_unknown_wt  TYPE RSDMEM_WT_SUM .

ld_i_learn_dbtab = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_nodeattr to it_i_t_nodeattr.
ld_ir_node_itab = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_nodewhere to it_i_t_nodewhere.
ld_is_where_list_curr = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_t_unknown_recids to it_e_t_unknown_recids.
ld_i_t_where_list_prev = 'Check type of data required'.
ld_i_t_rec_weights = 'Check type of data required'.
ld_i_pruning_call = 'Check type of data required'.
ld_i_t_db_fields = 'Check type of data required'.

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 RS_DME_DTG_GETCOUNTS_OPTIMIZED or its description.