cancel
Showing results for 
Search instead for 
Did you mean: 

How to do Canonical Grouping Composition

Former Member
0 Kudos

Hello,

We have a requirement to create multiple records at hybris if the product deal idoc having the multiple scale prices.

Promotion-Product-Idoc carrying the product having scale quantities (1,3,10) and their respective prices (610.50, 592.00, 518.00).

So, it requires to create the deals as follow

-----> DEALNUM_QUALIFICATION_1.000

-----> DEALNUM_QUALIFICATION_3.000

-----> DEALNUM_QUALIFICATION_10.000

Raw deal is getting populated separately according to the scale

these are getting populated using grouping handler only.

[RawItem{type= 'RawDeal',.... scale 1 price 610.50 .... etc ] --> Raw Type for scale qty 1

[RawItem{type= 'RawDeal',.... scale 3 price 592.50 .... etc ] --> Raw Type for scale qty 3

[RawItem{type= 'RawDeal',.... scale 1 price 518.50 .... etc ] --> Raw Type for scale qty 10

But at canonical it should create the deal code for each scale qty.
Format ---> DEALNUM_QUALIFICATION_scaleQty.

But it failing to populate all the canonical items for all scale quantities Just it is populating last item from that iterator in the custom handler where it is returning only one scale qty deal code.

-----> DEALNUM_QUALIFICATION_10.000

we have a handler here it populating only one canonical Item i.e last Item

Composition Handler Class

You can see the canonical Item Code that getting created from line number 101 to 103 starts with IF CONDITION.

Please let me know how to crack this to populate all canonical Items for all scale quantities ?

REFERENCE IDOCS

Reference IDOC

< E1KONM SEGMENT="1" > 1.000< /KSTBM >7.50-< /KBETR > < ZO2C_E1KONM_ADDL SEGMENT="1" >610.50< /ZCONTPR >660.00< /ZLISTPR >< /ZO2C_E1KONM_ADDL >< / E1KONM >

-----> DEALNUM_QUALIFICATION_1.000

< E1KONM SEGMENT="1" > 3.000< /KSTBM >7.50-< /KBETR >< ZO2C_E1KONM_ADDL SEGMENT="1" >592.00< /ZCONTPR >640.00< /ZLISTPR >< /ZO2C_E1KONM_ADDL >< /E1KONM >

-----> DEALNUM_QUALIFICATION_3.000

< E1KONM SEGMENT="1" > 10.000< /KSTBM >7.50-< /KBETR >< ZO2C_E1KONM_ADDL SEGMENT="1" >518.00< /ZCONTPR >560.00< / ZLISTPR >< /ZO2C_E1KONM_ADDL >< /E1KONM >

-----> DEALNUM_QUALIFICATION_10.000

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Make scale as primary key in Canonical item So it will create separate Canonical items for each scale

Former Member
0 Kudos

Thanks!! Working

Answers (0)