SAP Function Modules

VBWS_UOM_SPECIAL_CHECK SAP Function module







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

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


Pattern for FM VBWS_UOM_SPECIAL_CHECK - VBWS UOM SPECIAL CHECK





CALL FUNCTION 'VBWS_UOM_SPECIAL_CHECK' "
  EXPORTING
*   i_kzwsm =                   " mara-kzwsm
    i_mara =                    " mara
*   i_marc =                    " marc
*   i_mard =                    " mard
*   i_mlgn =                    " mlgn
*   i_mvke =                    " mvke
*   i_cl_from_buffer = ' '      " am07m-xselk
*   i_exit_by_first_error = 'X'  " am07m-xselk
*   i_list_errors_only = SPACE  " am07m-xselk
*   i_dialogue = SPACE          " am07m-xselk
  IMPORTING
    e_value_update =            " am07m-xselk
  TABLES
    i_meinh_ws_old =            " smeinh_ws
    c_meinh_ws =                " smeinh_ws
*   c_mean =                    " meani
*   c_mlea =                    " mlea
*   i_ptab =                    " sptap
*   e_message =                 " matmess
*   e_message_uom =             " mws_mess
*   e_value =                   " api_value
* CHANGING
*   c_buffer_refresh = 'X'      " mtcom-kzrfb
*   c_classification_update = 'X'  " am07m-xselk
  EXCEPTIONS
    ERROR = 1                   "
    ERROR_AND_EXIT = 2          "
    .  "  VBWS_UOM_SPECIAL_CHECK

ABAP code example for Function Module VBWS_UOM_SPECIAL_CHECK





The ABAP code below is a full code listing to execute function module VBWS_UOM_SPECIAL_CHECK 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_e_value_update  TYPE AM07M-XSELK ,
it_i_meinh_ws_old  TYPE STANDARD TABLE OF SMEINH_WS,"TABLES PARAM
wa_i_meinh_ws_old  LIKE LINE OF it_i_meinh_ws_old ,
it_c_meinh_ws  TYPE STANDARD TABLE OF SMEINH_WS,"TABLES PARAM
wa_c_meinh_ws  LIKE LINE OF it_c_meinh_ws ,
it_c_mean  TYPE STANDARD TABLE OF MEANI,"TABLES PARAM
wa_c_mean  LIKE LINE OF it_c_mean ,
it_c_mlea  TYPE STANDARD TABLE OF MLEA,"TABLES PARAM
wa_c_mlea  LIKE LINE OF it_c_mlea ,
it_i_ptab  TYPE STANDARD TABLE OF SPTAP,"TABLES PARAM
wa_i_ptab  LIKE LINE OF it_i_ptab ,
it_e_message  TYPE STANDARD TABLE OF MATMESS,"TABLES PARAM
wa_e_message  LIKE LINE OF it_e_message ,
it_e_message_uom  TYPE STANDARD TABLE OF MWS_MESS,"TABLES PARAM
wa_e_message_uom  LIKE LINE OF it_e_message_uom ,
it_e_value  TYPE STANDARD TABLE OF API_VALUE,"TABLES PARAM
wa_e_value  LIKE LINE OF it_e_value .


DATA(ld_c_buffer_refresh) = some text here

DATA(ld_c_classification_update) = some text here

SELECT single KZWSM
FROM MARA
INTO @DATA(ld_i_kzwsm).

DATA(ld_i_mara) = 'Check type of data required'.
DATA(ld_i_marc) = 'Check type of data required'.
DATA(ld_i_mard) = 'Check type of data required'.
DATA(ld_i_mlgn) = 'Check type of data required'.
DATA(ld_i_mvke) = 'Check type of data required'.

DATA(ld_i_cl_from_buffer) = some text here

DATA(ld_i_exit_by_first_error) = some text here

DATA(ld_i_list_errors_only) = some text here

DATA(ld_i_dialogue) = some text here

"populate fields of struture and append to itab
append wa_i_meinh_ws_old to it_i_meinh_ws_old.

"populate fields of struture and append to itab
append wa_c_meinh_ws to it_c_meinh_ws.

"populate fields of struture and append to itab
append wa_c_mean to it_c_mean.

"populate fields of struture and append to itab
append wa_c_mlea to it_c_mlea.

"populate fields of struture and append to itab
append wa_i_ptab to it_i_ptab.

