Query to fetch target privilege in user define role.
Hi ,
I have creates role 'MKS' and granted few database to that role.
Now i need a query to run in repository database,to fetch the list of database granted to that role 'MKS'.
Thanks,
Hi Manoj,
It is not possible in SAPB1.
Try to Export to Excel File.
check the thread,
Re: Authorisations List
Regards,
Madhan.
Similar Messages
-
What is a query to know what Privileges a user is having?
what is a query to know what Privileges a user is having?
for both DBA and System....
Thanks in advance.This is a complicated question. Because roles have privileges. And those privileges can be roles. So the level of nesting can get quite complex quite quickly.
So the best thing for you to do would be to check out Pete Finnegan's find_all_privs.sql script, which does the whole thing for you.
Cheers, APC -
Query SQL with variables Parameters and user defined tables
Hi everyone
I got a problem about Query SQL
[dbo].[@CSOURCE] is a user defined table
select * from [dbo].[@CSOURCE]
you can get the result in following
code name
T01 newspaper
T02 TV
T03 radio
T04 friends
when I execute the following SQL Statements ,I get an error
SELECT T0.CardCode , 0.CardName ,T1.Name ,T2.SONumber
FROM OCRD T0 LEFT JOIN [dbo].[@CSOURCE] T1 ON T0.U_CSOURCE = T1.Code
LEFT JOIN (SELECT T0.CardCode ,COUNT(T0.DocNum)SONumber
FROM ODLN T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
WHERE T1.GroupCode =111
AND (T0.DocDate >=[%0] or [%0]='')
AND (T0.DocDate <=[%1] or [%1]='')
GROUP BY T0.CardCode) T2 ON T0.CardCode=T2.CardCode
WHERE T0.GroupCode =111
and T0.CardType ='C
Is there anyone can correct it for me
thank you very much
Edited by: Li Mishan on Jul 17, 2008 9:36 AM
Edited by: Li Mishan on Jul 17, 2008 9:40 AMI am sorry .It is just a mistake of my typewriting.
The following is the whole SQL
dbo.@CSOURCE is a user table.It's content is
code name
T01 newspaper
T02 TV
T03 radio
T04 friends
declare @m int
declare @FromDate DateTime
declare @ToDate DateTime
set @m=(SELECT count(*) FROM ORDR T0 WHERE T0.DocDate >=[%0] and T0.DocDate <=[%1])
set @FromDate=[%0]
set @ToDate=[%1]
/*****************If I do not connect user tavble dbo.@CSOURCE ,I will succed *****************************************************/
SELECT T0.CardCode ,T0.CardName ,T2.SONumber,T1.Name
FROM OCRD T0 LEFT JOIN [dbo].[@CSOURCE] T1 ON T0.U_CSOURCE = T1.Code
LEFT JOIN (
SELECT T0.CardCode ,COUNT(T0.DocNum)SONumber FROM ODLN T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
WHERE T1.GroupCode =111
AND (T0.DocDate >=@FromDate or @FromDate='')
AND (T0.DocDate <=@ToDate or @ToDate ='')
GROUP BY T0.CardCode
) T2 ON T0.CardCode=T2.CardCode
WHERE T0.GroupCode =111
and T0.CardType ='C'
when I excute the SQL, It return a error , whith says the column name '%0' is invalid.
If I delete "set @m=(SELECT count(*) FROM ORDR T0 WHERE T0.DocDate >=[%0] and T0.DocDate <=[%1])"
and rewrite "set @FromDate='2008.05.01' set @ToDate='2008.07.01' "
It Shows the following results
CardCode CardName SONumber name
1 000070 Deng. Jiahua 1 newspaper
2 000293 LU .Weijuan 1 radio
3 000313 Xie .Jifang 3 TV
Edited by: Li Mishan on Jul 18, 2008 4:42 AM
Edited by: Li Mishan on Jul 18, 2008 4:43 AM
Edited by: Li Mishan on Jul 18, 2008 5:43 AM -
Weblogic Portal 9.2 | Access on portlets/JPF based on user defined roles.
Hi,
In my application, i have created some roles in the embedded LDAP of weblogic. Example. ViewBillsRole, ViewTicketsRole, etc.
Now my requirement is that if a user hits the URL directlyy for bills, he should be shown it instead he should be taken to some page.
Example: http://localhost:7001/myPortalWeb/myPortal.portal? _nbfp=true&;pageLabel=bills
This URL when hit directly should take user to login screen. How can i restrict this? How can i access roles present in embedded LDAP. I saw some annotation rolesAllowed in page flow controller properties, but wasnt of much help.
Can anyone tell me how can i achive my goal? Thanks
SaurabhHey Cindy,
Thanks for your response. Let me be more clear in what i am looking for:
Suppose my application has 4 modules e.g; Bills,Orders,Tickets,Services.
Now i have defined some roles like ViewBillsRole,ViewTicketsRole,ViewOrdersRole and so on.
When the user logs in and tries to manipulate the URL in such a fashion that he changes the _pageLabel property to that of bills and he is not authorized to access bills, he should be taken to some page with a message.
For this when i did the following:
@Control
UserInfoControl userInfoControl;
List<String> roleName =
userInfoControl.getAvailableUserRoles(getRequest());
I can see the roles mentioned above and i can check
boolean isUserInRole = userInfoControl.isCurrentUserInRole(getRequest(), ColtConstants.VIEW_BILLS_ROLE);
This lets me know if a user should be taken to the BILLS page or not. But if i use this approach to solve my problem, i need to make changes in all the modules across the application, which i think is not the best solution.
I wish if i can configure this roles property on Controller level than action level.
Now i saw allowRoles on controller level. This also internally uses approach 1 to determine what all roles are assigned to the user. But if a user has a particular role, still it thorws UnfulfileldRoleException.
I hope you got my point. I am not sure where is the controller checking for allowRoles. If it is checking in request, i have it there.
Do i need to configure all the roles in web.xml ? If yes then it means i have 2 places where roles are mapped. 1. Web.xml and 2. LDAP.
Let me know what can be the best solution to cater my problem. The links you have sent doesnt seem to work right now.
Thanks a lot in advance, -
Hi,
I have a query as to where are the user defined methos in jsp/servlets are stored after compilation.
and in a given jsp page 1.jsp when i include 2 files (2.jsp and 3.jsp). so when the 1.jsp gets loaded then in all how much total .class files get created?
ThanksSounds like homework question. At least I don't stop you from looking in the class folder yourself.
-
How to fetch the current login user name at the BI system
Hi,
In our scenerio we need a query to fetch the current login user name at the BI system. Would you please suggest the possibilities?
Thanks and regards,
PradipHi,
The current login id will be available in text elements of query.
Regards
Akhan -
How do I refer to a user defined field in a query (using $ notation) ?
if i have a user defined field in Invoice header called U_Test, and if I need to read it using a query (to be used on a formatted search).
I am not quite sure of the syntax. can anyone help please?
I tried
$[$U_Test.0.0] which is the accepted way with fields with numerical ids such as $[$8.0.0] etc.
appreciate any help,
Indika.Hi all,
Aliw, the 38 is not the form number, is the Item Number (which I guess is a matrix). In your case the User Defined Field is a line UDF. In Indika´s case is a header UDF.
And that´s the issue. As the indika´s UDF is a header UDF, it lays in a different form (which is named "-" + Main Form Name). Formatted searches work with the $[$Field.Column.Format] notation ONLY in the same form. So, if you try to get the UDF from another UDF, it will work with that notation (they are in the same form). But if you try to get the UDF from the main form, it won´t find it (It is in another form).
In that case you should use the other notation, as Andrea, Alexey and Salvador told you in the posts before.
Hope this clears a bit the issue.
Regards,
Ibai Peñ -
PLD report from user defined query
Hello experts,
Is possible to create a new PLD report from a user defined query ?
Thanks in advance.
Best regards
AndreaHi,
It is possible on Query Print Layout Design(QPLD) so Try to create QPLD.
Check this link u can get presentation slide form SAP.
[Query Pld from SAP site]
First you can try to create the Query report with UDF filed.
for example,
SELECT T0.DocNum, T0.DocDate, T0.CardName, T0.CheckSum, T0.U_UDF1, T0.U_UDF2, T0.U_UDF3
FROM OVPM T0 WHERE T0.DocNum>='%0' and T0.DocNum<='%1' ORDER BY T0.DocNum
Steps to Develop a User Report in QPLD:-
If you save your Query in Query Manager. Next you can do this,
->> Choose the Query Manager on Top Menu.
->> Open the Qeury Manager Window.
->> Select the specific Query report. and
->> Click the Create Report button in Bottom on Qeury Manager Window.
->> then, Open the Create User Report Window and Select the User Report(System) in Base Template.
If you Change the QPLD name.
->> Click OK.
->> (or) If your Query Report have parameter. Click OK.
Now your Query report was Created QPLD.
Note: All SELECT statement fields will be Stored and Display in Repetetive Area1. and
Parameter Fields are in Repetetive Area0 so you can Try to Copy & Paste the Field_ID's to Repetetive Area Header (or) Repetetive Area Footer.
Example:
->> Open the QPLD and Goto Field index Window, then
->> Select the Repetetive Area Header & Repetetive Area Footer ncrease the Height on Properties Window.
->> Create the Formula fields in Repetetive Area Header & Repetetive Area Footer.
->> Which Field you want to print in header or footer. Drag the Field ID(in Repetetive Area) Copy & Paste to Formula Field.
Can you see to your Query PLD? do this,
->> Choose the Tools on Top Menu.
->> Click the Queries. -> Query Print Layout...
->> Open the Query Print Layout Window.
->> Click Reports Tab and Double the Template (Requrie QPLD) on QPLD Window.
->> Customize and Save the QPLD.
Can you see your Query PLD Preveiw and Print? do this,
->> Choose the Tools on Top Menu.
->> Click the Queries. -> Query Print Layout...
->> Open the Query Print Layout Window.
->> Select Template in Report Tab on QPLD Window.
->> Click Print Preview on Top menu.
Close this thread if issue solved
Regards,
Madhan. -
How to assign a query retrived value to a user defined object in a table
how to assign a query retrived value to a user defined object in a table
Rajeshwar,
If you use the "Search" feature in this forum, you should be able to find helpful links to similar questions. You could also look at the RecordSet and DoQuery documentation in the SAP Business One SDK Help Center documentation to assist you with your question.
HTH,
Eddy -
How to make user-define value's query
Dear All,
In we have 3 user-defined fields in marketing document. When I type in field 1 and field 2, we need line total = field 1 * field 2.
Would it be possible for me to config it in SAP? I setup a user-define value and have a query for it. Make it updated when field 2 changed. But when I am not clear on how to write the query. I have a query select $[POR1.U_Field1]*$[POR1.U_Field2]
But I got an error message. It has to be some syn error in my query.
It is a service type document so that I cannot have a where POR1.Itemcode = ...
Can anybody help me out? Thanks in advance.
Regards,
Yuka
Edited by: Jie Jin on Mar 23, 2010 7:28 PMI use Select $(Por1.Price.number)*$(Por1.U_Numberofunit.number) //replace ( to [
The price was been change to null. Then my query is like select *6. Thanks.
Edited by: Jie Jin on Mar 23, 2010 7:42 PM
Edited by: Jie Jin on Mar 23, 2010 7:44 PM -
CANT execute query with parameter on user defined tables using query genera
Dear All,
I have problem when executing query with parameter on user defined tables using query generator.
It seems SBO cannot accept parameter to query user defined tables.
I've tried these:
SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
I try to pass the value directly without using parameter and It works
SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
This one works
SELECT * FROM RDOC T0 WHERE T0.width =[%0] --- this SUCCESS
and this one works too
SELECT * FROM RDOC T0 WHERE T0.width = 595 --- this SUCCESS
Is there anyone can help me ....???
Thanks,
AlfaI generated this code using query wizard ....
SELECT T0.[U_Status] AS 'Document Status' FROM [dbo].[@ST_PR_H] T0 WHERE T0.[U_Status] = (N'2' )
and replaced the (N'2' ) with [%0]
SELECT T0.[U_Status] AS 'Document Status' FROM [dbo].[@ST_PR_H] T0 WHERE T0.[U_Status] = [%0]
and It worked ......
Thanks 4 all ..... -
How can I access user defined column(in query) inside the trigger?
Hi
I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
Ex:
select a.col1, a.col2,
add as update
from table1 a
where ...
union
select a.col1, a.col2,
change as update
from table1 a
where ...
union
select a.col1, a.col2,
del as update
from table1 a
where ...
And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
Any help?Try ":update" minus the double-quotes. Ex:
IF :update = 'add' THEN
RETURN(TRUE);
ELSE
RETURN FALSE;
END IF;
You'll want to place your hard-coded values in single-quotes. Ex:
select a.col1, a.col2,
'add' as update
- Brian -
Using SQL query on user defined table
Hi all,
i'am currently working on a project which use user defined table and i would like to know if sap allow us to do insertion/deletion/update on those table using sql query or if we have to use the DI only?
thanks
Best regards,Hi,
Definitely you can insert in UDT. You can update but you cant change the Code field after added the rest of the field
can be updated. You cant delete in UDT but you cant delete anytime in SQL Management Studio.
THanks.
CLint -
Dear All Master Brains,
It is possible to hide our user defined query in Query Manager, apart from our user authorization.
I am waiting for your ..
Regards,
Team work never fails.Hi,
Only by authorizations you can hide the user queries.
Alternate way, If you have created those query for report purpose then you convert that query into QPLD, So that users cannot view the query you developed instead they can view the report alone.
I hope this could help you.
Regards
Raja.S -
How to create user defined metrics for SQL Server target?
The customer is not able to create a user defined metrics for SQL Server target.
This is very important for him to use this product.
He is asking how to create user defined metrics?
I sent him Note 304952.1 How to Create a User-Defined SQL Metric in EM 10g Grid Control
But it would work for an Oracle DB, but his target is SQL Server DB
Not able to find the "User-Defined Metrics" link from Database home page.
How to create user defined metrics for SQL Server target?http://download-uk.oracle.com/docs/cd/B14099_19/manage.1012/b16241/Monitoring.htm
Maybe you are looking for
-
Chrome, other apps crashing on launch
I have a 21.5" iMac mid 2010, running OS X 10.9.3, Processor 3.06 GHz Intel Core i3, Memory: 12 GB 1333 MHz DDR3, Graphics: ATI Radeon HD 4670 256 MB, Disk: 500 GB SATA Disk. This computer is primarily used by the teenagers in the house. It has t
-
Hello All, Can anybody expalin in brief regarding how to write a quiery using SQ01? If possible can anybody send me the docs relating to this? Thank you, Regards, Santosh Kumar V
-
Unable to activate Message Mapping (Until i restart PI )
Dear all, I am using PI 7.1. I am trying to activate the message mapping objects in ESR. but it is not getting activated. I see the following error message in the process log: Activation of the change list canceled Check result for Message Mapping: M
-
External monitor AOC i2369Vm: compatible with my 2007 MBPro?
Hi there, I have an 'old' but cherished 2007 MacBook Pro. I am thinking of buying an external monitor AOC i2369Vm. Are there compatibility problems regarding connecting ports etc? Online I've seen a few users who've complained of these but no answers
-
Web page transitions are rocky
I have just published my new iWeb website on to .mac (at web.mac.com/cherisykes). I am noticing that the page transitions, going from page to page, are not smooth. I have to wait, so white space, etc. Can I correct this? Eventually, when construction