SAP ABC_ANALYSE Function Module for NOTRANSL: ABC-Analyse zum Material für eine Kennzahl bei anzugebender Stra









ABC_ANALYSE is a standard abc analyse 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: ABC-Analyse zum Material für eine Kennzahl bei anzugebender Stra 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 abc analyse FM, simply by entering the name ABC_ANALYSE into the relevant SAP transaction such as SE37 or SE38.

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



Function ABC_ANALYSE 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 'ABC_ANALYSE'"NOTRANSL: ABC-Analyse zum Material für eine Kennzahl bei anzugebender Stra
EXPORTING
* ANZ_MAT_ABS_A = 100 "Scrap Qty
* K_WERT_ABS_FLAG = ' ' "Strategy: Absolute key figure value
* K_WERT_PROZ_A = 70 "A Percentage
* K_WERT_PROZ_B = 20 "B Percentage
* K_WERT_PROZ_C = 10 "C percentage rate
* K_WERT_PROZ_FLAG = 'X' "Strategy: Key figure value in percentage
* WERKS_UEBERGREIFEND = ' ' "Client-based analysis on all plants
* ANZ_MAT_ABS_B = 500 "B quantity
* ANZ_MAT_ABS_FLAG = ' ' "Strategy: Number of absolute materials
* ANZ_MAT_PROZ_A = 10 "A Percentage
* ANZ_MAT_PROZ_B = 20 "B Percentage
* ANZ_MAT_PROZ_C = 70 "C percentage rate
* ANZ_MAT_PROZ_FLAG = ' ' "Strategy: Number of materials in percent
* K_WERT_ABS_A = 50000 "Scrap Value
* K_WERT_ABS_B = 5000 "Base value

TABLES
WERTE = "Analysis data as internal table

EXCEPTIONS
PROZENTSUMME_NICHT_100 = 1 STRATEGIE_FEHLT = 2 STRATEGIE_NICHT_EINDEUTIG = 3 WERTETABELLE_LEER = 4
.



IMPORTING Parameters details for ABC_ANALYSE

ANZ_MAT_ABS_A - Scrap Qty

Data type: RMCB0-AMABA
Default: 100
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_ABS_FLAG - Strategy: Absolute key figure value

Data type: RMCB0-STAB2
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_PROZ_A - A Percentage

Data type: RMCB0-AGPRA
Default: 70
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_PROZ_B - B Percentage

Data type: RMCB0-AGPRB
Default: 20
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_PROZ_C - C percentage rate

Data type: RMCB0-AGPRC
Default: 10
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_PROZ_FLAG - Strategy: Key figure value in percentage

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

WERKS_UEBERGREIFEND - Client-based analysis on all plants

Data type: RMCB0-STAB1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_ABS_B - B quantity

Data type: RMCB0-AMABB
Default: 500
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_ABS_FLAG - Strategy: Number of absolute materials

Data type: RMCB0-STAB4
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_PROZ_A - A Percentage

Data type: RMCB0-AMPRA
Default: 10
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_PROZ_B - B Percentage

Data type: RMCB0-AMPRB
Default: 20
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_PROZ_C - C percentage rate

Data type: RMCB0-AMPRC
Default: 70
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANZ_MAT_PROZ_FLAG - Strategy: Number of materials in percent

Data type: RMCB0-STAB3
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_ABS_A - Scrap Value

Data type: RMCB0-AGABA
Default: 50000
Optional: Yes
Call by Reference: No ( called with pass by value option)

K_WERT_ABS_B - Base value

Data type: RMCB0-AGABB
Default: 5000
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for ABC_ANALYSE

WERTE - Analysis data as internal table

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

EXCEPTIONS details

PROZENTSUMME_NICHT_100 - Percent total not equal to one hundred percent

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

STRATEGIE_FEHLT -

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

STRATEGIE_NICHT_EINDEUTIG - Only one strategy allowed

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

WERTETABELLE_LEER - No analysis values available

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

