cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing routine not working for sales order

Former Member
0 Kudos

Hi Friends,

We have created one pricing routine, routine logic is when i am creating a sales order system should match customer, plant, pricing date based on this parameters system should bring price from previous month sales order for one particular condition type from KONV table. Logic is working fine because we did debugging the desire value is showing but when it is coming out from routine program and entering in standard sap program then value is disappearing. So please suggest were we are going wrong.

Thanks & regards

Srinivas.N

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

please confirm which pricing date have you is taken for getting sales order of previous month.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

Two thinks can happens.

First, the subroutine is not generated, then run the report RV80HGEN.

Second, it's possible that before the subroutine works, there is not any value for condition. The subrouinte replace the value of condition, ie: you do a substitution. Set with VK11 a generic setting for the value of condition and check it.

I hope this helps you

Regards,

Eduardo

Former Member
0 Kudos

Hi Eduardo,

Thanks for your proment reply i have run the report RV80HGEN i got the message All routines have been successfully activated.

secound point i have not understood so can u pls give me ur contact number so that i will call get clearification.

thanks & regards

Srinivas.N

Former Member
0 Kudos

Hello Srini

Please check

1. Routine is generated and activated, i think you check this.

2. Attach the rotine in PP correctly on your condition type.

3. Now mark a break point in to routine.

4. Make the order, the system will stop at break point.

5. Here you can check the system values.

6. Finally check at the final point after the values are calculated, the sustem should pass the values to KSCHL, field.

7. In pricing the values at run time execution are vanished as the program/ subroutines are executed at several times so the values keeps on coming up at every execution of program.

8. One more reason can be that the routine is written at wrong place, to avoid this do not write in exit, use VOFM and write a pricing routine.

Hope this helps you.

regards

raghu

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

Set a breakpoint in the VOFM (you can see a STOP icon in the ABAP editor when you are viewing the code). Run the SO, in a moment the debugging will be working. If you have a value in the condition that you want to replace, the subroutine will work, if it's empty, the VOFM will not work. So you need populate it with a value. So create a new access for VK11 (the last resort) and set it, then the VOFM will work.

Regards,

Eduardo

Former Member
0 Kudos

I agree with Eduardo, the condition should have a value if you want to modify it via a routine. You have the following options

1. Create a condition record in VK11 for the condition type for which you want to modify the value. (As Eduardo said)

2. Assign a value in the routine itself (generally done when you are modifying the value of a subtotal)

For e-g xkwert = komp-KZWI6

Your ABAPER should be able to take this further for you...

Good Luck

Chandra Kiran

Former Member
0 Kudos

Hi,

Check below setting again.

1 - Go to your Pricing procedure and check whether you have assigned that routine number.

2 - Go to VOFM transaction and go to your routine code

use "Check" (CTRL+F2) there and see whether the program is active.

If not, use menu option, Program / Generate option to generate it.

Sometimes this happens if your program is not generated properly. Specially if you transport it from one client to another.Because VOFM Routines are not directly usable is target clients. (refer note: sapnote_0000022808 & sapnote_0000598475)

Best regards,

Anupa