on 09-20-2013 11:28 AM
Dear FPM Experts,
I have one FPM OVP tool bar button (Named : Submit) which is "not visible" by default.Based on some condition, i need to make that submit button visible.
For make it visible,here is my code
DATA : lo_fpm TYPE REF TO if_fpm .
DATA : lo_fpm_cnr_ovp TYPE REF TO if_fpm_cnr_ovp.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm_cnr_ovp ?= lo_fpm->get_service( if_fpm_constants=>gc_service_key-cnr_ovp ).
DATA lw_button TYPE if_fpm_ovp=>ty_s_toolbar_button.
DATA lw_content_areas TYPE if_fpm_ovp=>ty_s_content_area.
"Show toolbar buttons
TRY.
"Show toolbar buttons
CALL METHOD lo_fpm_cnr_ovp->get_toolbar_button
EXPORTING
iv_toolbar_element_id = 'SUBMIT_ID' " FPM: Element ID
IMPORTING
es_toolbar_button = lw_button. " Toolbar button attributes
CATCH cx_fpm_floorplan. " Floorplan exceptions
ENDTRY.
lw_button-visibility = 02. "Is Visible
TRY.
CALL METHOD lo_fpm_cnr_ovp->change_toolbar_button
EXPORTING
is_toolbar_button = lw_button. " Toolbar button attributes
CATCH cx_fpm_floorplan. " Floorplan exceptions
ENDTRY.
but the submit button is not getting visible for the above code.Pls guide me what i'm missing.
Note : In my scenario,IF_FPM_CNR_OVP interface does not have method : Define_method()
Thanks
Katrice
Hello Katrice,
you have to implement the method OVERRIDE_EVENT_OVP from the Comp-Interface IF_FPM_OVP_CONF_EXIT.
Here you get the FPM OVP-Object:
With this object you can change all UI-Elements of the OVP.
Coding_exampel to enable/disable buttons:
SET_BUTTON_ENABLE |
---|
|
In the same way you can set the buttons visibility or other propertys.
LS_TOOLBAR_OVP_BUTTON -VISIBILITY = 02.
Regards
Shkelqim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Katrice,
Code seeems to be ok for your requirement. But Quick question here where have you placed this coding..?? In your feeder class or in APPCC(Application controller class).
If you have placed it in your feeder class then it's overridden by APPCC class.
Advantage of placing it in appcc you don't have to create cnr_ovp instance in class. you can make use of io_ovp instance which is provided by framework.
Thanks & Regards
Praveen Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.