on 03-18-2010 8:38 AM
Hi.
Has anybody an experience in dynamic hiding of assignment blocks?
We need some our blocks would not be shown in BP_HEAD during runtime depending on the attributes of a BP.
That is we have our block in BP_HEAD. When a user chooses a partner we have to hide our block or show it depending on the attributes of the chosen BP.
Thank you.
I cannot assign pnts, an error on the site. I'll try later.
Edited by: Nekrasov Alexey on Mar 19, 2010 9:53 AM
Edited by: Nekrasov Alexey on Mar 19, 2010 9:54 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have created a wiki on this topic just now. The links may not work as the page may be moved. As to your requirement,
- Go to the BPHEADOverview page. That would be the overview controller.
Step 1 - Identify the name of the assignment block
Go to the run time repository of the component. Note down the component usage name. Note down the interface view name. Now, the name of the assignment block page will be
'component_usage_name'.'interface_view_name'. (concatenate both separated by '.' ) or debug to get correct name.
Step 2 - Overview page coding
Detaching Views
In the overview page controller, redefine the method 'DETACH_STATIC_OVW_VIEWS'. This method will be called during each page refresh and will return views to be removed from the overview page.
DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.
CONSTANTS: c_view_id TYPE string VALUE 'CUBTOrgSet.BTORGSET/OrgSet'.
*do validations
*if validation fails
ls_viewid-viewid = c_view_id.
APPEND ls_viewid TO rt_viewid.
*endif
Reattaching Views
In the same overview page controller, redefine the method 'REATTACH_STATIC_OVW_VIEWS'.
*basically the same code as in detach views.
*The return table carries the views to be reattached
*Make sure that the views are not attached already
DATA: ls_viewid TYPE bsp_dlc_ovw_stat_view_attach.
CONSTANTS: c_view_id TYPE string VALUE 'CUBTOrgSet.BTORGSET/OrgSet'.
*if validation ok
READ TABLE view_area WITH KEY appl_viewname = ls_view_id
type = space
traymode = abap_undefined
transporting no fields.
if sy-subrc = 0.
ls_viewid-viewid = c_view_id.
APPEND ls_viewid TO rt_return.
endif.
*endif
Regards,
Arun Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Uh oh...I think that you are trying to edit the standard class. You have not enhanced the component BP_HEAD. For enhancing the component, look at this wiki.
[http://wiki.sdn.sap.com/wiki/display/CRM/HowToEnhanceaWebUIComponentinSAP+CRM]
Follow the wiki and enhance the view 'BPHEADOverview page'. Then, you will be able to redefine the methods.
Regards,
Arun Prakash
Nekrasov,
First and the foremost step is to enhance your UI component. After which you will need to exhance the view. After enhancing the view, in the IMPL class you will redefine the DETACH_STATIC_OVW_VIEWS & REATTACH_STATIC_OVW_VIEWS methods based on your business conditions to hide certain assignment blocks.
This is the best possible method to achieve it.
Regards,
Harshit
Arun,
I have just been looking through the various posts related to the adding of new assignment blocks. In my case I need to add several to the standard Account (Individual account) screen. And also several to the PDF fact sheet, although I think I may have the PDF fact sheet covered as there's a details note on the subject.
A lot of the posts are confusing in regards to adding new AB's and I was wondering whether there was a clear and precise guide for CRM 7. A lot cover 5.1/ 5.2 and vary slightly from CRM 7.
With regards
Jason
User | Count |
---|---|
7 | |
1 | |
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.