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.
No comments:
Post a Comment