cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing segmentation attributes

Former Member
0 Kudos

Dear all,

I need some help regarding customization of segmentation attributes.

Following the guides, I create a new custom field (which I called ZCLUSTER) for the table CUAN_CE_IC_ROOT using an append to the structure INCL_EEW_CUAN_CE_IC_ROOT.



Now I need to create a segment of my contacts using that attribute. On my segmentation work-set, I can't find zcluster. Should I do something via spro?

Thanks in advance,

Cristina

Accepted Solutions (1)

Accepted Solutions (1)

nidhiagarwal
Advisor
Advisor

Hi Cristina,

If you have to add only one attribute of length CHAR1, you can use the easy extensibility option from UI, give the label to the existing fields available for custom requirements.

If you want to try doing the segmentation using the Append structure, you will need to make a copy of the standard HANA view, enable your field in the output of HANA view and then at the ABAP level customizing you will have to create copy of standard segmentation profile and enable your field to be available as output.

Details can be found in section 10 of the extensibility guide.

Let me know if you face any issue.

Regards,

Nidhi
 

Former Member
0 Kudos

Thanks for your answer. I need to use the method I have described for many reasons.

But I need more help on this topic.

Firstly I followed the first chapter of the extensibility guide. After the enhancement is done,

1. Go to transaction HPA_WHERE_USED_INCL and enter the name of the include structure that you have extended in the previous step, in the Name of Include field and choose the Execute pushbutton.

2. As a result, you are provided with a list of involved SAP HANA information models. You must add the new field to the output structure of each listed information model in the SAP HANA studio.

3. In the SAP HANA studio, go to the relevant information model and add the new field (which you find at the very end of the extended database table in the Details section) to the Output section using drag and drop.

Thus, I activated the field zzcluster for the table CUAND_CE_IC_ROOT for each models of the list.

Now I'm trying to follow the chapter 10.2 of the Extensibility guide, as you suggested. The path is:

a. Define Aliases for SAP HANA Data Sources > I create the same models I found before.

b. Define Segmentation Objects.

c. Assign SAP HANA Data Source to Segmentation Objects.

BUT if I check for my attribute zzcluster, I can't find it! What's wrong with my actions?

Thanks,

Cristina

nidhiagarwal
Advisor
Advisor
0 Kudos

Hi Cristina,

I see that you are making changes to the standard HANA Views. the section 1 of extensibility guide requires you to do the mass copy of standard HANA views.

Do Not make changes to standard delivered HANA content.

So you must create a top level folder (zzfolder as an example) and the use the mass copy function to copy the standard HANA views that you need to modify . The rest of the path (subpackages) for the copied HANA views should remain same, other than the topmost node:

sap.hana-app.cuan.common.internal...  This Hana view when copied to your custom folder should have now the name as zzfolder.hana-app.cuan.common.internal...

Once the required Hana views are copied there, make changes and activate them.

You need to clear the HPA buffers once the HANA related tasks are completed.

These all tasks mentioned help the added attributes to be available in the different standard Odata Services structures and queries to those specific HANA views from UI  now get directed to your local copies.

This is however not useful for Segmentation purpose.

Now for segmentation,

I see that you are using the ALL Consumers profile, which uses the Segmentation Object

SAP_CONTACT_ENGAGEMT_CONSUMR.

spro->SAP Hybris Marketing->Segmentation->Define segementation Profiles. Here you can see the seg. object assigned to the profile.

This segmentation object has different data sources assigned to it.  spro->SAP Hybris Marketing ->Segmentation->Assign SAP HANA Data sources to Segmentation Objects.  From this step select the name of data sources assigned to this object

Go to the step spro->SAP Hybris marketing ->Segmentation->Define Alias for SAP HANA Data Sources ; here you will be able to see various HANA views (data sources from previous step) that are used for segmentation in this particular segmentation scenario.

Now since there is some additional attribute/enhancement required, one should identify which data source needs to be changed; go in HANA studio, copy that particular standard HANA view to your custom view, add your fields/ make changes as per requirement; save and activate the HANA view.(In your case most probably sap.hana-app.cuan.contact.AT_CE_CONTACT)

