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

Pricing requirement routine

Former Member
0 Likes
2,691

Hi,

I have a requirement where in pricing routine, i need to do some calculation using sales order data while creation.

could anyone help where can i get the data rather which structures so that I can get the sales order numbre , order qty etc.

thanks,

Hi,

I have a requirement where in pricing routine, i need to do some calculation using sales order data while creation.

could anyone help where can i get the data rather which structures so that I can get the sales order numbre , order qty etc.

thanks,

6 REPLIES 6
Read only

Former Member
0 Likes
1,547

Hi Anu,

Check this Tables,

KONH Conditions header

KONP Conditions items

KONV Procedure ( billing doc or sales order)

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
1,547

Go to se80, package VMOD. There you will find all the SD related user exits in form of includes.

e.g.

Include MV45AFZZ

USEREXIT_PRICING_PREPARE_TKOMK

USEREXIT_PRICING_PREPARE_TKOMP

are using the structures komk and komp

Please reward the helpful entries.

Regards,

Raman.

Read only

Former Member
0 Likes
1,547

Hi,

Instead of changing the pricing routines, you can use the user-exit in MV45AFZZ in the routine move_field_ to_komp.

Actully in the pricing routine numbers LIke 366,365, I hope you will not be getting the salesorder no. and the quantity. Its just a structure, which calls the base prices and calculates as per the required.

If you want any calculations according to the sales document type or quantity, you can use the user exit.

Regards,

Read only

0 Likes
1,547

I cannot right in the user exit as I have to apply a condition type based on the value calculated. Please see my requirement below.

<b>This Routine will be called during Sales Document creation/changing. If the requirement could be fulfilled, system will pick up pricing from price condition master data or make manual entry possible. This means most of relevant data to be used in this Routine comes from the Sales Document creation/changing transaction itself.

1) Get the Material Pricing Group (KOMP-KONDM).

2) If the item is relevant for pricing (KOMP-PRSFD = ‘X’), then we can get each line item on the sales document where the line item has the same material pricing group (all line items data should be stored in an Internal Table) , Add up the order quantity of all matching line items into Total Order Quantity.

3) Calculation of Contract Total Agreed Quantity.

Step 1: Select records from table VBFA (Sales Document Flow) where VBELN ( Sales Document number) equals to the Sales document number in the Internal Table.

Step 2: Select records from table VBAK (Sales Document Header) where VBELN = VBFA-VBELN and AUART = ‘ZOLC’.

Step 3: Select records from table VBAP where VBELN = VBAK-VBELN and PRSFD = ‘X’

and KONDM = KOMP-KONDM.

Total Contract Agreed Qty = Total Contract Agreed Qty + VBAP-UMVKN.

4) Contract Net Agreed Quantity = Contract Total Agreed Quantity * (1- Under Delivery Tolerance Percentage /100).

5) The condition type has to be applied if Total Order Quantity is less than the Contract Net Agreed Wrap Qty.</b>

Read only

dev_parbutteea
Active Contributor
0 Likes
1,547

Hi,

use KOMP and KOMK

Regards.

Read only

0 Likes
1,547

but while creating it doesn't have vbeln.