SAP Function Modules

VBWS_BATCH_VALUATION_CHANGE_UD SAP Function module







VBWS_BATCH_VALUATION_CHANGE_UD 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 VBWS_BATCH_VALUATION_CHANGE_UD into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MWSB
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM VBWS_BATCH_VALUATION_CHANGE_UD - VBWS BATCH VALUATION CHANGE UD





CALL FUNCTION 'VBWS_BATCH_VALUATION_CHANGE_UD' "
  EXPORTING
    i_matnr =                   " mara-matnr
    i_werks =                   " marc-werks
    i_charg =                   " mcha-charg
*   i_qplos =                   " qals-prueflos  Inspection Lot Number
*   bypass_post = SPACE         " am07m-xselk
* TABLES
*   e_imseg =                   " imseg         MMIM: Input Structure for General FM to Post Goods Movement
  EXCEPTIONS
    NO_MATERIAL = 1             "
    NO_PLANT = 2                "
    NO_BATCH = 3                "
    NO_VALUATION_AREA = 4       "
    NO_VARIABLE_VALUATION = 5   "
    ERROR_FI_POSTING = 6        "
    .  "  VBWS_BATCH_VALUATION_CHANGE_UD

ABAP code example for Function Module VBWS_BATCH_VALUATION_CHANGE_UD





The ABAP code below is a full code listing to execute function module VBWS_BATCH_VALUATION_CHANGE_UD 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:
it_e_imseg  TYPE STANDARD TABLE OF IMSEG,"TABLES PARAM
wa_e_imseg  LIKE LINE OF it_e_imseg .


SELECT single MATNR
FROM MARA
INTO @DATA(ld_i_matnr).


SELECT single WERKS
FROM MARC
INTO @DATA(ld_i_werks).


SELECT single CHARG
FROM MCHA
INTO @DATA(ld_i_charg).


SELECT single PRUEFLOS
FROM QALS
INTO @DATA(ld_i_qplos).


DATA(ld_bypass_post) = some text here

"populate fields of struture and append to itab
append wa_e_imseg to it_e_imseg. . CALL FUNCTION 'VBWS_BATCH_VALUATION_CHANGE_UD' EXPORTING i_matnr = ld_i_matnr i_werks = ld_i_werks i_charg = ld_i_charg * i_qplos = ld_i_qplos * bypass_post = ld_bypass_post * TABLES * e_imseg = it_e_imseg EXCEPTIONS NO_MATERIAL = 1 NO_PLANT = 2 NO_BATCH = 3 NO_VALUATION_AREA = 4 NO_VARIABLE_VALUATION = 5 ERROR_FI_POSTING = 6 . " VBWS_BATCH_VALUATION_CHANGE_UD
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_i_matnr  TYPE MARA-MATNR ,
it_e_imseg  TYPE STANDARD TABLE OF IMSEG ,
wa_e_imseg  LIKE LINE OF it_e_imseg,
ld_i_werks  TYPE MARC-WERKS ,
ld_i_charg  TYPE MCHA-CHARG ,
ld_i_qplos  TYPE QALS-PRUEFLOS ,
ld_bypass_post  TYPE AM07M-XSELK .


SELECT single MATNR
FROM MARA
INTO ld_i_matnr.


"populate fields of struture and append to itab
append wa_e_imseg to it_e_imseg.

SELECT single WERKS
FROM MARC
INTO ld_i_werks.


SELECT single CHARG
FROM MCHA
INTO ld_i_charg.


SELECT single PRUEFLOS
FROM QALS
INTO ld_i_qplos.


ld_bypass_post = some text here

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 VBWS_BATCH_VALUATION_CHANGE_UD or its description.