cancel
Showing results for 
Search instead for 
Did you mean: 

Auto price update for sub item in sales order

0 Kudos

Hi Experts,

We have two custom fields (A and B) in Additional data B of sales order item. When user enter field A at main item, field B will be automatically populated, also both A and B will be copied to all the sub items.

For sub item, there is a price condition Z001 which is determined based on field B. The problem is - Z001 can't be automatically carried out after entering field A at main item. We have to press the update button at sub item to update Z001 price. Is there any way to implement auto price update without pressing update button?

I tried to set new_pricing to 'B' in user exit USEREXIT_NEW_PRICING_VBAP of program MV45AFZB, but the user exit is only triggered for main item, Z001 is still not updated at sub item.

Please kindly give your suggestion. Any suggestion will be appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

I presume, pricing is applicable to both main item and sub-item. For main item, it could be some other pricing condition type. If that is the case, please let me know whether the Z001 for sub-item is not flowing but the header material have pricing and flowing. As you would be knowing, you can have pricing either at header level or at component level but not both.

Lakshmipathi
Active Contributor
0 Kudos

Is the pricing applicable to both at Header and Component material code?

As you would be knowing, not all fields in KOMP are allowed for pricing. Allowed fields are listed in the field catalog and can be found in table T681F. New fields used in pricing are not populated automatically. The field must be filled inside the following userexits:

  • USEREXIT_PRICING_PREPARE_TKOMK / USEREXIT_PRICING_PREPARE_TKOMP in program MV45AFZZ for sales order and
  • RV60AFZZ for invoices.
0 Kudos

Hi Lakshmipathi,

There are two kinds of sales order item - main item and sub item. The price condition Z001 is only applicable to sub item. Now Z001 can be automatically carried out if user manually enter field A at sub item. The requirement is - Z001 should be also automatically carried out even if user enter field A at main item, but I don't know how to trigger repricing for sub item without pressing update button for this case. Please suggest if you have any idea. Thanks a lot.