on 11-04-2013 2:11 PM
Dear webdynpro gurues:
I'm currently implementing "Enterprise Compensation Management", the webdrynpro that controlls this is this one:
http://help.sap.com/erp2005_ehp_05/helpdata/en/ea/eb0926874d4d218f71ca7aaaa053bc/content.htm it seems it is based on GAF.
I would like to enhance this webdynpro so that a button is only allowed for some users (the approval button). Is there any way to enhance that webdyrpo to add custom code? Perhaps adding a controller which get triggered when the button is pressed so I can validate the user and send an error message... I know nothing about this so if anyone out there can give me a hand or confirm me it is possible (in a standard way) I would really appreciate it.
Thank you very much!
Federico.
Hi,
Refer this link:
http://scn.sap.com/message/14394490#14394490
In this requirement was to remove print and export button.
Let me know if this helps,else i will find exact method to be enhanced for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much friends!
Hitesh I think that with your answer in the other thread I'm very close to my solution. The method provided in the other thread does not get triggered, the screen I need to modify shows up previously and the WD is HRECM00_PLANNING_OVERVIEW. I'm enclosing the technical help of the button from the portal (the button is the "Approve"):
If you have the time and can provide some light on this I would really appreciate it
Thank you very much once again
Hitesh you are the best man! Thanks so much for your great help! I'm trying to control this button so it is enabled for some users, so I need to add a simple logic to determine if the user has the access or not and then change the property. I tried to add this logic in the method PROCESS_BEFORE_OUTPUT of the componentcontroller; however I don't know very well how to modify there the property of the button... May be I'm using the wrong method. I know I'm asking too much but if you happen to have the time to throw me the last hint it would be great
Thank you once again!
Federico.
Hi Frederico,
Although Hitesh has already provided a suitable solution, I would want to throw in the possibility of directly accessing the Button programatically over the View-API. For example using a post exit of wddomodifyview:
(pseudo code, might have syntax errors)
DATA lo_el_approve_but TYPE REF TO cl_wd_toolbar_button.
lo_el_approve_but ?= view->get_element( ID = 'BTN_APPROVE').
IF lo_el_approve_but IS NOT INITIAL.
lo_el_approve_but->set_enabled( EXPORTING VALUE = abap_false).
ENDIF.
Since you were explicitly talking about 'enabling', this might be helpful. Though, manipulation of the View-API with help of the context (see Hiteshs above post tweaking the context value to influence the bound visibility property) is always a 'cleaner' approach in my opinion.
Cheers, Lukas
Lukas / Hitesh:
Your help has been invaluable. I was able to achieve my requirement with your help; I finally used Lukas method because it gets called every time the user creates an event in the webdynpro, so it allows me to verify if the user changed the compensation review and then recheck the authorization for it (WDDDOINIT is only called the first time).
Thank you once again fellas, I owe you both big time.
P.S: for the technical stuff about enhancing a webdynpro I used this document: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Montanana,
If it is a Webdynpro component then you will have to create an enhancement which in turn adds a PRE and PRO exits in any view you are trying to enhance and you will be able to add relevant code as per your requirement.
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.