0 оценок0% нашли этот документ полезным (0 голосов)
323 просмотров4 страницы
This document provides steps to calculate a condition value for a condition type "ZNOY" in a sales order by using a custom routine. The routine multiplies the condition value of condition type "PR00" by the amount of "ZNOY". The steps include:
1) Going to transaction VOFM
2) Creating a custom routine starting with 900-999
3) Placing logic in the routine to read the value of "PR00" and multiply it by the "ZNOY" amount
4) Activating and attaching the routine to calculate the value for condition type "ZNOY"
Исходное описание:
SAP SD
Оригинальное название
5. Condition Value From Custom Routine for Sales Order Condition Type
This document provides steps to calculate a condition value for a condition type "ZNOY" in a sales order by using a custom routine. The routine multiplies the condition value of condition type "PR00" by the amount of "ZNOY". The steps include:
1) Going to transaction VOFM
2) Creating a custom routine starting with 900-999
3) Placing logic in the routine to read the value of "PR00" and multiply it by the "ZNOY" amount
4) Activating and attaching the routine to calculate the value for condition type "ZNOY"
This document provides steps to calculate a condition value for a condition type "ZNOY" in a sales order by using a custom routine. The routine multiplies the condition value of condition type "PR00" by the amount of "ZNOY". The steps include:
1) Going to transaction VOFM
2) Creating a custom routine starting with 900-999
3) Placing logic in the routine to read the value of "PR00" and multiply it by the "ZNOY" amount
4) Activating and attaching the routine to calculate the value for condition type "ZNOY"
Condition value from Custom Routine for Sales Order condition type
By Aromal Raveendran, Tata Consultancy Services
Scenario: At sales order we need to calculate Condition value for ZNOY condition Type as ZNOY-Condition Value = PR00-Condition Value * ZNOY-Amount Output
Step by step method to achieve this calculation. 1. Go to Transaction VOFM
2. Go to Formulas->Condition Value
3. Enter the Custom Routine Number 901 and the description. (Note : it is recommended that custom routine should start the 900-999 series)
4. Take the Access Key for this object from Service Market Place (http://www.service.sap.com/)
Give the Key & Press Continue
5. Place your cursor at start of ENDFORM. and press Insert.
6. Write Your Logic, Save & activate data : lv_komv type komv. read table xkomv into lv_komv with key kschl = 'PR00'. if sy-subrc ne 0. xkomv-kinak = 'Z'. exit. else. xkwert = ( lv_komv-kwert * xkomv-kbetr ) / 100. endif. 7. Activate the Routine as shown below.
8. Go to Pricing Procedures.
9. Select your pricing and double click on Control.
10. Attach your routine 901 against Cal Type for the condition type ZNOY.
11. Do run the report RV80HGEN at every client to activate the routine. 12. Go to Sales Order (VA01) and check the output.