on 03-22-2013 2:02 PM
Dear experts,
I'm working on an enhancement on an ABAP Web Dynpro.
I created a Button element and bound the attributes "ENABLE" and "VISIBLE" to the same Context attribute, which is called "DISPLAY_MODE".
In WDDOMODIFYVIEW I basically check if the user is in DISPLAY or in EDIT mode; if in DISPLAY mode, then DISPLAY_MODE attribute in the context is set to 'X'.
What I'd like to have:
Unfortunately, it doesn't work. The visibility binding works like a charm, while the enable one doesn't work as even if in DISPLAY mode, the button remains disabled (it turns grey).
I tried then to force the attribute in WDDOMODIFYVIEW as follows:
DATA: btn_elem TYPE REF TO IF_WD_VIEW_ELEMENT,
cust_button TYPE REF TO CL_WD_BUTTON.
CALL METHOD VIEW->GET_ELEMENT
EXPORTING
ID = 'PURCHGRP_EDIT'
RECEIVING
ELEMENT = btn_elem
.
cust_button ?= btn_elem.
CALL METHOD cust_button->SET_ENABLED
EXPORTING
VALUE = abap_true
.
but again, that doesn't work as in DISPLAY mode, the field remains disabled.
Any suggestion on the task? Please help me finding a workaround
Hi,
In edit mode you don't want button and in display mode you need button. So i don't think you need to bind the enable property also. jus remove the enable property binding and make it visible in display mode and hide it in edit mode.
Also its should work if you bind the enable property also, may be something you have done wrong. jus check once again.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.