Getting the active role of an user in a trigger
Hello forum!!
I've been searching to find out if and how I can get the active role of an user when programming a trigger.
Unfortunately I did not succeed in finding some information about this. Is it possible? If yes, how?
Thanks for any hint regarding this topic.
Sebastian
Thanks for the answers. This helped a lot but it does not seem to work within my triggers.
CREATE OR REPLACE TRIGGER InscriptionsInsert BEFORE INSERT OR UPDATE ON Inscriptions
FOR EACH ROW
DECLARE
active_role VARCHAR2(11);
BEGIN
SELECT role INTO active_role FROM session_roles WHERE role != 'CONNECT';
IF :new.ni < 1000 AND active_role = 'ind_service' THEN
RAISE(ABORT, 'le service individuelle ne peut pas faire les inscriptions pour des sportifs');
END IF;
IF :new.i >= 1000 AND active_role = 'eq_service' THEN
RAISE(ABORT, 'le service equipe ne peut pas faire les inscriptions pour des equipes');
END IF;
END;
CREATE OR REPLACE TRIGGER ResultatsInsert BEFORE INSERT OR UPDATE ON Resultats
FOR EACH ROW
DECLARE
forme VARCHAR2(12);
active_role VARCHAR2(11);
BEGIN
SELECT forme INTO forme FROM Epreuves WHERE nEpreuve = :new.nEpreuve;
SELECT role INTO active_role FROM session_roles WHERE role != 'CONNECT';
IF forme = 'individuelle' AND active_role = 'eq_service'
RAISE(ABORT, 'le service equipe ne peut pas enregistre des resultats pour des sportifs');
END IF;
IF forme = 'equipe' AND active_role = 'ind_service'
RAISE(ABORT, 'le service individuelle ne peut pas enregistre des resultats pour des equipes');
END IF;
END;
Similar Messages
-
How to get the activity of a user?
Hi Experts,
How can we get the activity of a user i.e. Which transaction a particular user has gone or some activity log on a particular date? Any table, FM or Tcode. I have already checked the STAD and SM20 transactions. Some authorization problem. So anything except these Tcodes would be helpful. Thanks in advance.
Regards,
Prashant.>
santhosh kumar wrote:
> Hi,
>
> I guess if it is not updated or traced under STAD means, i.e. related to authorization failures etc.. kind of stuff will be saved at runtime only in the SAP memory.
>
> As it is stored in the buffer, can not be traced in any of the transaction.
> You should request the user to save and send the screen shot of the SU53 of the user whenever he gets some authorization issue.
>
> Based on that, by looking into the SUIM transaction, it can be known whether he is authorized or not, which roles have been assigned etc.. kind of details.
>
> Regards,
> Santhosh.
Hi Santosh,
Actually I am doing a root cause analysis for which I need to know whether a particular user has used a particular TCode. I guess the STAD will display only the current data, is there a TCode to display historical data related to user accessing a particular data. Note: I don't have basis authorization.
Regards,
Prashant -
Is it possible to get the active directory user name of the person
Is it possible to get the active directory user name of the person who is logged onto a windows computer, when they are using your coldfusion site, the same way asp pages can do that?
SECOND TRY TO POST THIS REPLY
You have to turn on "Windows Integrated Security" and turn off anonymous login in the IIS web server, once that condition is met the cgi.AUTH_USER variable will be popluated with the domain/username of the user logged into the cient computer.
If the user is using a windows browser on a windows client computer this will be done silently in the background. Otherwise they will normally be presented with a login dialog box by the browser. -
How to get the active application users IP address in R12 by sql command
Hi ,
I need to know how to get the active application users IP in R12 by sql command
in order to kill any session by the IP address ?
Am working on 12.1.3 Application
And 11.2.0.3 Oracle Database
Thanks936921 wrote:
Am still couldn't found the IP address for the connected Application users.
If there any select statement can help me with that?
Really? Then how do you explain me finding the following docs from the links I referenced above?
How To Find The IP Address Of The Client Machine From Where A Particular Forms User Is Connected ? (Doc ID 879092.1)
How to Track IP Address of the Form Session in Oracle application 11i (Doc ID 878931.1)
Where to find the Client IP Address for a Client in E-Business Suite? (Doc ID 1258415.1)
How To Get The terminal ID For The Machine From Which A User Is Logged To E-Business Suite Applications (Doc ID 751658.1)
Thanks,
Hussein -
BO XI 3.1 : Active Directory Authentication failed to get the Active Directory groups
Dear all
In our environment, there are 2 domain (domain A and B); it works well all the time. Today, all the user belong to domain A are not logi n; for user in domain B, all of them can log in but BO server response is very slowly. and there is error message popup when opening Webi report for domain B user. Below are the error message:
" Active Directory Authentication failed to get the Active Directory groups for the account with ID:XXXX; pls make sure this account is valid and belongs to an accessible domain"
Anyone has encountered similar issue?
BO version: BO XI 3.1 SP5
Authenticate: Windows AD
Thanks and RegardsPlease get in touch with your AD team and verify if there are any changes applied to the domain controller and there are no network issues.
Also since this is a multi domain, make sure you have 2 way transitive forest trust as mentioned in SAP Note : 1323391 and FQDN for Directory servers are maintained in registry as per 1199995
http://service.sap.com/sap/support/notes/1323391
http://service.sap.com/sap/support/notes/1199995
-Ambarish- -
MSS - ECM - Get the active CREVI
Hi experts,
I'm working on MSS-ECM (Enterprise Compensation Management).
I'd like to get the active CREVI parameter (Compensation Review) on the first screen of the Planning scenario. I mean I'd like to filter the employees which are retrieving by OADP and for that I can use a customer module functions in the OADP customizing but I'd need to know which compensation review is active in each case.
Do you know what I mean??
The standard funcionality makes the filter in the next screen, checking the elegibility of the employees, but I want to do it in the initial screen.
Thanks.
JuanjoHi Raghu,
maybe I don't explain my question very well.
I don't want to know if the crevi is active or not but which crevi has been selected by the user from the drop-down list before the user click on the plan button. Do you understand??
Thanks. Regards,
Juanjo -
hi,
I am trying to get the current active Subject using the following code
1.
AccessControlContext acc = AccessController.getContext();
Subject subject = Subject.getSubject(acc);
2.
InitialContext ic = new InitialContext();
Object o = ic.lookup("java:comp/env/security/subject");
the second way seems to work, is this thread-safe ?
is there a better way to get the active Subject.
thanksThanks for the answers. This helped a lot but it does not seem to work within my triggers.
CREATE OR REPLACE TRIGGER InscriptionsInsert BEFORE INSERT OR UPDATE ON Inscriptions
FOR EACH ROW
DECLARE
active_role VARCHAR2(11);
BEGIN
SELECT role INTO active_role FROM session_roles WHERE role != 'CONNECT';
IF :new.ni < 1000 AND active_role = 'ind_service' THEN
RAISE(ABORT, 'le service individuelle ne peut pas faire les inscriptions pour des sportifs');
END IF;
IF :new.i >= 1000 AND active_role = 'eq_service' THEN
RAISE(ABORT, 'le service equipe ne peut pas faire les inscriptions pour des equipes');
END IF;
END;
CREATE OR REPLACE TRIGGER ResultatsInsert BEFORE INSERT OR UPDATE ON Resultats
FOR EACH ROW
DECLARE
forme VARCHAR2(12);
active_role VARCHAR2(11);
BEGIN
SELECT forme INTO forme FROM Epreuves WHERE nEpreuve = :new.nEpreuve;
SELECT role INTO active_role FROM session_roles WHERE role != 'CONNECT';
IF forme = 'individuelle' AND active_role = 'eq_service'
RAISE(ABORT, 'le service equipe ne peut pas enregistre des resultats pour des sportifs');
END IF;
IF forme = 'equipe' AND active_role = 'ind_service'
RAISE(ABORT, 'le service individuelle ne peut pas enregistre des resultats pour des equipes');
END IF;
END; -
How do I get the activity window in safari 6.0.2?
How do I get the activity window in safari 6.0.2?
Safari 6
Activity Window is no more available in Safari 6.
Apple removed that feature.
Best. -
I have powerpoint for Mac on my imac. I can't seem to get the active text box function to work like it did on my PC. How can I insert an active textbox into a presentation that will allow me to type while presenting?
I've gotten a little further on this. The dynamic select is
working fine. It's the "a href" code that isn't. I'm wondering if
someone can look at this line and tell me if it's okay to build the
query string this way. The storeid comes through fine but I'm still
not getting the employeeid value to pass. Here's line that's not
working:
td><a href="registerStoreCust.php?storeid=<?php echo
$row_storeRS['storeid']; echo "&employeeid="; echo
$_GET['employeeLM']; ?>">Register
Customer</a></td> -
I am trying to install MS Office.man 2011 and when I get prompted to go get the activation code on line I have to log on with my windows live id. I had one when I had a pc and have since forgot my password so I enter my live id and goto the rest password screen, when I fill out the way they want I get an error message that says my live id is invalid, so I tried to start a new account and I use my email like they say and I get, that email already has a account and to try resting my password. anyone else have this issue?
Since your question is related to Microsoft products, I suggest you post your question on their own forums for their Mac software:
http://answers.microsoft.com/en-us/mac -
How does it usually take to get the activation email after receiving the invoice receipt?
Hi all. I'm doing the develop enrollment. I received the invoice receipt 3 days ago, which says apple has received my 99 dollars. But I'm still waiting for the activation email. It should take no more than 24 hours to get the activation email, right? if I click "Program enrollment" in this page(https://developer.apple.com/contact/), safari will tell me there are too many redirects and can't open the link. What should I do, please?
I got my activation e-mail rather quickly; however, something is wrong with my Developer enrollment (I registered as an individual and it says they are trying to verify my identity to see if I can act on my company's behalf--which does not make sense because I registered as an individual).
Apple has my $99 too and I also am unable to contact them due to the same redirect problem you are facing.
I am wondering if there is a recent bug on their site that needs to be addressed (seems like it is getting caught in a loop while trying to verify the device and/or browser). I have posted a question as well so let's hope this gets resolved soon.
Not a smooth way to start :-/ -
Function module for getting the created or changed by user
hi ,
iam using the t-code ob 52
inthat iam i not getting the created or changed by user
so is there any function module which gives created r changed
by user .
it shhould take the input as t-code and it has to display
the created r changed by user ........
pls help ..........In OB52, in menu : Utilities, change log. This use Database log analysis. Try calling transaction [SCU3|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums_rm&query=scu3&adv=false&sortby=cm_rnd_rankvalue].
SCU3 transaction call report [RSTBHIST|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums_rm&query=rstbhist&adv=false&sortby=cm_rnd_rankvalue] which call [RSVTPROT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums_rm&query=rsvtprot&adv=false&sortby=cm_rnd_rankvalue]. You may also use FM like [DBLOG_EVAL_CALL_FOR_SEL_OBJECT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums_rm&query=dblog_eval_call_for_sel_object&adv=false&sortby=cm_rnd_rankvalue] or [DBLOG_EVAL_CALL_FOR_SEL_CHAP|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_forums_rm&query=dblog_eval_call_for_sel_chap&adv=false&sortby=cm_rnd_rankvalue], perform some where-used on RSVTPROT.
Regards -
How to get the security-roles ?
Hi,
How can I get the security-roles defined in my web.xml ?
I have looked for a method in the request, and in the context, but I can't find something that would return a String[] with the roles available in the web-app.
Any ideas ?
H.Just a stab in the dark, but what about getInitParameterNames() ?
It returns an Enumeration of String.
Although, I did not check to see if it returns the <security-roles>
Short of that, I would think you could use SAX, or something like it, to parse web.xml.
Just a thought, feel free to correct me.
S. -
hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the help
What I am saying is ..........
The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship with the Carrier and then follow the Carrier's process to unlock
With a PAYG it usually means adding a specified (by the carrier ) amount usually £15 /£20 depending on the carrier
This is how O2 function and according to Gemma this is how Vodafone work -
Table to find the assigned Roles with my User ID
Hello Experts,
1.Is there any specific table to find out the assigned roles to my User ID?
If there is no table, let me know is there any transaction to find out the assigned roles to my User ID?
2. When I assigned Marketing Pro role to my user id in Organization Unit, I am not able to see in webui screen.
when I click on webui transaction, it is displaying some selection screen, there it is not displaying the role I have assigned?
Could you help me to sort out these two queries?
Thanks and Regards
MadhuHi Madhu,
1.Is there any specific table to find out the assigned roles to my User ID?
If there is no table, let me know is there any transaction to find out the assigned roles to my User ID?
Sol'n : You have so many Class Methods for finding your requirement else FM aslo.
Go to SE84 there u will find search ClassMethods. There u type getuserRole or userRole* and press F8. Pick the one which you feel it may give you the result
ie you have to execute the class...if it showing instance on the tool bar click on that then press execute the method which you feel relevant to you, and give input parameters.
Sol'n for 1 point is: CL_CRM_UI_ROLE_ASSIGN->GET_BUSINESSROLES_FOR_USER.
2. When I assigned Marketing Pro role to my user id in Organization Unit, I am not able to see in webui screen.
Sol'n: Go and check in T-code : BP. Dispay Ur BP and check for Employee Meantaied -- Identification Tab..Did u maintained ur Userid over there or not
when I click on webui transaction, it is displaying some selection screen, there it is not displaying the role I have assigned?
Sol'n: Need clarification on this point.
Regards,
Lokesh
Edited by: Lokesh on Mar 8, 2010 7:37 AM
Maybe you are looking for
-
now i am really frustrated with it. Every single update has robbed me of battery power which began with about 8-10 hours of usage and now I am lucky if I get 2 hours. It isn't the battery. It has something to do with the updates to the OS. It was fin
-
Adobe premiere elements 11 rendering at lower bit rate than i select
Hi, I'm using Adobe Premiere Elements 11, 64-bit Windows. I keep trying to render a project at a bit target bit rate of 10.05 MB/S (.h264 1080p MP4) but the resulting .mp4 file keeps coming out with an average bit rate of around 7000kb instead of 10,
-
Podcast changes in iTunes Music Store
Okay, while I'll need some time to figure out how "Food" podcasts belong in the "Arts" category, I wonder why 21 of my 42 episodes suddenly disappeared from the iTMS listing. Grrr...I didn't realize things were broke and needed fixing by Apple. http:
-
Trouble to access "App" in Creative Cloud
Hola, actualice OS X Yosemit > instale Creative Cloud para descargar la versión de prueba de Dreamweaver, pero no me ha sido posible, se queda procesando y no accede a la sección de Apps, por lo tanto no he podido descargar el programa ¿Podrían ayuda
-
Problems with transitions and HD video from a Canon Powershot....
Hello: First of all thanks a lot for taking the time to look at the question. I have recently bought a Canon PowerShot SX200 IS, mainly for photos but it can also record HD video. The videos it makes are H.264, 1280 x 720, Millions PCM lineal, 16 bit