SAP MCWPS_BUILD_LARGE_ITEMSETS Function Module for NOTRANSL: INTERN: Erzeugen der Large-Itemsets (Apriori)









MCWPS_BUILD_LARGE_ITEMSETS is a standard mcwps build large itemsets SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: INTERN: Erzeugen der Large-Itemsets (Apriori) 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 mcwps build large itemsets FM, simply by entering the name MCWPS_BUILD_LARGE_ITEMSETS into the relevant SAP transaction such as SE37 or SE38.

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



Function MCWPS_BUILD_LARGE_ITEMSETS 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 'MCWPS_BUILD_LARGE_ITEMSETS'"NOTRANSL: INTERN: Erzeugen der Large-Itemsets (Apriori)
EXPORTING
* I_CARDINAL_NUMBER = '3' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_WERKS = "Plant
* I_FLG_IS = 'X' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_MIN_SUP = '0.05' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_VRSIO = '000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_MAX_SIZE_L2 = '60000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_MAX_SIZE_L3 = '60000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_DBTAB = 'S120' "Name of Database Table
* I_MAX_ROWS = '3000000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_VIC = 'BONNR' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_FIELD = 'MATNR' "Field name of obj. to analyze

IMPORTING
E_ANZ_BON = "DE-EN-LANG-SWITCH-NO-TRANSLATION
E_ANZ_POS = "DE-EN-LANG-SWITCH-NO-TRANSLATION
E_SIZE_C1 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
E_SIZE_C2 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
E_SIZE_C3 = "DE-EN-LANG-SWITCH-NO-TRANSLATION

TABLES
E_TAB_L1 = "Large-Itemset k = 1
E_TAB_L2 = "Large-Itemset k = 2
* E_TAB_L3 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_SL_MATKL = "
* I_SL_DATUM = "
* I_WHERE_TAB = "Table for Dynamic WHERE Requirement

EXCEPTIONS
BAD_SUPPORT = 1 BAD_CARDINAL_NUMBER = 2 DATABASE_ERROR = 3 C2_TO_BIG = 4 C3_TO_BIG = 5
.



IMPORTING Parameters details for MCWPS_BUILD_LARGE_ITEMSETS

I_CARDINAL_NUMBER - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_WERKS - Plant

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

I_FLG_IS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_MIN_SUP - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_VRSIO - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: S120-VRSIO
Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MAX_SIZE_L2 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_MAX_SIZE_L3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_DBTAB - Name of Database Table

Data type: RSRD1-OBJNAME
Default: 'S120'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MAX_ROWS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_VIC - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: RSRD1-OBJNAME
Default: 'BONNR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FIELD - Field name of obj. to analyze

Data type: RSRD1-OBJNAME
Default: 'MATNR'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MCWPS_BUILD_LARGE_ITEMSETS

E_ANZ_BON - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

E_ANZ_POS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

E_SIZE_C1 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

E_SIZE_C2 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

E_SIZE_C3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

TABLES Parameters details for MCWPS_BUILD_LARGE_ITEMSETS

E_TAB_L1 - Large-Itemset k = 1

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

E_TAB_L2 - Large-Itemset k = 2

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

E_TAB_L3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_SL_MATKL -

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

I_SL_DATUM -

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

I_WHERE_TAB - Table for Dynamic WHERE Requirement

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

EXCEPTIONS details

BAD_SUPPORT - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

BAD_CARDINAL_NUMBER - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

DATABASE_ERROR - Database access error

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

C2_TO_BIG - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

