SAP Function Modules

MBEW_VJBKL SAP Function module







MBEW_VJBKL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name MBEW_VJBKL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MG11
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM MBEW_VJBKL - MBEW VJBKL





CALL FUNCTION 'MBEW_VJBKL' "
  EXPORTING
    wmbew_vjbkl =               " mbew-vjbkl    Valuation class
    wmbew_vjsal =               " mbew-vjsal    Stock value
    wmbew_bwkey =               " mbew-bwkey    Valuation area
    wmbew_bwtar =               " mbew-bwtar    Valuation type
    wmbew_bwtty =               " mbew-bwtty    Valuation category
    lmbew_vjbkl =               " mbew-vjbkl    Save field for valuation class
    ombew_vjbkl =               " mbew-vjbkl    Valuation class from YMBEW
*   wmbew_matnr =               " rmmg1-matnr
*   wmara_attyp = SPACE         " mara-attyp
    wrmmg1_mtart =              " rmmg1-mtart   Material type
    p_aktyp =                   " t130m-aktyp   Activity Type
*   p_message = SPACE           " rmmg08_012-msgtyp
*   flg_uebernahme = SPACE      " t130f-kzref
*   ombew_mlast = SPACE         " mbew-mlast    Material Price Determination: Control
  IMPORTING
    wmbew_vjbkl =               " mbew-vjbkl    Valuation class
    p_ps_bklas =                " rmmzu-ps_bklas
  EXCEPTIONS
    NO_VJBKL = 1                "               Valuation class cannot be determined
    ERROR_BKLAS = 2             "
    .  "  MBEW_VJBKL

ABAP code example for Function Module MBEW_VJBKL





The ABAP code below is a full code listing to execute function module MBEW_VJBKL including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_wmbew_vjbkl  TYPE MBEW-VJBKL ,
ld_p_ps_bklas  TYPE RMMZU-PS_BKLAS .


SELECT single VJBKL
FROM MBEW
INTO @DATA(ld_wmbew_vjbkl).


SELECT single VJSAL
FROM MBEW
INTO @DATA(ld_wmbew_vjsal).


SELECT single BWKEY
FROM MBEW
INTO @DATA(ld_wmbew_bwkey).


SELECT single BWTAR
FROM MBEW
INTO @DATA(ld_wmbew_bwtar).


SELECT single BWTTY
FROM MBEW
INTO @DATA(ld_wmbew_bwtty).


SELECT single VJBKL
FROM MBEW
INTO @DATA(ld_lmbew_vjbkl).


SELECT single VJBKL
FROM MBEW
INTO @DATA(ld_ombew_vjbkl).


DATA(ld_wmbew_matnr) = some text here

SELECT single ATTYP
FROM MARA
INTO @DATA(ld_wmara_attyp).


DATA(ld_wrmmg1_mtart) = some text here

SELECT single AKTYP
FROM T130M
INTO @DATA(ld_p_aktyp).


DATA(ld_p_message) = some text here

SELECT single KZREF
FROM T130F
INTO @DATA(ld_flg_uebernahme).


SELECT single MLAST
FROM MBEW
INTO @DATA(ld_ombew_mlast).
. CALL FUNCTION 'MBEW_VJBKL' EXPORTING wmbew_vjbkl = ld_wmbew_vjbkl wmbew_vjsal = ld_wmbew_vjsal wmbew_bwkey = ld_wmbew_bwkey wmbew_bwtar = ld_wmbew_bwtar wmbew_bwtty = ld_wmbew_bwtty lmbew_vjbkl = ld_lmbew_vjbkl ombew_vjbkl = ld_ombew_vjbkl * wmbew_matnr = ld_wmbew_matnr * wmara_attyp = ld_wmara_attyp wrmmg1_mtart = ld_wrmmg1_mtart p_aktyp = ld_p_aktyp * p_message = ld_p_message * flg_uebernahme = ld_flg_uebernahme * ombew_mlast = ld_ombew_mlast IMPORTING wmbew_vjbkl = ld_wmbew_vjbkl p_ps_bklas = ld_p_ps_bklas EXCEPTIONS NO_VJBKL = 1 ERROR_BKLAS = 2 . " MBEW_VJBKL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_wmbew_vjbkl  TYPE MBEW-VJBKL ,
ld_wmbew_vjbkl  TYPE MBEW-VJBKL ,
ld_p_ps_bklas  TYPE RMMZU-PS_BKLAS ,
ld_wmbew_vjsal  TYPE MBEW-VJSAL ,
ld_wmbew_bwkey  TYPE MBEW-BWKEY ,
ld_wmbew_bwtar  TYPE MBEW-BWTAR ,
ld_wmbew_bwtty  TYPE MBEW-BWTTY ,
ld_lmbew_vjbkl  TYPE MBEW-VJBKL ,
ld_ombew_vjbkl  TYPE MBEW-VJBKL ,
ld_wmbew_matnr  TYPE RMMG1-MATNR ,
ld_wmara_attyp  TYPE MARA-ATTYP ,
ld_wrmmg1_mtart  TYPE RMMG1-MTART ,
ld_p_aktyp  TYPE T130M-AKTYP ,
ld_p_message  TYPE RMMG08_012-MSGTYP ,
ld_flg_uebernahme  TYPE T130F-KZREF ,
ld_ombew_mlast  TYPE MBEW-MLAST .


SELECT single VJBKL
FROM MBEW
INTO ld_wmbew_vjbkl.


SELECT single VJSAL
FROM MBEW
INTO ld_wmbew_vjsal.


SELECT single BWKEY
FROM MBEW
INTO ld_wmbew_bwkey.


SELECT single BWTAR
FROM MBEW
INTO ld_wmbew_bwtar.


SELECT single BWTTY
FROM MBEW
INTO ld_wmbew_bwtty.


SELECT single VJBKL
FROM MBEW
INTO ld_lmbew_vjbkl.


SELECT single VJBKL
FROM MBEW
INTO ld_ombew_vjbkl.


ld_wmbew_matnr = some text here

SELECT single ATTYP
FROM MARA
INTO ld_wmara_attyp.


ld_wrmmg1_mtart = some text here

SELECT single AKTYP
FROM T130M
INTO ld_p_aktyp.


ld_p_message = some text here

SELECT single KZREF
FROM T130F
INTO ld_flg_uebernahme.


SELECT single MLAST
FROM MBEW
INTO ld_ombew_mlast.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name MBEW_VJBKL or its description.