cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Purpose of PriceDateCompositionHandler on the sappricing extension on Datahub

former_member1031459
Participant
0 Kudos
317

I am trying to understand what is the use of the PriceDateCompositionHandler on the sappricing-raw extension. It seems tries to integrate or merge data from the date ranges replicated from the COND_A IDOC considering the current date.

My concern would be if by depending of the current date the result could affect prices with date ranges defined with future date values.

When SAP modifies a price date range, it sends the resulting new price rows as well as the existing price rows with the new date ranges correctly, so it think that information should be replicated in hybris exactly how the date information is coming from the COND_A IDOCs.

View Entire Topic
former_member224482
Active Contributor
0 Kudos

The current design of the CanonicalPrice is to use condition ID as the single primary key.
A single ERP price condition can have multiple price ranges, the PriceDateCompositionHandler is used to choose which price range shall be kept. Expired price ranges are ignored and the earliest price range is selected.

former_member1031459
Participant
0 Kudos

My concern would be that these ignored price ranges would not be replicated into already existing hybris PriceRows, so they would not get updated with the adjusted end dates.

This gets complex when there is already an existing PriceRow in hybris and there is a new date range on SAP for the same product, so new PriceRows are created and the existing PriceRow should be updated with new end date.

former_member224482
Active Contributor
0 Kudos

By design, ignored price ranges are always replicated into already the existing hybris PriceRow by the non ignored price range with the same condition ID, therefore so they always update the adjusted end dates.

For every condition id price ranges, there will always be 1 price range kept. Even if all its price ranges are expired. This retained price range will be imported and update the existing price by condition ID.

former_member348752
Participant
0 Kudos

can this be added to Hybris Help?