on 12-02-2008 11:49 AM
Hey Folks,
I have worked on WD4A earlier. But POWL is a relatively newer concept to me.
I need to hide a create sales order button in customer search iView from those displayed on my POWL-ALV Toolbar .
As of my understanding i found two prospects of those buttons being on toolbar:-
1:-They are configured at runtime from
Class:CL_POWL_EASY_FEEDER
2. While initilization of powl_table_comp
Any thoughts on this? Does the POWL component configuration need to be done ? Pardon my ignorance on this. I would be really thankful to someone who can throw a light on this.
here are the techinical details of the button create sales order
Technical Information for UI Element
General Information About the Application and Component
Application: POWL
Web Dynpro Component: SALV_WD_TABLE
Window Information: TABLE
View Information: VIEW_TABLE
Configuration ID: O200705080740527294200
Information on Field
Field ID: F_CREA
Type of UI Element: TOOLBAR_BUTTON
UI Element Library: STANDARD
Attributes of UI Element
List of Attributes
Attribute Name Value Context Path Type
COLLAPSIBLE
DESIGN standard (00)
EXPLANATION
TEXT Create Sales Order
IMAGE_FIRST X
IMAGE_SOURCE
TEXT_DIRECTION inherit (02)
ENABLED
TOOLTIP
VISIBLE visible (02)
ON_ACTION
VALUE_HELP_KIND
VALUE_HELP
FULL Cream points waiting for the solution
Regards
Aman
Hi,
I have done a similiar hiding work of the button. in my case i traced down to the Feeder class for the particular POWL.
i.e., /ZZZZZZ/CL_POWL_QT_ZZZZ_FEEDER
is the class which feeds the various actions(buttons) to the POWL.
Then i wrote a post-exit for the particular method which instructs the POWL regarding the buttons to be present.
IF_POWL_FEEDER~GET_ACTIONS
One of the parameter to the method is C_ACTION_DEFS which is of a structure type
POWL_ACTDESCR_TTY
One of the field of the above structure is "action_id"(decides whihc action to be present).
so by removing the particular "action_id" from the parameter c_action_defs, i was able to remove a particular button.
please try way. Try cracking down to the feeder class and handle in this way.
Thanks,
selvakumar M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi selva,
Thanks for ur rply,
1. Actually in GETACTION of class cl_powl_easy_feeder
Get Action definition from database
select * from powl_easy_act into table gt_actdef
where feeder_class = l_class
and ( powl_type = powl_type or
powl_type = space ).
endif.
when i navigate into powl_easy_act table i canot see those button text that are displayed in POWL-ALV, Ex..( 1.Create Sales Order 2.customer cockpit etc )
my target is to hide Create sales Order button from toolbar.
After seeing ur response i tried it with home class of powl Cl_POWL_DEMO_SFLIGHT
2.In this Class if i go to method Get Action there i can see some buttons as guided by you
data: ls_action_defs type powlactdescr_sty_,
ls_act_choices type powl_act_choice_sty,
lv_counter type c.
if c_action_defs is initial.
choice button
ls_action_defs-actionid = 'CHOICE'. "#EC NOTEXT
ls_action_defs-cardinality = 'S'.
ls_action_defs-placement = 'B'.
ls_action_defs-enabled = 'X'.
ls_action_defs-text = 'Dummy selector'. "#EC NOTEXT
ls_action_defs-add_separator = 'X'.
ls_act_choices-actionid = 'OBN'. "#EC NOTEXT
ls_act_choices-enabled = 'X'.
ls_act_choices-text = 'Test OBN'. "#EC NOTEXT
insert ls_act_choices into table ls_action_defs-act_choices.
ls_act_choices-actionid = 'MSG'. "#EC NOTEXT
ls_act_choices-enabled = 'X'.
ls_act_choices-text = 'Test messages'. "#EC NOTEXT
insert ls_act_choices into table ls_action_defs-act_choices.
insert ls_action_defs into table caction_defs_.
clear ls_action_defs.
ls_action_defs-actionid = 'INSERT'. "#EC NOTEXT
ls_action_defs-cardinality = 'S'.
ls_action_defs-placement = 'B'.
ls_action_defs-enabled = 'X'.
ls_action_defs-text = 'Insert line'.
insert ls_action_defs into table c_action_defs.
clear ls_action_defs.
ls_action_defs-actionid = 'DELETE'. "#EC NOTEXT
ls_action_defs-cardinality = 'S'.
ls_action_defs-placement = 'B'.
ls_action_defs-enabled = 'X'.
ls_action_defs-text = 'Delete lines'.
insert ls_action_defs into table c_action_defs.
e_actions_changed = 'X'.
endif.
Suppose from this scnerio i need to hide delete button that is now in caction_defs_ can u please give me the relevent code as how to hide this delete button, i will utilize it with my button once i will found that.
Handsome points on for you
Regards Saurabh
Hi,
write a post exit for the method and inside the method try writing code something like this
data: ls_action_defs type powlactdescr_sty_,
ls_act_choices type powl_act_choice_sty,
lv_counter type c.
ls_action_defs-actionid = 'DELETE'. "#EC NOTEXT
ls_action_defs-cardinality = 'S'.
ls_action_defs-placement = 'B'.
ls_action_defs-enabled = 'X'.
ls_action_defs-text = 'Delete lines'.
Delete c_action_defs from ls_action_defs.
this code will help you to remove the button corresponding to the action id "delete".
hope it will be helpful.
thanks,
selvakumar M.
Edited by: selvakumar mohan on Dec 3, 2008 3:15 PM
Hi Experts,
Please help me...
I am new to SAP HR ABAP Programming.. Here I need to develop a Expenses claim form( ESS)
I require a custom report to get the employee details in form and they can fill their travel expenses and other expenses manually in the form and that should be send to manager for approval.
I don't know from which Infotype I can get these details for the specific employee who are logged in to ESS, what are the Function Modules and which workflow process we can use for the approval ...Etc
I am providing detail form below please give me some information about the report and workflow..
Please someone help me to overcome this situation..
Regards,
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Selva ,
Can u please tell me if without changing the code of sap we can hide the button, i mean with Application Confrigation please let me know
1. I found Package ERP_SALES_O2C_SLIS in that class CL_O2C_POWL_CUSTOMERS
there in method GET_ACTION i found the button
" Create Sales Order
ls_action-actionid = 'CREA'.
ls_action-cardinality = 'S'. "single
ls_action-placement = 'B'. " toolbar
ls_action-enabled = 'X'.
ls_action-placementindx = 3.
ls_action-text = cl_wd_utilities=>get_otr_text_by_alias( 'ERP_SALES_O2C_MAIN/CREATE_SALES_ORDER' ).
insert ls_action into table lt_action_def.
clear ls_action.
So now to hide this CREA button Two solutions are possibe
1 To comment the code in orignal code.
2 By some confriguration so please tell me how to go ahead
regards
Aman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi aman,
U can simply make the property enabled to space.
ls_action-actionid = 'CREA'.
ls_action-cardinality = 'S'. "single
ls_action-placement = 'B'. " toolbar
ls_action-enabled = ' '. " like this
ls_action-placementindx = 3.
ls_action-text = cl_wd_utilities=>get_otr_text_by_alias( 'ERP_SALES_O2C_MAIN/CREATE_SALES_ORDER' ).
insert ls_action into table lt_action_def.
clear ls_action.
R if you want to hide the button after user action in the screen then you have write the logic in handle action using c_action_defs.
If you want to hide the standard buttons like print, export or dropdown view, u can use application configuration to hide those buttons, but since it is from your code. U have to do it in your feeder class level itself.
If you need any more clarification, feel free to ask....
Regards....
Arun.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.