In SPRO-> SAP Hybris Marketing ->Segmentation->Define Segmentation Objects ;copy the entry of standard segmentation object (SAP_CONTACT_ENGAGEMT_CONSUMR for your case) into your segmentation object , it will prompt you for copying the dependent entries, once done , now in the step for assigning the data source to segmentation object, add your new data source alias to the existing entries of your custom segmentation object. Click on the Sync button.

Map the key field of the segmentation object to the key field of your new data source. ( take reference from the entry existing for your standard data source:  - spro-> SAP Hybris Marketing-> Segmentation -> Assign segmentation Attributes to Object Key Fields)

Create a new segmentation profile and assign your segmentation object to it.

You should now be able to see your field in this new data source for your new profile in UI.

Let me know if this helps.

Regards,

Nidhi

Former Member
0 Kudos

Thanks for the explanation.

As you rightly said, I'm dealing with the segmentation profile called SAP_CE_CONSUMER_1508.

This profile is linked with the segmentation object SAP_CONTACT_EGM_CONSUMER11SP8.

Eighteen datasource alias are assigned to this segmentation object.

This is the scenario I'm dealing with.

Now, You suggest to create a new view as a copy of sap.hana-app.cuan.contact.AT_CE_CONTACT . Right? And here activate the attribute I created.

Is it right till here?

Then I should continue with

In SPRO-> SAP Hybris Marketing ->Segmentation->Define Segmentation Objects ;copy the entry of standard segmentation object (SAP_CONTACT_ENGAGEMT_CONSUMR for your case) into your segmentation object , it will prompt you for copying the dependent entries, once done , now in the step for assigning the data source to segmentation object, add your new data source alias to the existing entries of your custom segmentation object. Click on the Sync button.

which is not clear to me.

Thanks again,

Cristina

Former Member
0 Kudos

Dear Nidhi,

I did it but everything was easier than you suggested.

Once the customizing is done via se11 and an append to the structure INCL_EEW_CUAN_CE_IC_ROOT, for obtaining that field on the segmentation workset I do the following:


1. Check the data source alias (I'm dealing with "all B2C consumer):

spro > segmentation > define segmentation profile

Segmentation profile / Segmentation object  / Population Data Source Alias

SAP_CE_CONSUMER_1508 / SAP_CONTACT_EGM_CONSUMER11SP8  / SAP_CONTACT_INTERACTIONS


2. Check aliases for Sap hana data source

spro > segmentation > define Aliases for SAP HANA Data Source

SAP_CONTACT_INTERACTIONS | sap.hana-app.cuan.contact/CA_C_CONTACT_INTERACTIONS

Refresh con HPA_CLEAR_BUFFERS

3. In Hana studio, activate the node of the new field in the table CUAND_CE_IC_ROOT in the view CA_C_CONTACT_INTERACTIONS

Hana > sap.hana-app.contact/CA_C_CONTACT_INTERACTIONS > activate the node of the custom field CUAND_CE_IC_ROOT

With right click on the object choose Propagate semantics (really important!)

4. HPA_CLEAR_BUFFERS

5.spro > segmentation > Assign SAP HANA Data source to segmentation objects

SAP _CONTACT_EGM_CONSUMER11SP8 > SAP_CONTACT_INTERACTIONS > SYNCR

The new field is now available in the table. It is possible to check the visibility and to add it to the attribute group  SAP_CONSUMER_CONTACT

Now the attributes are visible!

Thanks again

Cristina

nidhiagarwal
Advisor
Advisor
0 Kudos

Hi Cristina,

Good to know that it works now.

I hope my answer helped you to some extent.

Reason I suggested you not to make changes to standard configurations but to create the copy of standard segmentation object and HANA view is that there is no issue even if anything gets messed up, we still have the standard delivered content with us.

Also during upgrades, its easier to manage your own content rather than the changes which you make to standard content.

I prefer using copy of standard HANA views and not making changes to standard Configurations.

Regards,

Nidhi

Answers (0)