SAP Function Modules

WB2_FIX_WBGT_FOR_MD SAP Function module - Correct WBGT for Material Documents







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

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


Pattern for FM WB2_FIX_WBGT_FOR_MD - WB2 FIX WBGT FOR MD





CALL FUNCTION 'WB2_FIX_WBGT_FOR_MD' "Correct WBGT for Material Documents
  EXPORTING
    it_mblnr =                  " wb2_material_key_stab  Key for Material Documents
    i_size =                    " i             Package Size
    i_display =                 " bval          Display Log
    i_test = 'X'                " bval          Test run only
    i_with_bw = ' '             " bval          mit BW-Versorgung
    i_detail_log = 'X'          " bval          Detailed Display
  IMPORTING
    e_handle =                  " balloghndl    Application Log: Log Handle
  EXCEPTIONS
    INTERNAL_ERROR = 1          "               Internal Error
    .  "  WB2_FIX_WBGT_FOR_MD

ABAP code example for Function Module WB2_FIX_WBGT_FOR_MD





The ABAP code below is a full code listing to execute function module WB2_FIX_WBGT_FOR_MD 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_handle  TYPE BALLOGHNDL .

DATA(ld_it_mblnr) = 'Check type of data required'.
DATA(ld_i_size) = 'Check type of data required'.
DATA(ld_i_display) = 'Check type of data required'.
DATA(ld_i_test) = 'Check type of data required'.
DATA(ld_i_with_bw) = 'Check type of data required'.
DATA(ld_i_detail_log) = 'Check type of data required'. . CALL FUNCTION 'WB2_FIX_WBGT_FOR_MD' EXPORTING it_mblnr = ld_it_mblnr i_size = ld_i_size i_display = ld_i_display i_test = ld_i_test i_with_bw = ld_i_with_bw i_detail_log = ld_i_detail_log IMPORTING e_handle = ld_e_handle EXCEPTIONS INTERNAL_ERROR = 1 . " WB2_FIX_WBGT_FOR_MD
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_e_handle  TYPE BALLOGHNDL ,
ld_it_mblnr  TYPE WB2_MATERIAL_KEY_STAB ,
ld_i_size  TYPE I ,
ld_i_display  TYPE BVAL ,
ld_i_test  TYPE BVAL ,
ld_i_with_bw  TYPE BVAL ,
ld_i_detail_log  TYPE BVAL .

ld_it_mblnr = 'Check type of data required'.
ld_i_size = 'Check type of data required'.
ld_i_display = 'Check type of data required'.
ld_i_test = 'Check type of data required'.
ld_i_with_bw = 'Check type of data required'.
ld_i_detail_log = 'Check type of data required'.

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