User info couldn't be get from info table from popup lov window
Hi,
I'm tring to implement authorization on my test project. I'm tring to filter the data in pop-up lov window accoriding to logged user but in the below code, the userId is read as null. I have copied the code from developer guide and it works well on the other part of my project.
Thanks,
package steff.test.persistence.bc4j;
import oracle.jbo.server.ViewObjectImpl;
import oracle.jbo.RowIterator;
import oracle.jheadstart.persistence.bc4j.common.Bc4jDBTransaction;
import oracle.cle.resource.User;
// --- File generated by Oracle Business Components for Java.
public class SupplierCompanyViewImpl extends ViewObjectImpl
* This is the default constructor (do not remove)
public SupplierCompanyViewImpl()
private void brAuthorizedQuery(Object p0, Object[] whereParams,
int numOfParams)
Bc4jDBTransaction trans = (Bc4jDBTransaction)getDBTransaction();
User user = trans.getUser();
String userId = "";
String initialWhereClause = getWhereClause();
String whereClause = "";
if (!(user==null))
userId = user.getUserId();
else
userId = "NONE";
if (!(initialWhereClause == null))
whereClause = initialWhereClause + " AND ";
whereClause = whereClause +
"QRSLT.COMPANY_CODE IN (" +
" SELECT UACompany.COMPANY_CODE FROM UA_COMPANY UaCompany WHERE USER_ID=:1" +
System.out.println(userId);
setWhereClause(whereClause);
Object[] tempArray = new Object[numOfParams + 1];
for (int i=0; i < numOfParams; i++)
tempArray[i] = whereParams;
tempArray[numOfParams] = userId;
whereParams = tempArray;
numOfParams = numOfParams + 1;
super.executeQueryForCollection(p0, whereParams, numOfParams);
setWhereClause(initialWhereClause);
protected void executeQueryForCollection(Object p0, Object[] p1, int p2)
// had to move call to super inside br method
brAuthorizedQuery(p0, p1, p2);
I found a solution to my problem. It can achieve to filter the displayed data in lov in a not secure way. ı custumised the lov.jsp and the other related jsps for parameter passing. I added the following lines.
// Construct the search criterium
ArrayList arguments = new ArrayList();
String[] searchcriterium = {displayAttr,"LIKE",text};
String queryName = className.substring(className.lastIndexOf(".")+1)+"Lov";
arguments.add(searchcriterium);
if (filterAttr != null && !filterAttr.equals("") && !filterAttr.equals("null")) {
String[] searchcriterium2 = {filterAttr,"=",filterValue};
arguments.add(searchcriterium2);
Thanks for all your answers.
Similar Messages
-
How to get name of table from front end
Hi,
How to get name of table from front end in EBS 11i?
thanx
AshishHi
Sandeep is correct. The "Help"/"Record History" will give you the table/view name, but sometimes this particular menu function give me a "Record History is not available here." error message.
I then use the following menu functions (this will also give you additional information, like column details).
1) Open Forms
2) Click on Help/Diagnostics/Examine (*you might have to enter the APPS password at this point)
3) Change "Block" to "System"
4) Change "Field" to "Last_query"
The system will populate the "Value" field with the query that was executed in order to populate the form.
Regards
Frank -
How to retrieve 2 values from a table in a LOV
Hi
I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
How to retrieve thes two values whant the user chooses an item from the list ?
I apologize for my english, being french.
Regards.
ChristianChristian,
From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
<b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
Use something like this in the dynamic list of values for the select list: <br>
SELECT NAME display_value, NAME return_value
FROM DEBIT<br><br>
<b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
In the PL/sQL, write something like:
DECLARE
v_key DEBIT.KEY%TYPE;
v_site DEBIT.SITE%TYPE;
CURSOR v_cur_myvals IS
SELECT KEY, SITE
FROM DEBIT
WHERE NAME = :P1_MYSELECT;
BEGIN
OPEN v_cur_myvals;
LOOP
FETCH v_cur_myvals
INTO v_key,v_site;
EXIT WHEN v_cur_myvals%NOTFOUND;
:P1_KEY := v_key;
:P1_SITE := v_site;
END LOOP;
CLOSE v_cur_myvals;
END; <br><br>
Then you can use these values for whatever purpose you need to.
Hope this helps. -
User Exit in 10g - To get client info
Hi all
We have a user exit call in forms 4.5 which returns client info (OS version).
As we are going for 10g, the user exits will reside in AS.
Is there any way by which i can use the same user exit to get client info now ?
Thnx and Regards
Sriramin the old days of forms 6i we created tons of java-applets for host-commands and so on.
with the first version of webutil all the applets we created ourself were gone, because all functions were in the webutil-toolset.
You can use it beginning with forms 9i. It's very good and easy to use. Look in OTN where the developer-downloads are
Gerd -
Getting the attribute value from a table from page def using el expression.
Hi,
Am using Jdeveloper 11.1.2.0.0 and have a requirement as follows for which a sample is been created. Requirement is as follows..
1. Have a Taskflow that has a readonly table Employee.
2. On clicking of a button called "route" checks if the selected row , Manager id attribute value = 200 then navigate to first page else if manager id attribute value is 200 then navigate to second page.
Through the page def , if it has form , then we can access the attributes like #{data.view_FirstPageDef.ManagerId} . In case of acquiring the same attribute value from table using page def ? is what am unable to get..
Have achieved the routing concept using the Router activity on Taskflow. But am unable to get the selected row attribute value of a table from the employee page def.. Can someone suggest on the same...
Thanks and Regards,
Vinitha GOn the router, right click its icon in the task flow and create a page definition. Then in the page def file, add an iterator based on the same View Object from the table in the first page, then add a value attribute mapped to managerId in the View Object iterator. Finally in the router you can write EL expressions along the lines of #{bindings.ManagerId.inputValue = 200} or #{bindings.ManagerId.inputValue != 200}.
CM. -
How to get a single table from a .db file
Hello,
We have taken a backup of our whole schema into a .db file. and by mistake one of our table in that schema got truncated. Is there any way we can restore only that table from the .db file?
Please help.
Thanks
RameshIt's not so easy. You could perform a point-in-time recovery of the whole database, where point-in-time is the moment just before the table was truncated. Big disadvantage is you lose all other changes made after the truncation,too. Or you restore to an auxiliary database, export the table and import it back into the source database.
Werner -
Need tool/utility to get list of tables from sql query
Hi,
I often have to analyze huge queries without having access to database. Is there any tool where I can submit the a sql query and it gives me list of tables used in the query. I also need similar thing for documentation.
Let me know if anybody uses anything like this.
Thanks.
liquidloop[at]live[dot]co[dot]ukYou can find the size of each table, and thus list the tables in the process.
SET NOCOUNT ON
DBCC UPDATEUSAGE(0)
-- DB size.
EXEC sp_spaceused
-- Table row counts and sizes.
CREATE TABLE #t
[name] NVARCHAR(128),
[rows] CHAR(11),
reserved VARCHAR(18),
data VARCHAR(18),
index_size VARCHAR(18),
unused VARCHAR(18)
INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?'''
SELECT *
FROM #t
-- # of rows.
SELECT SUM(CAST([rows] AS int)) AS [rows]
FROM #t
SELECT
t.NAME AS TableName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
WHERE
t.NAME NOT LIKE 'dt%'
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, p.Rows
ORDER BY
t.Name
--- SQL2005
select o.name
, reservedpages = sum(a.total_pages)
, usedpages = sum(a.used_pages)
, pages = sum(case when a.type <> 1 then a.used_pages
when p.index_id < 2 then a.data_pages else 0 end)
, SUM(a.used_pages)*8096 AS 'Size(B)'
, rows = sum(case when (p.index_id < 2) and (a.type = 1) then p.rows else 0 end)
from sys.objects o
join sys.partitions p on p.object_id = o.object_id
join sys.allocation_units a on p.partition_id = a.container_id
where o.type = 'U'
group by o.name
order by 3 desc --biggest tables first
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
To Get List of Tables from Database which has the data 'AAAA' - T-SQL Query
Hi,
I have a database "Adventureworks", I need to get list of tables, which has the data 'AAAA' in their rows.
Is there any optimised or simple way to do this task?
Any T-SQL Query Available
--- Thanks in advance..You can refer the same below URL provided by Praveen:
https://gallery.technet.microsoft.com/scriptcenter/c0c57332-8624-48c0-b4c3-5b31fe641c58
It has the SQL SP - "SP_SearchTables". You can pass parameters the way you want and get the expected output.
-- Search for 'bike' instead of 'AAAA'
Use AdventureWorks2012
EXEC SP_SearchTables @Tablenames = '%', @SearchStr = '%bike%'
-Vaibhav Chaudhari -
How to return course data from different tables from a procedure
I have a procedure which must return information from two tables:
The sturcture of tables is as below:
Table 1:
id,
name,
property,
type
Table 2:
id1
id2 ,
property.
id1 of table2 refers to id attribute of table1. ie id is the foreign key for table2.
the tables are defined such that for corresponding to each id in table1 there would
be two or more rows in table2.
Now in the procedure given the id, i need to retrieve information from table1 and also all the rows in table2 which refers to id2.I want to return a cursor.How can i do this.
eg:
if table 1 has an entry with id 2
and table 2 has three entries with id1 referring to id(i.e id1=2)..I need to return the table1 entry with id=2 and three entires from table2 with id1=2.
If cursors are not appropriate, what other alternative methods can be used.
Any suggestions would be of great help.thanks for the reply,
The result set would be returned to the client .....which would do further processing.The client does not even know that the data is organized in two tables..Therefore given an id, client would expect to have all the information...i.e the info from table 1 and info from table 2 where the relation ship between id and other ids are stored.
i.e say client has id=6.This id has property,name,etc stored in table1.
This id can further be related to any number other of ids.It can be related 2,5,100,or may be even 10000s of other ids.This mapping between the original id and other ids..are stored in table2.
So given the id by the client , i would want to return property of the ids itself along with all the ids that it is related to .
I want to achieve this..... -
Extracting data from Z-table from SAP R/3 to BW
Hi all
I want to extract data from a Z-table from SAP R/3 system to Bw system. Currently I am on BW 3.5. Since it is a Z table I dont have a standard extractor for it & I dont knw how to create it. Can anyone provide me with the step-by-step documentation of how to extract data from a non standard SAP table????Hi
You need to create Generic Datasource on the Z-Table you want to get data from
Go to RSO2 transaction to create generic datasource .
You need to give technical name of datasource under datasource type you want and click on create. Then you can give descrption and Application component under which u want see the datasource,
enter the z table name under view/ table and save.
here you can click on check boxes to make fields hidden or selection fields.
Regards
Ravi
Edited by: Ravi Naalla on Aug 25, 2009 8:24 AM -
Select from a table from other schema
Hi,
I want to make a select from a table how is into other Schema and into other instance.
form example, if I have _2 schemas (in diferent instances)_:
SCHEMA1 =
*(DESCRIPTION =*
*(ADDRESS =*
*(PROTOCOL = TCP)*
*(HOST = XXX.XXX.XXX.XX1)*
*(PORT = 1560)*
*(CONNECT_DATA =*
*(SERVER = DEDICATED)*
*(SERVICE_NAME = SCHEMA1)*
SCHEMA2 =
*(DESCRIPTION =*
*(ADDRESS =*
*(PROTOCOL = TCP)*
*(HOST = XXX.XXX.XXX.XX2)*
*(PORT = 1560)*
*(CONNECT_DATA =*
*(SERVER = DEDICATED)*
*(SERVICE_NAME = SCHEMA2)*
and into SCHEMA2 there is a table TABLE_A.
If I`m connected into SCHEMA1:
how can I do to make a select from the TABLE_A?
thanks very much.1) Referring to an entry in the tnsnames.ora file as a "schema" as you have here with schema1 and schema2 is likely to be confusing. You have multiple schemas in the same database-- in this case, you appear to be trying to query tables in a different database. If we try to answer using your TNS aliases "schema1" and "schema2", there is likely to be a great deal of confusion between schemas/ databases/ and TNS aliases. So I will assume that your tnsnames.ora file actually reads
TNS_ALIAS1 =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = HOST1)
(PORT = 1560)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB1)
TNS_ALIAS2 =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = HOST2)
(PORT = 1560)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB2)
)2) Given the TNS aliases above, assuming that we are talking about the tnsnames.ora file on HOST1, you would need to create a database link from DB1 to DB2. You can either specify a fixed username and password for the database link or you can specify that the connection happens as the current user (which assumes that the passwords are synchronized between the databases).
CREATE DATABASE LINK to_db2
CONNECT TO username_on_db2
IDENTIFIED BY password_on_db2
USING 'TNS_ALIAS2'3) Assuming the database link is in place
SELECT *
FROM schema2.table_name@to_db2Justin -
Unable to take export from particular tables from the schema.
i created a schema duser data is imported and now i want to take select tables from this schema.
the tables are (partyhdr,partyaddressdtl,partycontactdtl,partydsdtl,partytdsexcludedtl,partycurrencydtl)
D:\>EXP DUSER/LOG@ORCL FILE=20121221PARTY0228PM.DMP TABLES=PARTYHDR,PARTYADDRESS
DTL,PARTYCONTACTDTL,PARTYTDSDTL,PARTYTDSEXCLUDEDTL,PARTYCURRENCYDTL;
Export: Release 10.1.0.2.0 - Production on Fri Dec 21 14:30:21 2012
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.1.0.2.0 - Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table PARTYHDR 19387 rows exported
. . exporting table PARTYADDRESSDTL 20747 rows exported
. . exporting table PARTYCONTACTDTL 226 rows exported
. . exporting table PARTYTDSDTL 53 rows exported
. . exporting table PARTYTDSEXCLUDEDTL 2 rows exported
EXP-00011: DUSER.PARTYCURRENCYDTL; does not exist
Export terminated successfully with warnings.
as i check in schema partycurrencydtl table is their AND SHOWING RECORDS ALSO.
SELECT OBJECT_TYPE FROM ALL_OBJECTS WHERE OWNER='DUSER'AND OBJECT_NAME='PARTYCURRENCYDTL';
OBJECT_TYPE
TABLE
i am able understand why this particualr table is not exporting.
Kindly help out.Dear hitqon,
i am facing the below problem in export only,but their is no problem in import.
Tablespace Details
FILE-NAME TABLESPACE_NAME BYTES BLOCKS
D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\AXPERT.DBF AXPERT 8589934592 1048576
Version:
WE ARE USING version
Oracle Database 10g Release 10.1.0.2.0 - Production
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
D:\>EXP CENTRAL/LOG@ORCL FILE=20121217CENTRAL0857AMFROMSERVER237.DMP
Export: Release 10.1.0.2.0 - Production on Mon Dec 17 08:57:47 2012
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.1.0.2.0 - Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user CENTRAL
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user CENTRAL
About to export CENTRAL's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 24324 encountered
ORA-24324: service handle not initialized
EXP-00056: ORACLE error 24324 encountered
ORA-24324: service handle not initialized
EXP-00000: Export terminated unsuccessfully
Only export will be successfully,when we restarted the oracle services. How to over come this issue with out restarting the oracle services.
Edited by: leen on Dec 28, 2012 12:43 AM -
How to pass value from report table to Popup window
suppose i have a report region
from query
"Select * from emp"
i need to get a popup when i click on the row,
i need all the columns should be displayed inthe popup window;
i have written javascript in the report template, by passing #COLUMN_VALUE#
the issue here is iam only getting the column on which i click,
is there any way to refer the next column ?
or am i doing it in wrong manner ?Hi Mike,
Yes what you said is exactly correct ,
i have a query , but for that i need some PK { three columns } from the the page where this popup will be called,
i have three columns in the row which makes it as PK,
now how can i pass three columns from a page to popup ? provided if i click on the row of an table, i want that rows three column to be passed . -
How to Get Data From E070 table From Asp
HI,
I am New to ALE, IDOC and BAPI Programming,
I am just trying to fetch data from SAP through custom interface viz ASP.
How to Do this.. Can anyone help me
Regards
GuhapriyanHi,
You will need some sort of a connector to fetch data from SAP using SAP. DCOM connector has been provided by SAP to fulfill this task. Please take a look at the documentation for DCOM connector. You can download latest version and documentation from service.sap.com/connectors.
Regards -
How to delete the committed row from a table from its VOImpl class ??
I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
Thanks in advance..........http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
Why did you mark it answered but gave no dukes to finalight? That's not how it works.
You should mark his answer as correct and give him at least one duke, for the effort!
Maybe you are looking for
-
Macbook can't "read or write to disk" of ipod
Just bought a new 30GB 5th Gen. ipod and loaded half of my music/photos onto it. Now it gives an error message every time I try to sync new albums about not being able to read or write to the ipod. Any suggestions? The updater download didn't seem to
-
I got a new Kobo and tried to register it so that I can download books from the public library. When I tried to register my device I received the following message " You can only authorize this computer with an Adobe ID that hasn't been previously us
-
HCM ESS Leave request : Intimation mail or Approval mail is not going
Dear Experts, We have an Ep 7.0 system with ECC 6.0 is connected at backend. Currently we have a requirement : whenever an employee will request for a leave from ESS(EP 7.0) the approver should get an intimation mail and similarly when the request i
-
I get a "shimmer" on some photos after applying & rendering Ken Burns
In a slideshow I'm attempting to make in iMovie, I'm getting a "shimmering" effect after applying the Ken Burns effect to photos I've imported from iPhoto. The shimmer appears most noticeable in shots of scenary, where there is a lot of detail like t
-
Problem with a Display Only field based on a dynamic LOV
I have a field/item which is based on a dynamic LOV: select DESCRIPTION display_value, STATUSID return_value from CTCXFRREQS_STATUS_LOV order by 1 ...and I need it to be display-only on the page. However, if I make it a display-only field, the return