cancel
Showing results for 
Search instead for 
Did you mean: 

How to add the marketing attributes assignment block to the contact quick create

Former Member
0 Kudos

Hello All,

When you create a contact going via the customer you end up in the contactquickcreate view. In there you first have to enter the general data and after you hit enter the function assignment block appears. I was able to get rid of this one because we don't need it. The one we do need is the marketing attributes assignment block. Is there a possibility to add this directly on the first view? By this I mean that I want to avoid that users have to hit the enter button in order to get it displayed.

Regards

Tom

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Tom,

It is possible. Just that you need to implement the same.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Hi Leon,

Can you explain a bit more please? What do you mean by implementing the same?

Best regards

Former Member
0 Kudos

Hi Tom,

I assume you are referring to the component BP_CONT,

The logic for Loading views on pressing Enter is written in methods DETACH_STATIC_OVW_VIEWS and REATTACH_STATIC_OVW_VIEWS of the OVP's IMPL class.

as far as i know,Only way to change this is Delete the Redefinition of these methods or change the implementation.

Thanks and Regards,

Pratheek

Former Member
0 Kudos

Hi Pratheek,

It is indeed component BP_CONT that I am talking about. View ContactQuickCreateEF in particular.

I have tried to put a breakpoint in DETACH_STATIC_OVW_VIEWS and REATTACH_STATIC_OVW_VIEWS methods of the overview page but when I create a new contact starting from the customer (assignment block Contacts on the Customer button new) it does not seem to pass the code. Is it using something different?

Regards

0 Kudos

Hi Tom,

You have to enhance the viewset BP_DATA/AccountContactViewset for the same. What happens now is at the first time, it displays only the General data view and suppresses all the other 3 views. Once you enter the data and hit the enter button, it enables all the other views.

In the view controller of BP_DATA/AccountContactViewset, you can find the corresponding implementation in the method CL_BP_DATA_ACCOUNTCONTAC1_IMPL->DO_PREPARE_OUTPUT, you can see the flag 'lv_suppress_eew_views' which is set to abap_true in case of create mode and bp_number is empty. Once you enter the data and press enter, the bp would get created and hence suppressing the views are disabled by clearing the flag 'lv_suppress_eew_views'.

You can enhance this viewset and do the necessary changes to display the required views in the first instance itself.


You can add the code statement

IF ls_child-viewname = 'MKTPermissions'.
lv_replacement_viewname = ls_child-viewname.
ENDIF.


just before the statement

CHECK ls_child-repview IS BOUND.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Hi Tom,

I guess Leon gave you the answer ]

Regards,

Pratheek

Former Member
0 Kudos

Hi Leon,

I was a bit too fast to mark this as answered.

problem is that I do not want the view MKTPermissions but MarketingAttributes. Basically the same assignment block that you see when you edit a contact person afterwards. The one where you can maintain the marketing attributes.

Any ideas on that one?

0 Kudos

Hi Tom,

The corresponding view you are looking for is BP_DATA/MarketingAttributesEOVP which is contained in the window BP_DATA/MarketingAttributesEOVPList. You need to add this view to the viewset BP_DATA/AccountContactViewset. You can create a component usage for the InterfaceView BP_DATA/MarketingAttributesEOVPList and add it to the viewset BP_DATA/AccountContactViewset.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Hi Leon,

when I do this, I get an error Multiple usage of view 'BP_DATA/MarketingAttributesEOVP' is not allowed"

Regards

0 Kudos

Hi Tom,

Yes, you cannot directly add it to the viewset BP_DATA/AccountContactViewset since it has already been added in the window BP_DATA/MarketingAttributesEOVPList once. That is why I had mentioned above to create a component usage and then add the same.

You can create a component usage for the InterfaceView BP_DATA/MarketingAttributesEOVPList and add it to the viewset BP_DATA/AccountContactViewset.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Leon

Ok I was able to add the view now. problem is that I cannot see it yet. I added it to viewarea AccountContactViewarea.

Any thoughts on this?

Regards

0 Kudos

Hi Tom,

Hope you have added the window from the component usage and not directly now.

It will look like [Comp usage name].[window name]. If your component usage name is MKTAttributes, then after adding it to the viewset, it should look like "MKTAttributes.MarketingAttributesEOVPList". Then you have to go to the method CL_BP_DATA_ACCOUNTCONTAC1_IMPL->DO_PREPARE_OUTPUT and do the implementations as I mentioned before. Also you have to bind the context nodes using the component controller. Since you are using a component usage, it would treat the window as though you are accessing a different component.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Hi Leon,

Not sure how to bind context nodes as this is all rather new for me. I'll give it a try.

thanks and regards

Former Member
0 Kudos

Hi Tom,

To Bind Nodes in different component you need to expose the Context node, just go to component Interface and you will find where to add context node, thus it will be shared alond with the view you are sharing.

Then you need to write code in Component Controllers WD_USAGE_INITIALIZE method.

Regards,

Pratheek

Former Member
0 Kudos

Hi Pratheek,

I added the context node, bound it to BUILCONTACTPERSON but the method WD_USAGE_INITIALIZE I cannot find back.