C3_TO_BIG - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for MCWPS_BUILD_LARGE_ITEMSETS 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_e_tab_l1  TYPE STANDARD TABLE OF MCWPSI1, "   
lv_e_anz_bon  TYPE I, "   
lv_bad_support  TYPE I, "   
lv_i_cardinal_number  TYPE I, "   '3'
lv_i_werks  TYPE S120-WERKS, "   
lv_i_flg_is  TYPE C, "   'X'
lt_e_tab_l2  TYPE STANDARD TABLE OF MCWPSI2, "   
lv_e_anz_pos  TYPE I, "   
lv_i_min_sup  TYPE F, "   '0,05'
lv_bad_cardinal_number  TYPE F, "   
lv_i_vrsio  TYPE S120-VRSIO, "   '000'
lt_e_tab_l3  TYPE STANDARD TABLE OF MCWPSI3, "   
lv_e_size_c1  TYPE I, "   
lv_database_error  TYPE I, "   
lv_c2_to_big  TYPE I, "   
lv_e_size_c2  TYPE I, "   
lt_i_sl_matkl  TYPE STANDARD TABLE OF RSDSSELOPT, "   
lv_i_max_size_l2  TYPE I, "   '60000'
lv_c3_to_big  TYPE I, "   
lv_e_size_c3  TYPE I, "   
lt_i_sl_datum  TYPE STANDARD TABLE OF RSDSSELOPT, "   
lv_i_max_size_l3  TYPE I, "   '60000'
lv_i_dbtab  TYPE RSRD1-OBJNAME, "   'S120'
lt_i_where_tab  TYPE STANDARD TABLE OF MCW_WHERETAB, "   
lv_i_max_rows  TYPE I, "   '3000000'
lv_i_vic  TYPE RSRD1-OBJNAME, "   'BONNR'
lv_i_field  TYPE RSRD1-OBJNAME. "   'MATNR'

  CALL FUNCTION 'MCWPS_BUILD_LARGE_ITEMSETS'  "NOTRANSL: INTERN: Erzeugen der Large-Itemsets (Apriori)
    EXPORTING
         I_CARDINAL_NUMBER = lv_i_cardinal_number
         I_WERKS = lv_i_werks
         I_FLG_IS = lv_i_flg_is
         I_MIN_SUP = lv_i_min_sup
         I_VRSIO = lv_i_vrsio
         I_MAX_SIZE_L2 = lv_i_max_size_l2
         I_MAX_SIZE_L3 = lv_i_max_size_l3
         I_DBTAB = lv_i_dbtab
         I_MAX_ROWS = lv_i_max_rows
         I_VIC = lv_i_vic
         I_FIELD = lv_i_field
    IMPORTING
         E_ANZ_BON = lv_e_anz_bon
         E_ANZ_POS = lv_e_anz_pos
         E_SIZE_C1 = lv_e_size_c1
         E_SIZE_C2 = lv_e_size_c2
         E_SIZE_C3 = lv_e_size_c3
    TABLES
         E_TAB_L1 = lt_e_tab_l1
         E_TAB_L2 = lt_e_tab_l2
         E_TAB_L3 = lt_e_tab_l3
         I_SL_MATKL = lt_i_sl_matkl
         I_SL_DATUM = lt_i_sl_datum
         I_WHERE_TAB = lt_i_where_tab
    EXCEPTIONS
        BAD_SUPPORT = 1
        BAD_CARDINAL_NUMBER = 2
        DATABASE_ERROR = 3
        C2_TO_BIG = 4
        C3_TO_BIG = 5
. " MCWPS_BUILD_LARGE_ITEMSETS




ABAP code using 7.40 inline data declarations to call FM MCWPS_BUILD_LARGE_ITEMSETS

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.

 
 
 
DATA(ld_i_cardinal_number) = '3'.
 
"SELECT single WERKS FROM S120 INTO @DATA(ld_i_werks).
 
DATA(ld_i_flg_is) = 'X'.
 
 
 
DATA(ld_i_min_sup) = '0.05'.
 
 
"SELECT single VRSIO FROM S120 INTO @DATA(ld_i_vrsio).
DATA(ld_i_vrsio) = '000'.
 
 
 
 
 
 
 
DATA(ld_i_max_size_l2) = '60000'.
 
 
 
 
DATA(ld_i_max_size_l3) = '60000'.
 
"SELECT single OBJNAME FROM RSRD1 INTO @DATA(ld_i_dbtab).
DATA(ld_i_dbtab) = 'S120'.
 
 
DATA(ld_i_max_rows) = '3000000'.
 
"SELECT single OBJNAME FROM RSRD1 INTO @DATA(ld_i_vic).
DATA(ld_i_vic) = 'BONNR'.
 
"SELECT single OBJNAME FROM RSRD1 INTO @DATA(ld_i_field).
DATA(ld_i_field) = 'MATNR'.
 


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!