on 04-25-2013 3:44 PM
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
Hi Tom,
It is possible. Just that you need to implement the same.
Thanks & Best Regards,
Leon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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?
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
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
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
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
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
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
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?
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
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.
IF ls_child-viewname = 'MKTPermissions'.
lv_replacement_viewname = ls_child-viewname.
ENDIF.
CHECK ls_child-repview IS BOUND.
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:
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
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?
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
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.