Where do you see this? Also, which code would I have to put in there?

Currently on the Webgui I do not see the assignment block initially. After hitting enter I can see it but the "Edit list" and "Insert" are deactivated so I cannot enter anything on it.

Kind regards

Former Member
0 Kudos

Hi Tom,

WD_USAGE_INITIALIZE can be found in your Component Controller, Double click on Component Controller and you will see this method at the end of the list.

Redefine this and write a code similar to this

WHEN 'component usage name'

          CALL METHOD iv_usage->bind_context_node

              EXPORTING

         CONTROLLER_TYPE           =  'Type of controller you want to bind(custom/component controller) '

         IV_TARGET_NODE_NAME  = ' node name of your controller

        IV_NODE_2_BIND                  = 'node name of your component usage controller '

This code needs to be written in Component Controller of Component which is Consuming the exposed View

Regards,

Pratheek

Former Member
0 Kudos

Ok, that worked!

I do have 2 issues now:

- the assignment block is still not visible from the first time. You have to enter the required fields and hit enter, then it is displayed.

- I can enter new attributes now, but it seems that they are not saved. When I add attributes, they are not displayed when afterwards I return to the contact person.

any ideas on these ones?

I used as target node for the binding "PARTNER". Is this correct?

Former Member
0 Kudos

Hi Tom,

Currently I dont have a CRM System to access. So I wont be able to help you, but I think PARTNER is the correct node, Compare the attributes of the node and do the binding accordingly.

In your question you had mentioned that you got rid of the 'ENTER' Problem. How did you resolve it then? Try using the same logic again.

Regards,

Pratheek

Former Member
0 Kudos

I did not really get rid of the "enter". I just prevented the assignment block Marketing permissions from getting displayed after the "Enter".

It is somewhere in the do_prepare_output like Leon said. Will do some debugging to see where this gets hidden/displayed.

For the second problem I will have to dig a bit deeper I think. I tried to bind to BUILCONTACTPERSON but then the "Insert" button got deactivated again.

0 Kudos
Hi Tom,
In the method CL_BP_DATA_ACCOUNTCONTAC1_IMPL->DO_PREPARE_OUTPUT,
check the view area internal table 'lt_children' and find the corresponding entry for the MktAttributes view.
Then as i mentioned above, add the following statement. Instead of 'MKTPermissions', give the corresponding view name for MKTAttributes.
IF ls_child-viewname = 'MKTPermissions'.
lv_replacement_viewname = ls_child-viewname.
ENDIF.

just before the statement
CHECK ls_child-repview IS BOUND.
Thanks & Best Regards,
Leon
Former Member
0 Kudos

ok, I had to start again from scratch because apparently I did something wrong and I could not get it to work anymore. So I deleted the enhancement and started over.

problem now is that I do not get the assignment block anymore. Steps that I followed:

  • I created a component usage and added InterfaceView BP_DATA/MarketingAttributesEOVPList to it.
  • I created a new Viewarea under ViewSet BP_DATA/AccountContactViewset and added View CUMarketingAttributes.BP_DATA/MarketingAttributesEOVPList to it.
  • In the view structure of BP_DATA/AccountContactViewset I added a new context node and bound to BP_DATA/CuCoMarketingAttributes Context Node ATTRIBUTES.

Should this not be enough to get the assignment block displayed after I hit "enter". The display without first having to hit the "enter" button can wait. I just want to get the block displayed.

Kind regards

0 Kudos

Hi Tom,

That would be enough to display view.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Strange because it is not.

They way my context node is created, does that impact the display/no display?

Regards

T

0 Kudos

Hi Tom,

You can debug CL_BP_DATA_ACCOUNTCONTAC1_IMPL->DO_PREPARE_OUTPUT.

The display/hide views happens in this method only. You will be able to find out what goes wrong here.

Thanks & Best Regards,

Leon

Former Member
0 Kudos

Hi Leon,

I debugged the method but strangly enough there is nothing that I can find that would cause the error.

Now for testing I added the following code like you mentioned in the do_prepare_output method some posts up.

This did not help, assignment block still does not get displayed.

Now, just to be curious I added to following code

IF ls_child-viewname = 'BP_DATA/AccountContactFunctionsEL'.
     lv_replacement_viewname = 'CUMarketingAttributes.BP_DATA/MarketingAttributesEOVPList'.
ENDIF.

and now, there is something displayed:

Still not what I want but it is somewhere a step forward. How is it possible that if I do the check on a different viewname, I get the above but when I do

IF ls_child-viewname = 'CUMarketingAttributes.BP_DATA/MarketingAttributesEOVPList'.
      lv_replacement_viewname = 'CUMarketingAttributes.BP_DATA/MarketingAttributesEOVPList'.

ENDIF.

I get nothing?

0 Kudos

Hi Tom,

That is not the correct one. That viewname 'BP_DATA/AccountContactFunctionsEL'

refers to 'Partner Function Assignments' AB. Check if you have entry in the internal table 'LT_CHILDREN' with viewarea 'VAMarketingAttributes'.

Also make sure to reset the personalization of the overview page in the web ui.

Thanks & Best Regards,

Leon

Answers (0)