cancel
Showing results for 
Search instead for 
Did you mean: 

Add Marketing attributes view to Contact creation screen

former_member293763
Participant
0 Kudos

Hi Experts,

I need some help to make an enhancement to add marketing attributes view on the contact person creation screen after confirming account in Web IC.

The view currently exists in contact person overview page. I was just wondering what is the best way of adding the view to CP creation screen.

Regards,

Dhruv

Accepted Solutions (1)

Accepted Solutions (1)

ceedee666
Active Contributor
0 Kudos

Hi Dhruv,

I just checked in our system. Unfortunately the create contact person view in the IC is a configurable view, not a view set. In order to add the marketing attributes to the contact creation screen you therefore need to:

  1. create a custom viewset
  2. add the contract create view to the view set
  3. add the marketing attributes view to the view set (e.g. BP_DATA/MarketingAttributesEOVPList)
    • To be able to do this you need to add the component to the component usages
    • You also need to extend wd_usage_initialize of your component controller so the new component gets initialized correctly
  4. change the navigation link for create contact to open you new overview viewset instead of the standard create contact view.

Christian

former_member293763
Participant
0 Kudos

Thank you Christian, I will try the above mentioned solution. I was wondering if you could elaborate what I need to do with WD_USAGE_INITIALIZE(which context nodes to bind etc.).

All the enhancements need to be done in ICCMP_BP_CP component right?

Thanks,

Dhruv

ceedee666
Active Contributor
0 Kudos

Hi Dhruv,

which component you need to enhance depends on the IC role you are working on. But most likely the component ICCMP_BP_CP is the one you need to change (simply check via <F2>).

Please also have a look at the following docs:

Creating an OVP (Overview Page) with Assignment Blocks, displaying table data based on input given

SAP CRM WEB UI : 45.REUSING A VIEW IN ANOTHER COMPONENT

Christian

former_member293763
Participant
0 Kudos

Hi Christian,

Thank you for your suggestions, I was able to do the following.

-Create custom viewset, add component usage, assign both views to view set in run-time repository.

-Change the default view from ContactCreate to my custom view set in CPCreateW, changed the navigation link to open my custom view set in place of standard contact create view.

In method WD_USAGE_INITIALIZE, I created binding between CONTACTPERSON Node of ICCMP_BP_CP and Partner node of component BP_DATA of component controller.

However, when I execute the create button I get the following dump when the method CREATE_BUILHEADER of class CL_BP_DATA_MARKETINGATTR4_CTXT is called.

Did I miss something? Thanks.

Regards,

Dhruv

ceedee666
Active Contributor
0 Kudos

Hi Dhruv,

On first sight your approach looks good. Try to debug CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING to see what goes wrong in CREATE_BUILHEADER. This might give you an idea what is missing....

Christian

former_member293763
Participant
0 Kudos

Hi Christian,

I debugged it and found that in CREATE_BUILDHEADER method context node to bind is partner,

however no such node exists in the ICCMP component controller. I added the wrong view instead of adding ComponentUage.View. After this I created binding for the Partner context node with CONTACTPERSON node of my component controller.

Now I face another problem, in method SET_VIEW_GROUP_CONTEXT of the implementation class; the collection for marketing attributes is initial and as a result it gives a dump when trying to get the iterator. Do I need to bind this context node as well or how can I set the collection?

Regards,

Dhruv

Answers (1)

Answers (1)

former_member293763
Participant
0 Kudos

Hi Christian,

I was able to display the marketing attributes view. However the view appears in display mode always. I changed the SET_VIEW_GROUP_CONTEXT method of the viewset to make all views editable.  Also the entity in marketing attributes for contact person comes blank which is expected when I click the related button, but this results in making the view to show up in display mode.

Do you have any idea how can I resolve this issue?

Regards,

Dhruv

ceedee666
Active Contributor
0 Kudos

Hi Dhruv,

in the view BP_DATA/MarketingAttributesEOVP there is a event handler EH_ONTOEDIT that executes some special logic in order to get marketing attributes editable. Maybe you need to implement something similar or simply call this event handler.

Christian

former_member293763
Participant
0 Kudos

Hi Christian,

Apologies to bother you again, the issue is that the there is no collection for contact person in the marketing attributes. Since the contact person is not created yet, this is the correct behavior.

So I am wondering if it is possible to implement the functionality? Thanks.


Dhruv