Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sales Order Pricing User Exit Problem

Former Member
0 Likes
4,154

Hi,

I am facing a problem related to coding in Sales Order pricing user exits. Scenario is as mentioned below:

Based on Material Entered and Sold To in Sales Order, auto determination of a manual pricing condition happens. For doing this, coding has been done in USEREXIT_PRICING_PREPARE_TKOMP by changing XKOMV table. Auto determination of the manual price is happening properly.

From Sales Overview Screen when user goes to the Conditions tab, Net Value is not getting calculated. When we navigate away to Schedule line tab and then come back to COnditions tab, Net Value is automatically getting calculated.

AM i missing something in the coding part? As the data is getting populated automatically I guess some piece of code needs to be triggered. Can anyone shed some light into this.

Thanks in advance,

thunderans.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
2,670

I had a similar scenario but that was related to pricing routine (VOFM)

there is a std field called zwavr at the end of the routine I had to say zwavr = 0.

May be this info would help you... zmenge had to be done something.

7 REPLIES 7
Read only

Former Member
0 Likes
2,670

hello thunderans ,

i'm not sure abt ur issue , but wat u can do is after ur calculations u can call FM PRICING ,which will re calculate sales pricings.

regards

Prabhu

Read only

Former Member
0 Likes
2,670

Hi,

First just put a break point in user exit subroutine and check when exactly it is getting triggered..If it is getting triggered after you go on a line item ,then just let me know..May be some other user exit or customer exit will be available..

Regards,

Nicklas.

Read only

former_member156446
Active Contributor
0 Likes
2,671

I had a similar scenario but that was related to pricing routine (VOFM)

there is a std field called zwavr at the end of the routine I had to say zwavr = 0.

May be this info would help you... zmenge had to be done something.

Read only

0 Likes
2,670

Prabhu: After filling in XKOMV structure, I am calling FM PRICING. On doing this, the Sales Pricing is getting calculated but even then net value of order at header i.e VBAK-NETWR is not getting populated when we are in Sales Overview screen. When, I am getting into Conditions tab and coming back to Sales Overview screen, Net value is getting populated correctly. This portion of everything not getting populated at the same time is bothering me. The pricing conditon that I am filling is a manual pricing condition.

I put a breakpoint after FM PRICING which correctly populates XKOMV structure. How do I properly update Order Net Value in Sales Overview screen wihtout having to navigate to any other tab?

Nicklas: I am looping at Order line within the user exit USEREXIT_PRICING_PREPARE_TKOMP and determining price. Once all line items are processed, I am using the FM PRICING for calculating Sales Prices.

J@Y: Request to send me a bit more details into your approach.

Read only

0 Likes
2,670

Hello,

Rather then handling the code in the user exit, I suggest you to have the code written in thr pricing routine manual pricing condition. to find out the pricing condition, you need to check the V/08 to find out the routine # and got to VOFM transaction and got to condition base value with the routine # that you have got from V/08 and determine the price to XKWERT.

Cheers

Read only

0 Likes
2,670

Hello thunderans ,

in that FM ,u will get option to re calculate pricing procedure ...u need to tick that one , then only it will calculate based on ur pricing procedure.

which one u are using for Condition control.... ?

KSTEU -Condition control

A Adjust for quantity variance

B Free

C Changed manually

D Fixed

E Condition value and basis fixed

F Condition value fixed (billed items)

G Condition basis fixed

H Condition value fixed (cost price)

I Scale Base Value and Condition Amount Fixed (for BYD only)

regards

Prabhu

Read only

0 Likes
2,670

Hi Prabhu,

Which option are you mentioning about when u say "option to re calculate pricing procedure ...u need to tick that one , then only it will calculate based on ur pricing procedure."

I am using KSTEU = A when I am calling this FM.

Thanks