Query criteria by User ID

I am using B1 9.0 for SAP HANA PL4. My case as follow : I have 2 whse and 2 user ID, User1 only can read all data from the query that have whse code WHSE-A and user 2 only for WHSE-B. How to make a query for ORDR table with a condition : If Login ID = User1 then the where condition is for Whse code = WHSE-A and If Login ID User2 then Whse code = WHSE-B.
So I have to capture current SAP Login ID from System then put it on the criteria ? any one can help ?
Thanks 

Hi,
Try this:
Select current_User from Dummy
Please check this link:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0f2d8c9-f321-3110-41bb-dc8e8e14dc9a?QuickLink=index&…
Thanks & Regards,
Nagarajan

Similar Messages

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
    When the Query Criteria is add like
    SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
    FROM counselors WHERE counselors.counselors_id = ?
    when i run this Query in the Query Window
    i get a error message Box saying
    Query Processing Error Parameter metadata not available for the given statement
    if i run the Query with out Query Criteria its working fine.

    *I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
    Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
    The Java codes are:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    Object s = this.dropDown1.getSelected();
    try {
    this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
    this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
    this.Trip_tabDataProvider1.refresh();
    } catch (Exception e) {
    this.log("Error: ", e);
    this.error("Error: Cannot select user"+e.getMessage());
    SQL statement for Trip_tabRowSet:
    SELECT ALL Trip_Tab.Trip_Date,
    Trip_Tab.User_ID,
    Trip_Tab.Destination
    FROM Trip_Tab
    WHERE Trip_Tab.User_ID = ?
    Error messages are shown below:
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.sql.SQLException: No value specified for parameter 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
    at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
    at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
    at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
    at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
    at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
    at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
    Could anybody look into this issue.
    Many thanks
    Edited by: linqing on Nov 22, 2007 4:48 AM

  • How to Enable the LOV to query for partial user entries in af:query in an ADF search form

    Hi guys,
    I have faced one issue in creating a search form in ADF, in that I have used af:query and table region. and I have attached an lov vo to the base vo for the list of values and given UI hint as Input values with List of values. Now the issue is that I have given auto submit property as true so when I give some value suppose "Jan-14" and tab out it gives me all the correct results. but if I give like "Jan%" and then tab out then it does not give me any value. Could you kindly help me with some solution. I am using Jdev 11.1.1.6.0.
    Thanks,
    Tanmoy

    To enable the LOV to query for partial user entries, we can trap the 'LaunchPopupListener' event and add custom code there. Within the af:query component, just wondering how can we set property the 'LaunchPopupListener' for the search criteria ?

  • Filtering criteria in User selection screen

    Hi experts,
    Is there any ways to display values in the selection screen based on the above criteria that user selected? For example, the selection screen has 3 selection tabs. The first tab is to choose region (A,B or C). When user selects region A, the second criteria shows only the factories that located in region a, not all of the factories. Once user select a factory, the thrid tab shows only the manager names that works in that factory.
    I'm new in this area so please provide me an instruction steps by steps.
    Thanks so much,
    Phant

    Do you have any mapping maintained in any InfoObject for all these characteristics you mentioned, or you are trying to pull out this information based on the trascational data from the cube.
    There is one option in the query designer. Go to Advance tab of the characteristic and under second option "Filter vale for selection during query execution", select Characteristic Relationships.
    - Danny

  • How to execute query only when user submits request in af:query

    Hi,
    I'm using an <af:query> based on a named view criteria. The view criteria contains a bind variable. When the web page is initially rendered the query is executed and the result is displayed in an <af:table>.
    Instead, I want the user to trigger the query by pressing the Search button in the <af:query> form.
    Is there a way to configure such a behavior without coding?
    Sorry, if this is a faq, but I didn't find a suitable answer for my problem.
    Any hints are welcome,
    Markus

    Hi Frank,
    it is not that easy, I'm afraid. In 10g apps, I used a combination of two iterators. One Find-iteratior and one iterator for the resultset. The resultset iterator had the refresh condition set to ${adfContext.postback}. But with 11g, it does not work. The result is rendered when the page comes up.
    What has changed from 10g to 11g? I have discovered the fact, the table does a second (asynch) request to get the resultset from the server when attribute contentDelivery="lazy". Changing the attribute to contentDelivery="immediate" the page comes up with an empty table and the user can enter the query criteria. The solution works fine as long as you stay on the search page. If you navigate to an 'Edit result' page and then back to the search page, the table is empty again (thanks to the postback condition). To solve the problem you have to work with a second flag in the refresh condition which indicates that the user has triggered a query. This is the background for my last posting (' Can I set an <af:setActionListener> on the search button of a <af:query>?', Re: Can I set an <af:setActionListener> on the search button of a <af:query
    Any other recommendations?
    Thanks,
    Markus

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • Unable to find Searchable Item in Query Criteria Map

    Hi ,
    Am try to personalize Advacned Search Region to Include new search Criteria in R12 iSupplier Portal->Home->Orders Tab->Advanced search.
    Am trying to create new search field in the Add another row field through personalization.
    I have created new row criteria,when am trying to create Query Criteria Map,Am unable to list the Searchable Item as it is Drop down list.
    This causing unable to query the records based on the newly created row criteria item.
    Please advise.
    Thansk<Sarath.

    Hi Jobnish,
    There is no code in this requirement.
    There is no error...Issue is unable to query data based on newly create criteria row in Advanced search.
    I can give you navigation:
    iSupplier Portal->Home->Orders Tab->Press advanced search Region
    Click on the Personalize Page(I hope you know how to enable the personalize link using profile option).
    In SupplierRN ->Advanced Search Criteria and creating custom item Criteria Row..
    We need to map this field in Advanced Query Mapping.
    However the issue is the Am unbale find the Searchable item (which is created in Criteria Row) in the drop downlist.
    I can provide screen-shot if you need.
    Thanks,Sarath.

  • How to view a BI query with anonymous user in the portal

    <b>Hi Gurus,</b>
    Does anybody knows how to view a BI query in the portal with anonymous user?
    Cause when i try to view a query the portal always ask for authentification. And i don't want to sign with a user cause my portal is for everybody and if the user logged in it shows the roles that previously were assigned.
    I have the Netweaver 2004 with SP9
    <b>Thank you Very Much</b>

    do you have sso configured between portal and BW server, if yes the authentication pop up should not come.
    if you dont want to do sso between portal and bw server and still want to logon to BW query with anonymous user,
    in you bw server go to transaction sicf and navigate to DEFAULT_HOST->SAP->BW->BEX and double click on bex node in the resulting window, log on details section provide a default userid/password
    Raja

  • Query related to User License.

    Hi all,
    I have some query related to User License.
    If we have 250 no of user license( with one developer),
    can we use them individually on DEV, QAS & PRD ?
    can we use them individually on differrent clients?
    what abt users on 000 client. Is they should different license or come under same group.
    Regards,
    shan

    Contact you SAP Account Manager.
    Regards
    Juan

  • Query on licenced users in SBO

    Hi. ANy ideas on how to query if a user in SBO has an assigned licence. Thanks

    Hi,
    There is no query to reach your goal.  The best way to check might be the file B1upf.xml under licensing server folder.
    Thanks,
    Gordon

  • Query criteria in Query Customer Party List EBM

    Hi ,
    I have a requirement where I have to map certain fields to query customer party EBM.
    QUery Customer Party EBM has option for mapping only one field 'ID'. But my query input has many fields like last name , first name, etc based on which the search should be performed.
    I checked Query Customer Party List EBM where i found some tags like query criteria, operator code, value expression, etc.
    Please let me know what is the significance of these fields and how can I map my query criteria fields to query customer party EBM or query customer party list EBM ?

    Hi,
    I'm getting the same problem!
    Using AccountGLFlexValues, I have 3 parameters to send to requestor ABCS and all the samples I have are using only ID as parameter.
    What about Difference between Query and QueryList EBMs? any explanation??
    Did you find any solution on this issue? Please share this information!!
    Thanks!!

  • Can i change table in query as per user given data

    hi master
    sir,
    can i change table in query as per user given data
    see
    select * from @variable
    i need use in lov
    please give me idea
    thankingyou
    Aamir

    You cant directly use in sql instead you can write an anonymous block and frame the query as per the input table name and then use execute immediate to execute the query.
    Something like this
    declare
    qry_table varchar2(30);
    qry_stmt varchar2(1000);
    type typ_sample is table of VARCHAR2(100) index by binary_integer;
    tab_sample typ_sample ;
    begin
    qry_table := &Table_name
    qry_stmt := 'select a from '||qry_table;
    execute immediate qry_stmt bulk collect into tab_sample ;
    end;
    Message was edited by:
    Shasi

  • Lock record on query for single user

    Is there any way to use the on-lock trigger to lock a particular record as it is simply queried, instead of after a change has been made to it. For instance, if user A is viewing a queried record, and user b attempts to query the same record, then we would display a message to user b stating that the record is unavailable, or simply just skip it. I know that if a field in the current record is altered, forms recognizes the status of the record as 'CHANGED' and will then by default proceed to lock the record until a commit or rollback is issued. However, this is not what we are looking for. I have read a little about this, and I have seen an example through a datablock based upon a stored procedure, a ref cursor select for update statement. (NOTE: we are not basing our datablock on a stored procedure though)
    We have two scenarios that require this type of locking capability. The first simply queries one distinct record, and the second queries a distinct result of records.
    A select for update statement would suffice for the first scenario, i.e. if another user tries to query the same record, their query is denied; however, for the second scenario when two users perform the same query, user a is viewing record #1, and user b's program sees that record #1 is 'locked' and thus proceeds to the next record in the result .
    Any suggestions? Thanks in advance.
    Eric M Weiss

    You don't need to override on-lock you can just call the LOCK_RECORD built-in in POST-QUERY or whatever.

  • CSCul66951 LDAP routing query fails when user name is the same (6 july 2014)

    in the case CSCul66951 LDAP routing query fails when user name is the same it is mentionned that the version 8.0.2-055 correct this bug ? How come i don't see this version on my menu Available upgrades from my IronPort C370 ?
    Is there someone on the support team that have try this LDAP query on a IronPort C370 with this version in the development lab ?
    Do i have to open a support Case to have this version of AsyncOS ?
    Best regards,
    Benoit Belair
    University of Quebec in Montreal

    Yes - CSCul66951 - this was included w/ the 8.0.1-HP1, and is rolled into 8.5.6-074 GA release.
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-0/release_notes/ESA_8-0-1_HP1_Release_Notes.pdf
    CSCun02766 - 8.5.6-063, which was superseded by the 8.5.6-074 GA release.  
    See release notes, resolved issues:
    http://www.cisco.com/c/dam/en/us/td/docs/security/esa/esa8-5-6/ESA_8-5-6_Release_Notes.pdf

  • Running query as diffrent user

    Hi,
    My qestion is, is there a substitiute for linux "su" in oracle. I.E when im loged in as DBA i whant to run query as XXX user with lower privileges. The problem is i whant to use connectionpool and Ora Lable Security.
    Thanks in advice,
    MT

    Perhaps what you want is to run a query connected as a user that has privileges on another user. If it is what you want to do you can do it putting the name of the schema in front of the object name.
    for example connected as sys but I want to query
    emp table from scott:
    select * from scott.emp;
    if that is not what you want , reply and explain your
    case again.
    Joel P�rez

Maybe you are looking for