on 12-09-2011 10:05 AM
Hello all
i am facing the following issue:
I added a new custom check box to Webdynpro Component SAPSRM/WDC_SC_WZ_GAF_3ST
How to make it behave according to the mode if DISPLAY mode to have it read-only, in EDIT mode - enabled.
how can i get the the mode in the webdynpro?
thanks
Imrich
Hello,
use below code in modify view post exit.
Please create a attribute Enable and bind this attibute to the check box checked property.
DATA: lo_wd_view_controller TYPE REF TO if_wd_view_controller,
lo_wd_comp_controller TYPE REF TO /sapsrm/iwci_wdi_l_fpc_general,
lo_task_container TYPE REF TO /sapsrm/if_cll_task_container,
lv_pdo_fill TYPE /sapsrm/pdo_inst_mode,
lv_lines TYPE i.
*
Instantiate the component controller and task container
lo_wd_view_controller = wd_this->wd_get_api( ).
lo_wd_comp_controller = wd_comp_controller.
lo_task_container = wd_comp_controller->mo_task_container.
*
Get the transaction mode
CALL METHOD lo_task_container->get_transaction_mode
IMPORTING
ev_pdo_trans_mode = lv_pdo_fill.
If lv_pdo_fill EQ DISPLAY.
@TODO fill attribute
lv_enable = 1.
set single attribute
lo_el_context->set_attribute(
name = `ENABLE`
value = lv_enable ).
Endif.
If lv_pdo_fill EQ EDIT.
@TODO fill attribute
lv_enable = ' ' .
set single attribute
lo_el_context->set_attribute(
name = `ENABLE`
value = lv_enable ).
Endif.
Regards,
Neelima
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.