on 09-17-2013 4:39 PM
Hi Experts,
My req is regarding FPM. Actually in my view, I have some buttons like SUBMIT CHECK EDIT etc.
What I want is with some condition I have to hide SUBMIT button from the view when populating the view.
I wrote the below code in the WDINIT of the view, but it is giving an error, that is attached below.
Please help....
Error :-
Check in ST22 Short Texts, what exactly is the cause of error.
Also, before calling define_button( ) , check if the instance you mentioned wd_this->go_fpm_oif is bound or not. for e.g.
if wd_this->go_fpm_oif is bound.
wd_this->go_fpm_oif->define_button(....)...
endif.
Try possibly with below code and do let us know.
*----Get a handle to the CNR.
DATA LO_CNR_OIF TYPE REF TO IF_FPM_CNR_OIF.
lo_cnr_oif ?= cl_fpm_service_manager=>get_service( cl_fpm_service_manager=>gc_key_cnr_oif ).
*---Hide FPM close-button
DATA lt_buttons TYPE if_fpm_cnr_oif=>t_button.
lo_cnr_oif->get_buttons(
EXPORTING
iv_variant_id = 'v1' "Variant is generally available at Comp Configuration Level
IMPORTING
et_buttons = lt_buttons ).
"Hiding Close Button, Same in above internal table lt_buttons you will get your Submit Button FUNCTION & ELEMENT_ID so as to
"control visibility.
lo_cnr_oif->define_button(
EXPORTING
iv_function = if_fpm_constants=>gc_button-close
iv_visibility = cl_wd_uielement=>e_visible-none ).
Thanks & Regards
Tushar S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thushar,
My issue is solved...
Thank you .....
Actually the code which you have given is for EDIT button. But my requirement was SUBMIT button. As SUBMIT button was not standard button I made a small change in the code and it is working fine now.
In the method define_button,
lo_cnr_oif->define_button(
EXPORTING
iv_function = if_fpm_constants=>gc_button-alternate_function
iv_element_id = 'SUBMIT' " Event id of my Button
iv_visibility = cl_wd_uielement=>e_visible-none ).
Thanks to all for valuable suggestions ........
Anoop Satheesan
Shouldn't be difficult if you are using OVP pattern. You can probably get the parameters in
PROCESS_EVENT
GET_DATA
methods of your FEEDER CLASS.
Does that make sense ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can hide the button in the FPM configuration itself. Why you need to write the code?
Also post your question in FPM or Webdynpro forum to get maximum response
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then the get_service calls returns null values so it leads to short dump.
Can you try modifyview
Here is the link to
http://scn.sap.com/community/web-dynpro-abap/floorplan-manager
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.