on 03-17-2011 5:28 AM
Hi Experts,
I have a overview page and search page in my component, I select a record from search and navigate to overview page.
The problem is , I have to get overview page in display or edit mode on the basis of button selected in search page, and there will be a button in overview page which will togle from display mode to edit mode.
I am getting overview page in edi tmode by default.
Could you please help me out to toggle the overiew page from Display- edit - Display.
Thanks in advance
Madhu Omer
Please check the class CL_BT108H_L_LEADOVVIEWSET_IMPL which is for Leads Viewset and the method CREATE_NEW.
* Set views editable
IF me->view_group_context IS BOUND.
* Reset view group context
me->view_group_context->reset( ).
lr_tx ?= lr_order->get_transaction( ).
me->view_group_context->set_associated_tx_context( lr_tx ).
me->view_group_context->set_all_editable( ).
ENDIF.
This above code with some adjustments will solve your purpose.
Rg,
Harshit Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am able to make my view by default in display mode by writing code in html page of view:
<chtmlb:config xml = "<%= controller->configuration_descr->get_config_data( ) %>"
mode = "RUNTIME"
displayMode = "<%= controller->view_group_context->is_view_in_display_mode( controller ) %>" />
and in set_view_group_context method of main window:
method SET_VIEW_GROUP_CONTEXT.
IF iv_first_time EQ abap_true AND
me->view_group_context IS NOT BOUND.
IF iv_parent_context IS INITIAL.
CREATE OBJECT me->view_group_context
TYPE cl_bsp_wd_view_group_context.
ELSE.
me->view_group_context = iv_parent_context.
ENDIF.
ENDIF.
endmethod.
To edit your view , write below code on your edit button:
DATA: lr_cn TYPE REF TO cl_bsp_wd_context_node,
lr_ent TYPE REF TO cl_crm_bol_entity,
lr_vgc type ref to if_bsp_wd_view_group_context.
Get current AdminH-Entity
lr_cn = me->get_context_node( gc_clnobj ).
check lr_cn is bound.
lr_ent ?= lr_cn->collection_wrapper->get_current( ).
CHECK lr_ent IS BOUND.
IF lr_ent->is_locked( ) = abap_true.
me->view_group_context->set_all_editable( ).
lr_vgc ?= view_group_context->get_dependant_vg_context( ).
lr_vgc->set_all_editable( ).
ELSE.
lr_ent->lock( ).
IF lr_ent->is_locked( ) = abap_true.
me->view_group_context->set_all_editable( ).
lr_vgc ?= view_group_context->get_dependant_vg_context( ).
lr_vgc->set_all_editable( ).
ENDIF.
ENDIF.
Edited by: Madhu Omer on Apr 3, 2011 12:00 PM
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.