"populate fields of struture and append to itab
append wa_e_message to it_e_message.

"populate fields of struture and append to itab
append wa_e_message_uom to it_e_message_uom.

"populate fields of struture and append to itab
append wa_e_value to it_e_value. . CALL FUNCTION 'VBWS_UOM_SPECIAL_CHECK' EXPORTING * i_kzwsm = ld_i_kzwsm i_mara = ld_i_mara * i_marc = ld_i_marc * i_mard = ld_i_mard * i_mlgn = ld_i_mlgn * i_mvke = ld_i_mvke * i_cl_from_buffer = ld_i_cl_from_buffer * i_exit_by_first_error = ld_i_exit_by_first_error * i_list_errors_only = ld_i_list_errors_only * i_dialogue = ld_i_dialogue IMPORTING e_value_update = ld_e_value_update TABLES i_meinh_ws_old = it_i_meinh_ws_old c_meinh_ws = it_c_meinh_ws * c_mean = it_c_mean * c_mlea = it_c_mlea * i_ptab = it_i_ptab * e_message = it_e_message * e_message_uom = it_e_message_uom * e_value = it_e_value * CHANGING * c_buffer_refresh = ld_c_buffer_refresh * c_classification_update = ld_c_classification_update EXCEPTIONS ERROR = 1 ERROR_AND_EXIT = 2 . " VBWS_UOM_SPECIAL_CHECK
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_c_buffer_refresh  TYPE MTCOM-KZRFB ,
ld_e_value_update  TYPE AM07M-XSELK ,
ld_i_kzwsm  TYPE MARA-KZWSM ,
it_i_meinh_ws_old  TYPE STANDARD TABLE OF SMEINH_WS ,
wa_i_meinh_ws_old  LIKE LINE OF it_i_meinh_ws_old,
ld_c_classification_update  TYPE AM07M-XSELK ,
ld_i_mara  TYPE MARA ,
it_c_meinh_ws  TYPE STANDARD TABLE OF SMEINH_WS ,
wa_c_meinh_ws  LIKE LINE OF it_c_meinh_ws,
ld_i_marc  TYPE MARC ,
it_c_mean  TYPE STANDARD TABLE OF MEANI ,
wa_c_mean  LIKE LINE OF it_c_mean,
ld_i_mard  TYPE MARD ,
it_c_mlea  TYPE STANDARD TABLE OF MLEA ,
wa_c_mlea  LIKE LINE OF it_c_mlea,
ld_i_mlgn  TYPE MLGN ,
it_i_ptab  TYPE STANDARD TABLE OF SPTAP ,
wa_i_ptab  LIKE LINE OF it_i_ptab,
ld_i_mvke  TYPE MVKE ,
it_e_message  TYPE STANDARD TABLE OF MATMESS ,
wa_e_message  LIKE LINE OF it_e_message,
ld_i_cl_from_buffer  TYPE AM07M-XSELK ,
it_e_message_uom  TYPE STANDARD TABLE OF MWS_MESS ,
wa_e_message_uom  LIKE LINE OF it_e_message_uom,
ld_i_exit_by_first_error  TYPE AM07M-XSELK ,
it_e_value  TYPE STANDARD TABLE OF API_VALUE ,
wa_e_value  LIKE LINE OF it_e_value,
ld_i_list_errors_only  TYPE AM07M-XSELK ,
ld_i_dialogue  TYPE AM07M-XSELK .


ld_c_buffer_refresh = some text here

SELECT single KZWSM
FROM MARA
INTO ld_i_kzwsm.


"populate fields of struture and append to itab
append wa_i_meinh_ws_old to it_i_meinh_ws_old.

ld_c_classification_update = some text here
ld_i_mara = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_c_meinh_ws to it_c_meinh_ws.
ld_i_marc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_c_mean to it_c_mean.
ld_i_mard = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_c_mlea to it_c_mlea.
ld_i_mlgn = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_ptab to it_i_ptab.
ld_i_mvke = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_message to it_e_message.

ld_i_cl_from_buffer = some text here

"populate fields of struture and append to itab
append wa_e_message_uom to it_e_message_uom.

ld_i_exit_by_first_error = some text here

"populate fields of struture and append to itab
append wa_e_value to it_e_value.

ld_i_list_errors_only = some text here

ld_i_dialogue = 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_UOM_SPECIAL_CHECK or its description.