SAP VERBRAUCH_BCO Function Module for NOTRANSL: Lesen des Verbrauches in Abhängigkeit von der Kennzahl









VERBRAUCH_BCO is a standard verbrauch bco 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: Lesen des Verbrauches in Abhängigkeit von der Kennzahl 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 bco FM, simply by entering the name VERBRAUCH_BCO 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 VERBRAUCH_BCO 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_BCO'"NOTRANSL: Lesen des Verbrauches in Abhängigkeit von der Kennzahl
EXPORTING
FLG_KZ = "
* FLG_VERBR = ' ' "
* FLG_PROGN = ' ' "Analysis based on requirement/usage values
VONDATUM = "
BISDATUM = "
* FLG_DISPOVERBR = ' ' "Screens, display user entry

TABLES
WERTETABELLE = "
* GESVERBRAUCH = "
* BERID_RANGE = "Range for MRP Areas
.



IMPORTING Parameters details for VERBRAUCH_BCO

FLG_KZ -

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

FLG_VERBR -

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

FLG_PROGN - Analysis based on requirement/usage values

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

VONDATUM -

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

BISDATUM -

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

FLG_DISPOVERBR - Screens, display user entry

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

TABLES Parameters details for VERBRAUCH_BCO

WERTETABELLE -

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

GESVERBRAUCH -

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

BERID_RANGE - Range for MRP Areas

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

Copy and paste ABAP code example for VERBRAUCH_BCO 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_flg_kz  TYPE SY-DATAR, "   
lt_wertetabelle  TYPE STANDARD TABLE OF BCO_WERTE, "   
lv_flg_verbr  TYPE SY-DATAR, "   SPACE
lt_gesverbrauch  TYPE STANDARD TABLE OF BCO_WERTE, "   
lv_flg_progn  TYPE C, "   SPACE
lt_berid_range  TYPE STANDARD TABLE OF BERID_RANGE, "   
lv_vondatum  TYPE SY-DATUM, "   
lv_bisdatum  TYPE SY-DATUM, "   
lv_flg_dispoverbr  TYPE SY-DATAR. "   SPACE

  CALL FUNCTION 'VERBRAUCH_BCO'  "NOTRANSL: Lesen des Verbrauches in Abhängigkeit von der Kennzahl
    EXPORTING
         FLG_KZ = lv_flg_kz
         FLG_VERBR = lv_flg_verbr
         FLG_PROGN = lv_flg_progn
         VONDATUM = lv_vondatum
         BISDATUM = lv_bisdatum
         FLG_DISPOVERBR = lv_flg_dispoverbr
    TABLES
         WERTETABELLE = lt_wertetabelle
         GESVERBRAUCH = lt_gesverbrauch
         BERID_RANGE = lt_berid_range
. " VERBRAUCH_BCO




ABAP code using 7.40 inline data declarations to call FM VERBRAUCH_BCO

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 DATAR FROM SY INTO @DATA(ld_flg_kz).
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_flg_verbr).
DATA(ld_flg_verbr) = ' '.
 
 
DATA(ld_flg_progn) = ' '.
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_vondatum).
 
"SELECT single DATUM FROM SY INTO @DATA(ld_bisdatum).
 
"SELECT single DATAR FROM SY INTO @DATA(ld_flg_dispoverbr).
DATA(ld_flg_dispoverbr) = ' '.
 


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!