Thursday, August 25, 2011

Condition value from Custom Routine for Sales Order condition type

Scenario: At sales order we need to calculate Condition value for ZNOY condition Type as

ZNOY-Condition Value = PR00-Condition Value * ZNOY-Amount


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 (

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 =
xkwert = ( lv_komv-kwert * xkomv-kbetr ) /

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:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)


Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive