on 03-03-2016 7:02 AM
Hi Guys,
this is siva i am developed a toolbar button(button choice) dynamically but i want to change my button position in fpm toolbar can you please send me the fast reply regarding this .
Hi,
you have to implement the method OVERRIDE_EVENT_OVP from the Comp-InterfaceIF_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:
SET_BUTTON_POSITION |
---|
METHOD SET_BUTTON_POSITION .
|
In the same way you can set the buttons position or other properties.
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 Shkelqim Turkaj thnx for giving reply,
but my requirement in fpm_oif_component , i am created a button dynamically using interface 'if_fpm_cnr_oif'
its working also i wan to change button possition in fpm ,buton name is logout(button choice) it want to change tright side position on toolbar can you please give me the other way shkelqim.its ugent bro please.
Hi,
you can change the attributes with the interface method DEFINE_BUTTON.
Step 1 - Get MR_CNR_OIF reference:
COMPONENTCONTROLLER->WDDINIT
DATA: lo_fpm TYPE REF TO if_fpm.
wd_this->mr_fpm = cl_fpm_factory=>get_instance( ).
wd_this->mr_cnr_oif ?= wd_this->mr_fpm
->get_service( if_fpm_constants=>gc_service_key-cnr_oif ).
Step 2 - Call method define_button:
CALL METHOD wd_this->mr_cnr_oif->define_button
EXPORTING
iv_variant_id = ....
iv_function = 'LOGOUT'
iv_sequence_id = LV_POSITION' "Only relevant for non-standard buttons
iv_element_id = '*LOGOUT*'
iv_enabled = abap_true
iv_visibility = '01'. "invisible.
You find a lot of examples in the WD Component FPM_TEST_DYNAMIC_CNR_OIF (see picture).
thank you so much for reply shkelqim,
my button is define button choice method .
DATA:LO_FPM TYPE REF TO IF_FPM.
LO_FPM = CL_FPM_FACTORY=>GET_INSTANCE( ).
WD_THIS->CNR_OIF ?=
LO_FPM->GET_SERVICE( IF_FPM_CONSTANTS=>GC_SERVICE_KEY-CNR_OIF ).
**dynamic creation of Sales person buttonn choice
DATA: LT_MENU_ACTION_ITEMS TYPE IF_FPM_CNR_OIF=>T_MENU_ACTION_ITEMS,
LS_MENU_ACTION_ITEMS LIKE LINE OF LT_MENU_ACTION_ITEMS.
LS_MENU_ACTION_ITEMS-TEXT = 'Log Out'.
* LS_MENU_ACTION_ITEMS-action_type = 'FPM_BACK_TO_MAIN'.
LS_MENU_ACTION_ITEMS-ON_ACTION = 'FPM_BACK_TO_MAIN'.
LS_MENU_ACTION_ITEMS-ENABLED = ABAP_TRUE.
APPEND LS_MENU_ACTION_ITEMS TO LT_MENU_ACTION_ITEMS.
LS_MENU_ACTION_ITEMS-TEXT = 'Change Password'.
LS_MENU_ACTION_ITEMS-ON_ACTION = 'Forget_Paw_action'.
LS_MENU_ACTION_ITEMS-ENABLED = ABAP_TRUE.
APPEND LS_MENU_ACTION_ITEMS TO LT_MENU_ACTION_ITEMS.
*Get Salesperson Name
DATA LO_ND_USERDET TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_USERDET TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_USERDET TYPE WD_THIS->ELEMENT_USERDET.
DATA LV_SPNAME TYPE WD_THIS->ELEMENT_USERDET-SPNAME.
* navigate from <CONTEXT> to <USERDET> via lead selection
LO_ND_USERDET = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_USERDET ).
* @TODO handle non existant child
* IF lo_nd_userdet IS INITIAL.
* ENDIF.
* get element via lead selection
LO_EL_USERDET = LO_ND_USERDET->GET_ELEMENT( ).
* @TODO handle not set lead selection
IF LO_EL_USERDET IS INITIAL.
ENDIF.
* get single attribute
LO_EL_USERDET->GET_ATTRIBUTE(
EXPORTING
NAME = `SPNAME`
IMPORTING
VALUE = LV_SPNAME ).
CALL METHOD WD_THIS->CNR_OIF->DEFINE_BUTTON_CHOICE
EXPORTING
IV_VARIANT_ID = 'VARIANT_1'
IV_FUNCTION = 'OTHER_FUNCTIONS'
*IV_ELEMENT_ID = 'test'
*IV_SEQUENCE_ID =
IV_ENABLED = ABAP_TRUE
IV_TEXT = LV_SPNAME
IV_TOOLTIP = 'LOG OUT'
IV_VISIBILITY = CL_WD_BUTTON=>E_VISIBLE-VISIBLE
IT_MENU_ACTION_ITEMS = LT_MENU_ACTION_ITEMS.
* IV_SCREEN =
* IV_REPEAT_SELECTED_ACTION =
.
how can i change this define button choice position.
please give me fast reply it urgent bro
Hi Bro,
here toolbar is standard buttons is dynamically created that button in left side i want move that button choice into right side. that is my requirement in that button two actions is thee one i logout and another one is change password all functionality is working but wan to chage button position
please give me reply guys. its urgent.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.