on 01-24-2013 4:15 AM
Dear Experts,
Can anyone help me in creating buttons dynamically in webdypro?.
The scenario is " i have one webdynpro screen.In that, at requestor level-the requestor screen should contain only SAVE,DELETE buttons & at approval level-the approver sceen should contain only APPROVE & REJECT buttons.
Please help with any example code/documents/links which helps me achieve this functionality.
Thanks
Katrice
In my scenario,I'm using Feeder class with IF_FPM_OVP component.How to achieve this button visibitity functionality in OVP using feeder class>?
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Define attributes MR_FPM of type ref to IF_FPM and MR_CNR of type ref to IF_FPM_CNR_OVP in component controller.
2. Get the reference to the IF_FPM interface in WDDOINIT of COMPONENTCONTROLLER
wd_this->mr_fpm = cl_fpm_factory=>get_instance( ).
3. Now in the WDDOMODIFYVIEW of your view check the user is of requester level or approver level and based on the condition define the required buttons like :
wd_comp_controller->mr_cnr ?= wd_comp_controller->mr_fpm->get_service( if_fpm_constants=>gc_service_key-cnr_ovp ).
CALL METHOD wd_comp_controller->mr_cnr->define_button
EXPORTING
iv_variant_id = 'YOUR_VARIANT_ID'
* iv_mainstep_id = 'YOUR_MAIN_STEP_ID'
** iv_subvariant_id = ''
** iv_substep_id = ''
iv_function = if_fpm_constants=>gc_button-other_function
iv_element_id = 'SAVE'
* iv_sequence_id = '0'
iv_design = '01'
iv_enabled = 'X'
** iv_explanation = ''
* iv_on_action = 'FPM_NEXT_STEP'
iv_text = 'YOUR BUTTON TEXT'
* iv_tooltip = ''
* iv_visibility = ''
* iv_default_button = ''
* iv_hotkey = ''
.
Issue resolved.
Special thanks to Upendra Agrawal and Aravind Aravi for their valuable replies.
P.S : points rewarded.
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to achieve this same functionality using feeder class?
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Katrice,
See this example from sap technical.com.. how to create a Feeder class and UI elements in it .. hope it helps you..
http://www.saptechnical.com/Tutorials/WebDynproABAP/GUIBB/Feeder.htm
Regards
Aravindan
If you are having the same view (screen) for requester and approver then you may create all the buttons ( SAVE,DELETE, APPROVE & REJECT ) in your view and based on the condition whether requester level or approver level you can hide the ones which you do not require.
Check :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Katrice,
Below are some links , which helps you to learn creation of UI elements dynamically in webdynpro..
the below one is an example for hiding and enabling ui elements ..
http://webdynproabap.wordpress.com/2012/10/08/dynamic-ui-element/
Hope it helps you..
Regards
Aravindan
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 | |
11 | |
10 | |
9 | |
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.