SAP VERBRAUCH_SUMMIEREN Function Module for NOTRANSL: Addieren der Verbräuche ausgehend von einem ABDATUM bis zu einem









VERBRAUCH_SUMMIEREN is a standard verbrauch summieren 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: Addieren der Verbräuche ausgehend von einem ABDATUM bis zu einem 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 verbrauch summieren FM, simply by entering the name VERBRAUCH_SUMMIEREN into the relevant SAP transaction such as SE37 or SE38.

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



Function VERBRAUCH_SUMMIEREN 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 'VERBRAUCH_SUMMIEREN'"NOTRANSL: Addieren der Verbräuche ausgehend von einem ABDATUM bis zu einem
EXPORTING
* ABDATUM = '19000101' "Date (YYYYMMDD) as of which the co
* BISDATUM = SY-DATUM "Date (YYYYMMDD) up to which the co
* FLAG_UNGEPLANT = ' ' "
MATNR = "Material number
PERIV = "
* PERKZ = 'M' "Period indicator
WERKS = "Plant

IMPORTING
GESAMTVERBRAUCH = "Correcting the total consumption a
T_ABDATUM = "T_ABDATUM for logistics controllin
T_BISDATUM = "T_BISDATUM for logistics controlli

EXCEPTIONS
ABDATUM_GREATER_BISDATUM = 1 BISDATUM_IN_FUTURE = 2 CALENDAR_NOT_COMPLETE = 3 CONSUMPTION_NOT_FOUND = 4 FV_NOT_FOUND = 5 FV_PERIOD_ERROR = 6 NO_MATERIAL = 7 NO_PLANT = 8
.



IMPORTING Parameters details for VERBRAUCH_SUMMIEREN

ABDATUM - Date (YYYYMMDD) as of which the co

Data type: SY-DATUM
Default: '19000101'
Optional: Yes
Call by Reference: No ( called with pass by value option)

BISDATUM - Date (YYYYMMDD) up to which the co

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLAG_UNGEPLANT -

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

MATNR - Material number

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

PERIV -

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

PERKZ - Period indicator

Data type: MARC-PERKZ
Default: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WERKS - Plant

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

EXPORTING Parameters details for VERBRAUCH_SUMMIEREN

GESAMTVERBRAUCH - Correcting the total consumption a

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

T_ABDATUM - T_ABDATUM for logistics controllin

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

T_BISDATUM - T_BISDATUM for logistics controlli

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

EXCEPTIONS details

ABDATUM_GREATER_BISDATUM - The ABDATUM comes after the BISDAT

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

BISDATUM_IN_FUTURE - The BISDATUM is in the future.

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

CALENDAR_NOT_COMPLETE - Factory calendar not ( completely

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

CONSUMPTION_NOT_FOUND - No consumption values are availabl

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

FV_NOT_FOUND - Fiscal year variant does not exist

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

FV_PERIOD_ERROR - Periods of fiscal year variant are incorrect

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

NO_MATERIAL - No material specified.

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

NO_PLANT - No plant specified.

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

Copy and paste ABAP code example for VERBRAUCH_SUMMIEREN 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:
lv_abdatum  TYPE SY-DATUM, "   '19000101'
lv_gesamtverbrauch  TYPE SY, "   
lv_abdatum_greater_bisdatum  TYPE SY, "   
lv_bisdatum  TYPE SY-DATUM, "   SY-DATUM
lv_t_abdatum  TYPE SY-DATUM, "   
lv_bisdatum_in_future  TYPE SY, "   
lv_t_bisdatum  TYPE SY-DATUM, "   
lv_flag_ungeplant  TYPE T130F-KZREF, "   SPACE
lv_calendar_not_complete  TYPE T130F, "   
lv_matnr  TYPE MARA-MATNR, "   
lv_consumption_not_found  TYPE MARA, "   
lv_periv  TYPE MARC-PERIV, "   
lv_fv_not_found  TYPE MARC, "   
lv_perkz  TYPE MARC-PERKZ, "   'M'
lv_fv_period_error  TYPE MARC, "   
lv_werks  TYPE MARC-WERKS, "   
lv_no_material  TYPE MARC, "   
lv_no_plant  TYPE MARC. "   

  CALL FUNCTION 'VERBRAUCH_SUMMIEREN'  "NOTRANSL: Addieren der Verbräuche ausgehend von einem ABDATUM bis zu einem
    EXPORTING
         ABDATUM = lv_abdatum
         BISDATUM = lv_bisdatum
         FLAG_UNGEPLANT = lv_flag_ungeplant
         MATNR = lv_matnr
         PERIV = lv_periv
         PERKZ = lv_perkz
         WERKS = lv_werks
    IMPORTING
         GESAMTVERBRAUCH = lv_gesamtverbrauch
         T_ABDATUM = lv_t_abdatum
         T_BISDATUM = lv_t_bisdatum
    EXCEPTIONS
        ABDATUM_GREATER_BISDATUM = 1
        BISDATUM_IN_FUTURE = 2
        CALENDAR_NOT_COMPLETE = 3
        CONSUMPTION_NOT_FOUND = 4
        FV_NOT_FOUND = 5
        FV_PERIOD_ERROR = 6
        NO_MATERIAL = 7
        NO_PLANT = 8
. " VERBRAUCH_SUMMIEREN




ABAP code using 7.40 inline data declarations to call FM VERBRAUCH_SUMMIEREN

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 SY INTO @DATA(ld_abdatum).
DATA(ld_abdatum) = '19000101'.
 
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_bisdatum).
DATA(ld_bisdatum) = SY-DATUM.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_t_abdatum).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_t_bisdatum).
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_flag_ungeplant).
DATA(ld_flag_ungeplant) = ' '.
 
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_matnr).
 
 
"SELECT single PERIV FROM MARC INTO @DATA(ld_periv).
 
 
"SELECT single PERKZ FROM MARC INTO @DATA(ld_perkz).
DATA(ld_perkz) = 'M'.
 
 
"SELECT single WERKS FROM MARC INTO @DATA(ld_werks).
 
 
 


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!