Copy and paste ABAP code example for ABC_ANALYSE 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_werte  TYPE STANDARD TABLE OF BCO_WERTE, "   
lv_anz_mat_abs_a  TYPE RMCB0-AMABA, "   100
lv_prozentsumme_nicht_100  TYPE RMCB0, "   
lv_k_wert_abs_flag  TYPE RMCB0-STAB2, "   SPACE
lv_k_wert_proz_a  TYPE RMCB0-AGPRA, "   70
lv_k_wert_proz_b  TYPE RMCB0-AGPRB, "   20
lv_k_wert_proz_c  TYPE RMCB0-AGPRC, "   10
lv_k_wert_proz_flag  TYPE RMCB0-STAB1, "   'X'
lv_werks_uebergreifend  TYPE RMCB0-STAB1, "   SPACE
lv_anz_mat_abs_b  TYPE RMCB0-AMABB, "   500
lv_strategie_fehlt  TYPE RMCB0, "   
lv_anz_mat_abs_flag  TYPE RMCB0-STAB4, "   SPACE
lv_strategie_nicht_eindeutig  TYPE RMCB0, "   
lv_anz_mat_proz_a  TYPE RMCB0-AMPRA, "   10
lv_wertetabelle_leer  TYPE RMCB0, "   
lv_anz_mat_proz_b  TYPE RMCB0-AMPRB, "   20
lv_anz_mat_proz_c  TYPE RMCB0-AMPRC, "   70
lv_anz_mat_proz_flag  TYPE RMCB0-STAB3, "   SPACE
lv_k_wert_abs_a  TYPE RMCB0-AGABA, "   50000
lv_k_wert_abs_b  TYPE RMCB0-AGABB. "   5000

  CALL FUNCTION 'ABC_ANALYSE'  "NOTRANSL: ABC-Analyse zum Material für eine Kennzahl bei anzugebender Stra
    EXPORTING
         ANZ_MAT_ABS_A = lv_anz_mat_abs_a
         K_WERT_ABS_FLAG = lv_k_wert_abs_flag
         K_WERT_PROZ_A = lv_k_wert_proz_a
         K_WERT_PROZ_B = lv_k_wert_proz_b
         K_WERT_PROZ_C = lv_k_wert_proz_c
         K_WERT_PROZ_FLAG = lv_k_wert_proz_flag
         WERKS_UEBERGREIFEND = lv_werks_uebergreifend
         ANZ_MAT_ABS_B = lv_anz_mat_abs_b
         ANZ_MAT_ABS_FLAG = lv_anz_mat_abs_flag
         ANZ_MAT_PROZ_A = lv_anz_mat_proz_a
         ANZ_MAT_PROZ_B = lv_anz_mat_proz_b
         ANZ_MAT_PROZ_C = lv_anz_mat_proz_c
         ANZ_MAT_PROZ_FLAG = lv_anz_mat_proz_flag
         K_WERT_ABS_A = lv_k_wert_abs_a
         K_WERT_ABS_B = lv_k_wert_abs_b
    TABLES
         WERTE = lt_werte
    EXCEPTIONS
        PROZENTSUMME_NICHT_100 = 1
        STRATEGIE_FEHLT = 2
        STRATEGIE_NICHT_EINDEUTIG = 3
        WERTETABELLE_LEER = 4
. " ABC_ANALYSE




ABAP code using 7.40 inline data declarations to call FM ABC_ANALYSE

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 AMABA FROM RMCB0 INTO @DATA(ld_anz_mat_abs_a).
DATA(ld_anz_mat_abs_a) = 100.
 
 
"SELECT single STAB2 FROM RMCB0 INTO @DATA(ld_k_wert_abs_flag).
DATA(ld_k_wert_abs_flag) = ' '.
 
"SELECT single AGPRA FROM RMCB0 INTO @DATA(ld_k_wert_proz_a).
DATA(ld_k_wert_proz_a) = 70.
 
"SELECT single AGPRB FROM RMCB0 INTO @DATA(ld_k_wert_proz_b).
DATA(ld_k_wert_proz_b) = 20.
 
"SELECT single AGPRC FROM RMCB0 INTO @DATA(ld_k_wert_proz_c).
DATA(ld_k_wert_proz_c) = 10.
 
"SELECT single STAB1 FROM RMCB0 INTO @DATA(ld_k_wert_proz_flag).
DATA(ld_k_wert_proz_flag) = 'X'.
 
"SELECT single STAB1 FROM RMCB0 INTO @DATA(ld_werks_uebergreifend).
DATA(ld_werks_uebergreifend) = ' '.
 
"SELECT single AMABB FROM RMCB0 INTO @DATA(ld_anz_mat_abs_b).
DATA(ld_anz_mat_abs_b) = 500.
 
 
"SELECT single STAB4 FROM RMCB0 INTO @DATA(ld_anz_mat_abs_flag).
DATA(ld_anz_mat_abs_flag) = ' '.
 
 
"SELECT single AMPRA FROM RMCB0 INTO @DATA(ld_anz_mat_proz_a).
DATA(ld_anz_mat_proz_a) = 10.
 
 
"SELECT single AMPRB FROM RMCB0 INTO @DATA(ld_anz_mat_proz_b).
DATA(ld_anz_mat_proz_b) = 20.
 
"SELECT single AMPRC FROM RMCB0 INTO @DATA(ld_anz_mat_proz_c).
DATA(ld_anz_mat_proz_c) = 70.
 
"SELECT single STAB3 FROM RMCB0 INTO @DATA(ld_anz_mat_proz_flag).
DATA(ld_anz_mat_proz_flag) = ' '.
 
"SELECT single AGABA FROM RMCB0 INTO @DATA(ld_k_wert_abs_a).
DATA(ld_k_wert_abs_a) = 50000.
 
"SELECT single AGABB FROM RMCB0 INTO @DATA(ld_k_wert_abs_b).
DATA(ld_k_wert_abs_b) = 5000.
 


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!