on 12-16-2012 4:45 AM
Hi i have a requirement please help me how to do this process?
The parties involved assignment block should be enabled only if the person who is responsible for processing the lead (i.e. Responsible Person) is the opening the lead.
In the below screen shot the user id who has logged in should be same as assigned in the BP given in responsible person...only then the Parties involved assignment block should be enabled. Otherwise that assignment block should be disabled.
PLEASE HELP ME HOW TO RESOLVE THIS REQUIREMENT
SEND ME DETAIL STEP BY STEP PROCUDURE
Anitosh,
in the view/viewset impl class where the edit button is placed , redefine the method SET_VIEW_GROUP_CONTEXT and create an instance
IF iv_first_time EQ abap_true AND view_group_context IS INITIAL.
IF iv_parent_context IS INITIAL.
CREATE OBJECT view_group_context
TYPE
cl_bsp_wd_view_group_context.
ELSE.
view_group_context ?= iv_parent_context.
ENDIF.
ENDIF.
Then in the event handler of the edit button make the view editable
me->view_group_context->set_all_editable( ).
Then in the .htm of the view , in the chtmlb tag ,
displayMode = "<%= controller->view_group_context->is_view_in_display_mode( controller )
Try this and let me know if it works !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in my partner.htm code is below like this please check this code which is in my ideas systems
<%@page language="abap" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%
DATA:
lv_editlist TYPE string,
lv_displaymode TYPE string.
IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
lv_editlist = 'FALSE'.
lv_displaymode = 'X'.
ELSE.
lv_editlist = 'TRUE'.
lv_displaymode = ' '.
ENDIF.
%>
<chtmlb:tableExtension tableId = "ttntable"
layout = "FIXED" >
<thtmlb:areaFrameSetter toolbarButtons = "<%= controller->gt_button_ablevel %>"
maxButtonNumber = "1"
displayMode = "<%= lv_displaymode %>" />
<chtmlb:configTable id = "Table"
navigationMode = "BYPAGE"
onRowSelection = "select"
table = "//BTPartner/Table"
width = "100%"
allRowsEditable = "TRUE"
usage = "ASSIGNMENTBLOCK"
displayMode = "<%= lv_displaymode %>"
headerVisible = "FALSE"
personalizable = "FALSE"
downloadToExcel = "FALSE"
actions = "<%= controller->gt_button %>"
actionsMaxInRow = "6"
hasLeadSelection = "TRUE"
selectionMode = "<%= BTPartner->selection_mode %>"
selectedRowIndex = "<%= BTPartner->SELECTED_INDEX %>"
selectedRowIndexTable = "<%= BTPartner->SELECTION_TAB %>" />
</chtmlb:tableExtension>
in this code where i have to give ur code?
its already there right ..
DATA:
lv_editlist TYPE string,
lv_displaymode TYPE string.
IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
lv_editlist = 'FALSE'.
lv_displaymode = 'X'.
ELSE.
lv_editlist = 'TRUE'.
lv_displaymode = ' '.
ENDIF.
%>
<chtmlb:tableExtension tableId = "ttntable"
layout = "FIXED" >
<thtmlb:areaFrameSetter toolbarButtons = "<%= controller->gt_button_ablevel %>"
maxButtonNumber = "1"
displayMode = "<%= lv_displaymode %>" />
<chtmlb:configTable id = "Table"
navigationMode = "BYPAGE"
onRowSelection = "select"
table = "//BTPartner/Table"
width = "100%"
allRowsEditable = "TRUE"
usage = "ASSIGNMENTBLOCK"
displayMode = "<%= lv_displaymode %>"
i already place your code in theSET_VIEW_GROUP_CONTEXT method its generated sucussfullly without errors
and i redefine EH_ONEDITLIST event handler and drop your code there also its also sucussfully generated without errors
i am struck with .htm code only i already sent that code part to you which is in my system
in that code part where i have to mention your lines?
ANitosh,
Put a break point in the SET_VIEW_GROUP_CONTEXT method and in the .htm code as highlighted below
<%@page language="abap" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%
DATA:
lv_editlist TYPE string,
lv_displaymode TYPE string.
IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
lv_editlist = 'FALSE'.
lv_displaymode = 'X'.
ELSE.
lv_editlist = 'TRUE'.
lv_displaymode = ' '.
ENDIF.
check whether its working ??
Anitosh,
Pls use the 'REATTACH_STATIC_OVW_VIEWS' and 'DETACH_STATIC_OVW_VIEWS'methods, to dynalically hide and change the Assignment blocks ..
insert your logic in these methods ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for your input
i dont want to hide assignment block i just need to disable based on log in user is matched with employee resposible then only my assingment block willl be enable other wise means
login user is not matched with employee resposible then i want to disbale entire assignment block as disable...
please send me procedure how to do this?
through code part
hi
i am explain in detail my requirement
in general lead will create and lead id will generate when lead create we wil give employee resposible name and created lead
now my requirement in webui if log in user is match with employee resposible name then only that created lead willl be able to give option to change any modification on assingment block
other wise means if log in user name not match with employee responsible then i dont want to give access to edit or do any modification on that assignment block
i just disbale all properties of assignment block ..
(this is not the case of expand and lazy)
Anitosh,
Can u redefine the VIEW_GROUP_CONTEXT
write the logic as below:
DATA: lr_entity TYPE REF TO cl_crm_bol_entity.
lr_entity ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
CHECK lr_entity IS BOUND.
if lr_entity->lock( ) = abap_true.
me->view_group_context->set_view_editable( me ).
endif.
u can use the below code in .htm as well
If you are using thtmlb:tableView then set the below parameters to make it editable,
ajaxDeltaHandling = "TRUE"
allRowsEditable = "TRUE"
for chtmlb:configTable
allRowsEditable = "TRUE"
User | Count |
---|---|
5 | |
1 | |
1 | |
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.