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: 

Customer Purchase Order field in pricing condition

Former Member
0 Kudos

Hi,

I have a requirement from a business user who wants to include Customer Purchase Order no. as one of the keys in a pricing condition. This is because she may have orders from the same customer, for the same material, on the same day but with a different price for each order. Is is possible to include PO no. as part of the pricing condition key combination? If now, any suggestions as to how we can satisfy this requirement? Thanks.

1 ACCEPTED SOLUTION

Vinod_Chandran
Active Contributor
0 Kudos

Hi Yeo,

Please follow these steps to have customer purchase order in pricing.

1. Check whether the field (ZZBSTNK) in the structure KOMK. If it is not there, use the APPEND structure to add this field.

2. Now you need to move the value of PO from VBAK to KOMK-ZZBSTNK. For this use the user exit 'userexit_pricing_prepare_tkomk' in MV45AFZZ.

3. Add the new field ZZBSTNK to the pricing field catalog.

For this goto SPRO -> Sales and Distribution -> Basic Data -> Pricing -> Pricing Control -> Define condition table -> Conditions: Allowed fields.

4. Once this is added to the field catalog, you can add the field BSTNK in one of the pricing tables using V/04

I think you can take it from here.

Kindly award points if your problem is solved.

Thanks

Vinod

6 REPLIES 6

Former Member
0 Kudos

Hi Yeo,

Although it's a very strange requirement in my opinion it can be done. First, you have to add this field (BSTKD) to the pricing field catalog (insert this field in the append of KOMP: KOMPAZ).

Then you have to fill this field in the user exit USEREXIT_PRICING_PREPARE_TKOMP (program MV45AFZ).

Regards,

John.

Vinod_Chandran
Active Contributor
0 Kudos

Hi Yeo,

Please follow these steps to have customer purchase order in pricing.

1. Check whether the field (ZZBSTNK) in the structure KOMK. If it is not there, use the APPEND structure to add this field.

2. Now you need to move the value of PO from VBAK to KOMK-ZZBSTNK. For this use the user exit 'userexit_pricing_prepare_tkomk' in MV45AFZZ.

3. Add the new field ZZBSTNK to the pricing field catalog.

For this goto SPRO -> Sales and Distribution -> Basic Data -> Pricing -> Pricing Control -> Define condition table -> Conditions: Allowed fields.

4. Once this is added to the field catalog, you can add the field BSTNK in one of the pricing tables using V/04

I think you can take it from here.

Kindly award points if your problem is solved.

Thanks

Vinod

0 Kudos

Hi Vinod,

John's and your solution varies slightly... so can you verify before I try it out and award points? Thanks.

0 Kudos

Hi Yeo,

The customer PO is a header level field. So it should go to the KOMK structure. So the user exit is 'userexit_pricing_prepare_tkomk'.

Thanks

Vinod

0 Kudos

Hi Yeo,

The fact that it is a header level field doesn't mean it has to be added to KOMK. Whether it should be added to KOMK or to KOMP depends on where you want to you use the field for pricing: in the order header or in the order item. As by far most pricing is done on item level I suggested to have it added to KOMP.

Regards,

John.

0 Kudos

Hi Donna,

As John mentioned 'it should be added to KOMK or to KOMP depends on where you want to you use the field for pricing'. I hope it is clear now.

Other steps remains same.

Thanks

Vinod