Professional Documents
Culture Documents
When you use INCLUDES, the field is automatically added to KOMG and the field catalog.
The routines for assigning values to the new fields in order processing are found in member
MV45AFZZ. Use the following user exits:
o
The routines for assigning values to the new fields in billing are found in member RV60AFZZ. Use the
following user exits:
o
4. Integrate the field name ZZPRODH in the communication structure KOMP using the INCLUDE
KOMPAZ and allocate the data element PRODH to it.
5. Activate the structure.
6. Check in which table the field PRODH exists.
The field is in table VBAP (sales document: item data).
7. Assign a value to the new field in the FORM routines for sales order processing and billing using
the appropriate user exits:
In sales order processing the user exit is found in member MV45AFZZ. The complete statement is:
FORM USEREXIT_PRICING_PREPARE_TKOMP.
MOVE VBAP-PRODH(3) TO TKOMP-ZZPRODH.
ENDFORM.
The routines for assigning a value to the new fields in billing are found in member RV60AFZZ. The
statement is as follows:
FORM USEREXIT_PRICING_PREPARE_TKOMK
MOVE XVBRP-PRODH(3) TO TKOMP-ZZPRODH.
ENDFORM.
8. Allocate the specifications A, V and 001 to the field ZZPRODH in table T681F. Use "E" has been
added for fields in rebate processing.
Example 2
In the second example, you want to use a partner function, created in Customizing for partner maintenance,
for pricing.
Assume that the partner function was created for a sales representative of the partner type PE. Z1 is defined
as a mandatory function for the customer master record, therefore automatically set in the document and
available in the internal partner table XVBPA.
To use the new partner function for pricing, proceed in the same way as for the previous examples.
1. Create a new data element, in this example, data element ZZVRTZ1 with domain PERNR.
2. Include the field ZZVRTZ in KOMK using KOMKAZ and allocate data element ZZVRTZ1 to it.
For order processing, a value is assigned to the field in the user exit for member MV45AFZZ. The entries in
the user exits are protected during a release upgrade. The statement is as follows:
FORM USEREXIT_PRICING_PREPARE_TKOMK.
PERFORM XVBPA_LESEN (SAPFV45K) USING 'Z1' VBAP-POSNR SY_TABIX.
MOVE XVBPA-PERNR TO TKOMK-ZZVRTZ.
ENDFORM.
For billing, a value is assigned to the field in the user exit of member RV60AFZZ. The entries in the user exits
are protected during a release upgrade. The statement is as follows:
FORM USEREXIT_PRICING_PREPARE_TKOMK.
PERFORM_XVBPA_SELECT_USING'Z1'.
MOVE XVBPA-PERNR TO TKOMK_ZZVRTZ1.
ENDFORM.