Application Development 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: 

Pricing Routine - unable to enter new net price in sales order

former_member496861
Participant
0 Kudos

Hi all,

I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure . The routine has statement like this that calculate the unit price:

If xkomv-kbetr is initial.

xkomv-kbetr = komp-netwr / kmeng

Endif.

This calculate the net price which appear in the column 'Amount/Net Price. In the order, the user can change the net price in column 'amount'. However, if i remove the line "If xkomv-kbetr is initial", the user can change the amount, but the amount value will stay as the original amount. I don;t understand why this happen. I have been debugging saplv61A (FM Pricing) but unable to get the flow. Can anyone pls provide guidance ?

Thanks

Joyce

1 ACCEPTED SOLUTION

premal_mistry2
Active Participant
0 Kudos

Hi Chan,

If you remove the IF condition from your code then it will surely overwrite the value that the user will manually enter in the

sales order. What i would suggest is try changing the condition as if xkomv-kbetr eq 0.

Also make sure you are not over-writing the field somewhere else in your code.

Regards,

Premal

9 REPLIES 9

former_member496861
Participant
0 Kudos

Hi all,

I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure (vofm/formula/cond base value). The routine has statement like this that calculate the unit price:

If xkomv-kbetr is initial.

xkomv-kbetr = komp-netwr / kmeng

Endif.

This calculate the net price which appear in the column 'Amount/Net Price' (kbetr). In the order, the user can change the net price in column 'amount'. However, if i remove the line "If xkomv-kbetr is initial", the user can change the amount, but the amount value will stay as the original amount. I don;t understand why this happen. I have been debugging saplv61A (FM Pricing) but unable to get the flow. Can anyone pls provide guidance ?

Thanks

Joyce

0 Kudos

Dear Joyce,

Do like shown belo:

IF KOMP-MGAME NE 0 .

XKOMV-KWERT = FORMULA.

XKOMV-KAWRT = FORMULA.

ENDIF.

YKMEIN = KOMP-KMEIN .

Try this, I hope, this works, as XKWERT is the field used for amount.

Regds,

Anil

0 Kudos

HI Anil,

I will give this a try.

thanks

joyce

Former Member
0 Kudos

Hi Joyce,

From what i gather, the amount field is not changed as it is calculated from the netprice divided by the quanity.

so even if you have removed the initial check it does not make a difference as the amount = netpr / qty. The netpr is fixed based on your priciing conditions.the only value you can change with the current configuration is the qty and then your amount will change.

So if you need to have the user manually enter an amount,you will need to check your pricing conditions and have a manual condition defined for this particular line item type so the system will not apply the pre-defined net price from the pricing conditions.

Hope this helps.

Regards,

Neil.

0 Kudos

Hi Neil,

With our current configuration now, we can change the amount (net price) at line item level manually after the line item is created. We can also change the quantity. We have a manual entry selected for this condition type. Currently we define the condition type as: cond class = B, cond type = c, cond cat = H, manual entry = C.

Do you mean i need to create another condition type ?

Would changing the code in sapmv45a or saplv61a be able to help ?

Many thanks

Joyce

premal_mistry2
Active Participant
0 Kudos

Hi Chan,

If you remove the IF condition from your code then it will surely overwrite the value that the user will manually enter in the

sales order. What i would suggest is try changing the condition as if xkomv-kbetr eq 0.

Also make sure you are not over-writing the field somewhere else in your code.

Regards,

Premal

0 Kudos

Hi Premal,

Unfortunately, using 'if xkomv-kbetr eq 0' does not work. Thanks for your info.

Joyce

former_member496861
Participant
0 Kudos

Thanks to everyone who replied.

0 Kudos

Hi Joyce,

I'm just wondering how you solved this issue - would it be possible to post a solution please?

I have a similar issue (KBETR field is overwritten, after I change it in my VOFM routine)

I posted my question here:

but haven't received any replies!

Would appreciated any help you can offer.

Thanks.