on 11-18-2015 2:23 PM
Hello Experts.
I have a Initial Screen and OVP Main page with some UIBB of different kind.
I want to ( after check some conditions ) set a UIBB to Display Mode in the event Leave Initial Screen.
I got the applicaction IF_FPM and IF_FPM_OVP references but i don't see a method to change a UIBB to Display Mode
There is a way to do that?
Thanks!
Hi Mariano,
To Enable and disable controls you need to set read_only_ref property of Field Description in GET_DEFINATION method of your Feeder class as shown below:
APPEND INITIAL LINE TO et_field_description ASSIGNING <fs_field_description>.
<fs_field_description>-name = 'COUNTRY'.
<fs_field_description>-read_only_ref = 'READ_ONLY'.
Then In Get_data method you can set CT_FIELD_USAGE-read_only = abap_true.
LOOP AT ct_field_usage INTO ls_field_usage.
IF ls_field_usage-name EQ lc_dept_id.
ls_field_usage-read_only = abap_true.
MODIFY ct_field_usage FROM ls_field_usage.
ENDIF.
ENDLOOP.
ev_field_usage_changed = abap_true.
If you want to disable table control then you can do that as below:
In GET_DATA method of LIST UIBB there is one Parameter called IO_EXTENDED_CTRL of IF_FPM_LIST_ATS_EXT_CTRL.
You can use
io_extended_ctrl->set_table_enabled( abap_false ). "TO Disable table
io_extended_ctrl->set_table_enabled( abap_true ). "TO Enable table
Please have look to below posts:
Thanks-
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariano,
May you please elaborate on "global"...
Although if you want this control to be on standard "FPM_SAVE" event you can Handel this event in GET_DATA and put your code there it will still work.
If you want this control to be on Buttons also (assuming) toolbar buttons, that you can do as follows:
DATA:
ls_tb_bt TYPE if_fpm_ovp=>ty_s_toolbar_button,
CALL METHOD mo_ovp->get_toolbar_button
EXPORTING
iv_content_area = iv_content_area
iv_toolbar_element_id = iv_toolbar_element_id
IMPORTING
es_toolbar_button = ls_tb_bt.
set status of your button
ls_tb_bt-enabled = abap_true/abap_false.
Or set visibility
ls_tb_bt-visibility = if_fpm_constants=>gc_visibility-visible.
Finally update to toolbar
CALL METHOD mo_ovp->change_toolbar_button
EXPORTING
iv_content_area = iv_content_area
is_toolbar_button = ls_tb_bt.
RETURN.
Thanks-
Abhishek
Abhishek,
what i meant with "global" was a method or structure on the FPM that indicates that the UIBB is editable or not.
someting like uibb->set_editable( true )
I've changed a little of my logic and solved this issue by:
- Seting default edit mode to R
- and after processing the event leave_initial_screen, if some condition is satisfied, the event FPM_EDIT is raised.
-If the condition is not satisfied the application remains in read only mode.
Thanks again for your help.
Mariano.
Hi Mariano,
there is a global handling of edit mode in FPM: Please check the FPM cookbook:
-> 3.3.1.2 Edit and Display Mode in OVP
In case that this is not sufficient then go ahead as Abhishek advised. In that case this blog
might be helpful:
Kind regards,
Ulrich
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.