on 05-18-2012 6:25 AM
Hi,
I want to change the title of my OVP Floorplan. But the correct way for OIF (IF_FPM_IDR) seems not to work:
data lo_idr TYPE REF TO if_fpm_idr.
data lo_fpm TYPE REF TO if_fpm.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_idr ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_idr ).
After this step LO_IDR is initial.
So I try IF_FPM_OVP. There are two methods GET_CURRENT_CONTENT_AREA and CHANGE_CONTENT_AREA. The second method has an attribute to change the title.
data lo_ovp type ref to if_fpm_ovp.
lo_ovp ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_ovp ).
ls = lo_ovp->get_current_area( ).
ls-title = 'TEST'.
lo_ovp->change_content_area( ls ).
This application dumps at runtime, message "Configuration can not changed at this moment" (German "Konfiguration kann zu diesem Zeitpunkt nicht geändert werden").
Reason:
Method IF_FPM_OVP~CHANGE_CONTENT_AREA (CL_FPM_OVP)
Var: me->mv_changeable_by_application = abap_false (Var is initial at runtime)
--> Raise Exception
How can I change this parameter?
Can anyone help?
Best regards
Hello Stefan,
changing a content area via method IF_FPM_OVP~CHANGE_CONTENT_AREA is only possible with an Application Configuration Controller (AppCC). This AppCC must either be a WD component implementing WD interface IF_FPM_OVP_CONF_EXIT or an ABAP OO class implementing the ABAP OO interface IF_FPM_OVP_CONF_EXIT. The AppCC has to be specified in the OVP component configuration. The logic for changing the OVP content area title must be implemented in the interface method OVERRIDE_EVENT_OVP. It will be called by the OVP runtime at a certain point in time during the FPM event loop. An instance of interface IF_FPM_OVP will be passed as importing parameter to the method.
Another and easier way to change the content area title of the OVP is to use method IF_FPM_CNR_OVP->CHANGE_CONTENT_AREA_RESTRICTED. Here, you are not enforced to use an AppCC. The method can be called at any time during the FPM event loop. An instance of IF_FPM_CNR_OVP can be received in the way that you have described in your coding example above.
Best regards,
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi stefan
I am changing the header of amy fpm page in the action of a button but its not working
.
DATA : lo_ovp TYPE REF TO if_fpm_cnr_ovp.
data lo_fpm_floorplan TYPE REF TO CX_FPM_FLOORPLAN.
data ls_content_area TYPE iF_FPM_OVP=>TY_S_CONTENT_AREA.
TRY.
lo_ovp ?= wd_comp_controller->go_fpm->get_service( 'CNR_OVP' ).
IF lo_ovp IS BOUND.
lo_ovp->get_current_content_area(
RECEIVING RS_CURRENT_CONTENT_AREA = ls_content_area
).
lo_ovp->change_content_area_restricted(
EXPORTING
iv_content_area_id = 'PAGE_2'
iv_title = lv_title ).
ENDIF.
CATCH cx_fpm_floorplan INTO lo_fpm_floorplan.
ENDTRY.
please revert back to me .
Hi prabhatirani ,
You can change the header title of fpm page by using the CHANGE_CONTENT_AREA method of interface IF_FPM_OVP with parameter IS_CONTENT_AREA.
In that you can set the field "title" , it will chane your header.
Note : You have to follow this approach if you changing this from APPCC . If you want to change from normal feeder you have to get the instance of IF_FPM_OVP. Then you can use method CHNAGE_CONTENT_AREA.
Thanks
Praveen Gupta
DATA: go_fpm_ovp TYPE REF TO IF_FPM_CNR_OVP,
ls_cont_area TYPE if_fpm_ovp=>ty_s_content_area.
go_fpm_ovp ?= go_fpm->get_service(
iv_service_key = if_fpm_constants=>gc_service_key-cnr_ovp ).
IF go_fpm_ovp IS BOUND.
ls_cont_area-title = 'Your title'.
ls_cont_area-id = 'PAGE_1'. "your area page id
go_fpm_ovp->change_content_area_restricted(
iv_content_area_id = ls_cont_area-id
iv_title = ls_cont_area-title ).
ENDIF.
Regards,
Gabriela
User | Count |
---|---|
92 | |
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.