SAP Function WB2_CALCULATE_PROFIT93 - Sales discount/surcharge calculation

Parameter Reference Type Length Default Optional Text
ASSOCIATION C C 0 X
I_DOCUMENT WB2_DOCUMENT C 18 Association Management: General document number
I_DOC_TYPE WB2_DOC_TYPE C 2 Document type
I_ITEM WB2_N2M_ITEM C 10 Association Management: General item number
I_LIKP WB2_LIKP_STAB h 1272 X Delivery Header
I_LIPS WB2_LIPS_STAB h 1888 X Delivery item
I_READ_EX C C 0 '0' X
I_SIDE WB2_SIDE C 1 X Side
I_SIM_INDEX C C 0 '0' X
I_VBAK WB2_VBAK_STAB h 924 X Sales order: Header
I_VBAP WB2_VBAP_STAB h 1616 X Sales order: Item
I_VBRK WB2_VBRK_STAB h 671 X Billing: Header
I_VBRP WB2_VBRP_STAB h 1392 X Billing: Item

Parameter Reference Type Length Text
E_REF_FIELD WAERS C 5 Currency Key
E_VALUE WB2B_WERTV8 P 8 General value in status display

Parameter Reference Type Length Default Optional Text
I_BASE_CURR WAERK C 5 X Currency of sales document
I_BASE_RATE UKURS_CURR P 5 X Exchange rate
I_BASE_TYPE KURST_CURR C 4 X Currency type

Parameter Reference Length Optional Text
A_DOC_FLOW1 N2M_ITEM_QUANS 183 X N2M: Structure table: item quantities
A_DOC_FLOW2 N2M_PRED_SUCC 132 X N2M: Structure table: document relation
T_DOC_FLOW1 N2M_ITEM_QUANS 183 X N2M: Structure table: item quantities
T_DOC_FLOW2 N2M_PRED_SUCC 132 X N2M: Structure table: document relation
T_EKKO EKKO 765 X Purchase order header
T_EKPO2 EKPO 1560 X Purchase order item
T_KOMLFK KOMLFK 2036 X Communication structure: Vendor invoice header
T_KOMV KOMV 360 X Pricing Communication structure
T_KOMWBGT KOMWBGT 448 X Communication structure
T_PROFIT_ITEM WB2_PROFIT_CALC_WITH_POS2 288 X Trading Contract: Profit simulation for logistics documents
T_TPROF_SIM_TYPE TPROF_SIM_TYPE 13 X Profit simulation type
T_XKOMLFK KOMLFK 2036 X Communication structure: Vendor invoice header
T_XKOMLFP KOMLFP 1377 X Vendor invoice: invoice item
T_XKOMV KOMV 360 X Pricing Communication structure
XKOMV KOMV 360 X Pricing Communication structure
XKOMVE KOMV 360 X Pricing Communication structure

Exception Text
CALCULATION_ERROR

Functionality
This function module is used in logistics documents to calculate thesales surcharge or discount.