Recently i have found some posts like how to edit the dynamic result list in search/result view because of that I made this document.
Create search and result view by using this link.
SAP CRM OneOrder Advanced Search WebUI Component - part1
CRM 7.0 How to --5E Search View and Search Result
step1 : For edit the table fields go to do_init_context method in result view.
Double click on that method ( do not redefine the method ) and change the selmode_single to selmode_multiedit.
typed_context->RESULTCN->set_selection_mode(
IV_SELECTION_MODE = CL_BSP_WD_CONTEXT_NODE_TV=>selmode_multiedit
).
Step 2 : Go to the result view and generate getter and setter methods for the result fields.
In this scenario I want to display partner field editable and rest of the fields are in disabled mode because of that i generate getter and setter methods for PARTNER . Using Get_I method you can make your field as grade out based up on any condition.
IF CURRENT->GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'PARTNER' ) IS INITIAL.
RV_DISABLED = 'TRUE'.
ELSE.
RV_DISABLED = 'FALSE'.
ENDIF.
Step 3: In result view redefine the method do_prepare_output.
view_group_context->SET_VIEW_EDITABLE( iv_view_controller = me ).
Step 4: In result view .htm check whether displaymode attribute field is available or not if not attach tag attribute displaymode in .htm
Step 5 : redefine SET_VIEW_GROUP_CONTEXT in window controller.
write the below logic..
if you want to know more about why we need this method go through this link..
SAP CRM WEB UI : 47.UNDERSTANDING VIEW GROUP CONTEXT
IF ME->VIEW_GROUP_CONTEXT is not bound and IV_FIRST_TIME = ABAP_TRUE.
IF IV_PARENT_CONTEXT IS INITIAL.
CREATE OBJECT VIEW_GROUP_CONTEXT TYPE CL_BSP_WD_VIEW_GROUP_CONTEXT.
ENDIF.
ENDIF.
This is the final output.
Thanks & Regards
Srinivask
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |