Professional Documents
Culture Documents
You can maintain your own routines for pricing in the R/3 System (transaction VOFM).
Specifically for the following areas:
There are also requirements for the access sequence in the R/3 System. However, this is not
supported at the moment in the CRM System.
The routines can then be entered accordingly in the pricing procedure or in the condition type.
This influences pricing and must be displayed in the CRM System accordingly. This is done by
displaying the logic for the routines in the CRM System in filter values for the Business Add-Ins
(BADIs).
You must implement all individual formulas used in the R/3 System into the CRM System
as filter values for BADIs.
The routines for the R/3 System are form routines that do not have defined interfaces.
This means that the global variables of the program to be called up are visible. BADIs are
comparable with function modules and have a fixed interface. The function methods must
therefore be individually compared.
Not all of the standard routines from the R/3 System can be displayed in the CRM
System. This is due to technical problems. Only the following routines can be
used with the CRM System.
002 Net value
004 Net value plus tax
005 KZWI1
006 KZWI2
007 KZWI3
011 Cash discount base
012 Gross weight
013 Net weight
014 Set exclusion indicator
015 Check exclusion indicator
016 Net value – XWORKD
018 No qty conversion
019 KZWI4
020 KZWI5
021 KZWI6
022 Whole number
024 1 if partial qty
025 3
026 Bollo in Fattura
027 XWORKK: Cond. deact.
002 Net value
003 Cash disc. Minus tax
004 Net value plus tax
006 Initial price
011 Profit margin
012 XWORD - XWORKE
013 Minimum value surcharge
014 Best price
015 Minimum price
016 Rounding the total
017 Rounding as per T001R
018 ContribMargn percentage
025 KZWI1 minus tax
041 Net 1 Berliner V.
042 Net 2 Berliner V.
300 Taxes from ExternSys
301 Taxes: Value 1
302 Taxes: Value 2
303 Taxes: Value 3
304 Taxes: Value 4
305 Taxes: Value 5
306 Taxes: Value 6
002 Across All Cond Typs
003 Mat. pricing group
002 Item with pricing
003 Foreign currency document
004 Cost
007 Domestic business
008 Exp/imp. business
009 Cash discount after tax
010 Plant is set
011 No material
013 Rounding as perT001R
014 Discount before tax
021 Invoice List Control
022 Inter-company
023 InvoiceList surcharge
024 Only in Billing Doc.
025 Only in rebate billing docs
052 Export II
055 Free goods pricing
057 Not FGoods w/o ret.
059 Not for BP or Ref.
When transferring data from the pricing procedure and condition type, your entries for routines
are also transferred. However, the customer-specific name space is different in the R/3 and CRM
systems:
Name space in R/3 system: Numbers from 600 (for group key from 50).
Name space in CRM system: Begins with Z or Y, after that freely-defined alphanumeric
description. The name only occurs once in the CRM system.
For this reason, Z_CUSTOMER_ is put before the number when transferring the names for
customer-specific routines.
After activating coding, you must remove the fixed point arithmetic indicator for the
condition base value, condition value and scale base value (Interface -> Double-click on
the name of the class to be implemented -> Characteristics tab page).
To define Custom Z routine in Sales and Distribution module please follow the following
steps.
o Transaction Code - VOFM (Maintain: Requirements and Formulas)
o Menu Path - Formulas Condition value.
o Go to bottom of the table control,
o Enter the routine number for Ex. 900 and some meaningful description,
o It will ask the Access key, enter the available access key. Now ABAP editor will be
opened, you can
switch off Modification Assistant from Menu EDIT Modification operation Switch off
Assistant.
o In custom routine we can use KOMP structure, where we can get the pricing value,
o To access the whole condition record, we can use structure XKOMV. But to access this
XKOMV
structure we have to define one internal table of type 'INDEXED_KOMV' and pass the
structure
XKOMV value to the new defined internal table.
o Depending upon the requirement you can refer KOMP or XKOMV structure in your
code.
o The calculated result we have to pass to XWERT field, which will be display to the
condition record.
o To activate the subroutine we have to first save the code and come out from the routine.
In Maintain:
Formulas Condition value screen, select routine to activate and select Edit menu Activate.
o After activating the custom routine, functional personwill attach thiscustom routine to
the condition
type of the pricing procedure at AltCty column.
o Function person can define one field at Subto column for condition type, which we can
use in our
custom routine.
o For ex. We require to calculate the % discount depending upon the two condition type.
To get the
condition value for the both the condition type we have to select one field at Subto
column. There are
two types of fields, one is 'Copy value to' and another one is 'Carry over value to'. One
store the
condition value whereas second store Condition rate. Depending upon the requirement
we can
select the field type. Before using theSubto field please make sure that it is not referring
to other
condition type.
o To calculate the % you have to divide or multiply by 10000 not by 100 due to SAP
current type.
This is an example of a code sample:
Code:
DATA: WORKFIELD(16) TYPE P DECIMALS 2.
CHECK KOMP-KZWI1 NE 0.
IF XWORKJ NE 0.
WORKFIELD = ( KOMP-KZWI1 - XWORKJ ) * 10000 / KOMP-
KZWI1.
XKWERT = WORKFIELD.
ELSE.
XKWERT = 0.
ENDIF.
Sample code 2
Code:
DATA: WORKFIELD(16) TYPE P DECIMALS 2,
WORKFIELD1 LIKE KOMP-FACTOR,
WORKFIELD2 LIKE KOMP-FACTOR.
DATA: ZKOMV TYPE STANDARD TABLE OF INDEXED_KOMV
WITH HEADER LINE INITIAL SIZE 50.
CLEAR: XKWERT.