SAP VBWS_BATCH_VALUATION_GET Function Module for NOTRANSL: Ermittlung der Bewertung einer Charge bei variablen ME









VBWS_BATCH_VALUATION_GET is a standard vbws batch valuation get 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: Ermittlung der Bewertung einer Charge bei variablen ME 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 vbws batch valuation get FM, simply by entering the name VBWS_BATCH_VALUATION_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function VBWS_BATCH_VALUATION_GET 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 'VBWS_BATCH_VALUATION_GET'"NOTRANSL: Ermittlung der Bewertung einer Charge bei variablen ME
EXPORTING
I_MATNR = "
* I_POSNR = "Item Number of the SD Document
* I_PSPNR = "Work Breakdown Structure Element (WBS Element)
I_WERKS = "
* I_BWKEY = "
* I_CHARG = "
* I_MENGE = "
* I_MEINS = "
* I_CHARG_CUOBJ = "
* I_SOBKZ = "Special Stock Indicator
* I_VBELN = "Sales and Distribution Document Number

IMPORTING
E_EXBWR = "
E_STPRS = "

EXCEPTIONS
NO_MATERIAL = 1 NO_PLANT = 2 NO_VALUATION_AREA = 3 NO_VARIABLE_VALUATION = 4 NO_SINGLE_VALUATION = 5 NO_MASTER_VALUATION = 6
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLMWSB_001 Activate Workaround: Factory Output

IMPORTING Parameters details for VBWS_BATCH_VALUATION_GET

I_MATNR -

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

I_POSNR - Item Number of the SD Document

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

I_PSPNR - Work Breakdown Structure Element (WBS Element)

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

I_WERKS -

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

I_BWKEY -

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

I_CHARG -

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

I_MENGE -

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

I_MEINS -

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

I_CHARG_CUOBJ -

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

I_SOBKZ - Special Stock Indicator

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

I_VBELN - Sales and Distribution Document Number

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

EXPORTING Parameters details for VBWS_BATCH_VALUATION_GET

E_EXBWR -

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

E_STPRS -

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

EXCEPTIONS details

NO_MATERIAL -

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

NO_PLANT -

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

NO_VALUATION_AREA -

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

NO_VARIABLE_VALUATION -

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

NO_SINGLE_VALUATION -

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

NO_MASTER_VALUATION -

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

Copy and paste ABAP code example for VBWS_BATCH_VALUATION_GET 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_e_exbwr  TYPE MSEG-EXBWR, "   
lv_i_matnr  TYPE MARA-MATNR, "   
lv_no_material  TYPE MARA, "   
lv_i_posnr  TYPE EBEW-POSNR, "   
lv_i_pspnr  TYPE QBEW-PSPNR, "   
lv_e_stprs  TYPE WBEW-STPRS, "   
lv_i_werks  TYPE MARC-WERKS, "   
lv_no_plant  TYPE MARC, "   
lv_i_bwkey  TYPE MBEW-BWKEY, "   
lv_no_valuation_area  TYPE MBEW, "   
lv_i_charg  TYPE MCHA-CHARG, "   
lv_no_variable_valuation  TYPE MCHA, "   
lv_i_menge  TYPE MSEG-MENGE, "   
lv_no_single_valuation  TYPE MSEG, "   
lv_i_meins  TYPE MSEG-MEINS, "   
lv_no_master_valuation  TYPE MSEG, "   
lv_i_charg_cuobj  TYPE INOB-CUOBJ, "   
lv_i_sobkz  TYPE EBEW-SOBKZ, "   
lv_i_vbeln  TYPE EBEW-VBELN. "   

  CALL FUNCTION 'VBWS_BATCH_VALUATION_GET'  "NOTRANSL: Ermittlung der Bewertung einer Charge bei variablen ME
    EXPORTING
         I_MATNR = lv_i_matnr
         I_POSNR = lv_i_posnr
         I_PSPNR = lv_i_pspnr
         I_WERKS = lv_i_werks
         I_BWKEY = lv_i_bwkey
         I_CHARG = lv_i_charg
         I_MENGE = lv_i_menge
         I_MEINS = lv_i_meins
         I_CHARG_CUOBJ = lv_i_charg_cuobj
         I_SOBKZ = lv_i_sobkz
         I_VBELN = lv_i_vbeln
    IMPORTING
         E_EXBWR = lv_e_exbwr
         E_STPRS = lv_e_stprs
    EXCEPTIONS
        NO_MATERIAL = 1
        NO_PLANT = 2
        NO_VALUATION_AREA = 3
        NO_VARIABLE_VALUATION = 4
        NO_SINGLE_VALUATION = 5
        NO_MASTER_VALUATION = 6
. " VBWS_BATCH_VALUATION_GET




ABAP code using 7.40 inline data declarations to call FM VBWS_BATCH_VALUATION_GET

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 EXBWR FROM MSEG INTO @DATA(ld_e_exbwr).
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_i_matnr).
 
 
"SELECT single POSNR FROM EBEW INTO @DATA(ld_i_posnr).
 
"SELECT single PSPNR FROM QBEW INTO @DATA(ld_i_pspnr).
 
"SELECT single STPRS FROM WBEW INTO @DATA(ld_e_stprs).
 
"SELECT single WERKS FROM MARC INTO @DATA(ld_i_werks).
 
 
"SELECT single BWKEY FROM MBEW INTO @DATA(ld_i_bwkey).
 
 
"SELECT single CHARG FROM MCHA INTO @DATA(ld_i_charg).
 
 
"SELECT single MENGE FROM MSEG INTO @DATA(ld_i_menge).
 
 
"SELECT single MEINS FROM MSEG INTO @DATA(ld_i_meins).
 
 
"SELECT single CUOBJ FROM INOB INTO @DATA(ld_i_charg_cuobj).
 
"SELECT single SOBKZ FROM EBEW INTO @DATA(ld_i_sobkz).
 
"SELECT single VBELN FROM EBEW INTO @DATA(ld_i_vbeln).
 


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!