WB2_SO_VARIANCE_CANCEL 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_SO_VARIANCE_CANCEL into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
WB2_VARIANCE_CALC_FUNC
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'WB2_SO_VARIANCE_CANCEL' "
EXPORTING
i_doc_type = " wb2_doc_type
i_doc_number = " vbeln
i_item = " posnr
* i_sub_item = " posnr
* i_gjahr = " gjahr
* i_value = " wb2_complete_quan
* i_ref_value = " meins
* i_charg = " charg_d
* i_komwbgt = " komwbgt
* in_ekpo = " ekpo
* in_goitem = " goitem
* in_lips = " lipsvb
* in_vbap = " vbapvb
* in_vbrp = " vbrpvb
* i_doc_pred_doc = " wb2_doc_pred_doc
IMPORTING
s_variance = " wb2_complete_quan
s_vari_uom = " meins
p_variance = " wb2_complete_quan
p_vari_uom = " meins
send_compl = " wb2_send_completion
EXCEPTIONS
DOCUMENT_ERROR = 1 "
UNLIMITED_FLAG_IS_NOT_SET = 2 "
DELIVERY_COMP_FLAG_IS_NOT_SET = 3 "
VOLUME_IS_NOT_FULLY_ASSOCIATED = 4 "
CAN_NOT_GET_CURRENT_VOLUME = 5 "
. " WB2_SO_VARIANCE_CANCEL
The ABAP code below is a full code listing to execute function module WB2_SO_VARIANCE_CANCEL 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).
| ld_s_variance | TYPE WB2_COMPLETE_QUAN , |
| ld_s_vari_uom | TYPE MEINS , |
| ld_p_variance | TYPE WB2_COMPLETE_QUAN , |
| ld_p_vari_uom | TYPE MEINS , |
| ld_send_compl | TYPE WB2_SEND_COMPLETION . |
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_s_variance | TYPE WB2_COMPLETE_QUAN , |
| ld_i_doc_type | TYPE WB2_DOC_TYPE , |
| ld_s_vari_uom | TYPE MEINS , |
| ld_i_doc_number | TYPE VBELN , |
| ld_p_variance | TYPE WB2_COMPLETE_QUAN , |
| ld_i_item | TYPE POSNR , |
| ld_p_vari_uom | TYPE MEINS , |
| ld_i_sub_item | TYPE POSNR , |
| ld_send_compl | TYPE WB2_SEND_COMPLETION , |
| ld_i_gjahr | TYPE GJAHR , |
| ld_i_value | TYPE WB2_COMPLETE_QUAN , |
| ld_i_ref_value | TYPE MEINS , |
| ld_i_charg | TYPE CHARG_D , |
| ld_i_komwbgt | TYPE KOMWBGT , |
| ld_in_ekpo | TYPE EKPO , |
| ld_in_goitem | TYPE GOITEM , |
| ld_in_lips | TYPE LIPSVB , |
| ld_in_vbap | TYPE VBAPVB , |
| ld_in_vbrp | TYPE VBRPVB , |
| ld_i_doc_pred_doc | TYPE WB2_DOC_PRED_DOC . |
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_SO_VARIANCE_CANCEL or its description.