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.
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.
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’.
RV_DISABLED = ‘FALSE’.
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..
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.
This is the final output.
Thanks & Regards