Can XSQL create multiple session variables using only one database call?

Right now if I want to set session variables for username and accesslevel, I code out like this:
<xsql:set-session-param name="name" bind-params="username password">
SELECT DISTINCT USERNAME
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>
<xsql:set-session-param name="authlvl" bind-params="username password">
SELECT DISTINCT ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-session-param>Is there any way to do it so that I don't have to do multiple queries to the database to set session variables? i.e., something like this:
<xsql:set-multiple-session-param name="user authlvl" bind-params="username password">
SELECT DISTINCT USERNAME,
ACCESSLEVEL
FROM LKUP_USER
WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
</xsql:set-multiple-session-param>Sort of like how bind-params works. Setting bind-params="username password" makes the first ? akin to username and the next ? akin to password.
Is this functionality already in existence?
Thanks!
Malik Graves-Pryor

Not currently possible to collapse into one request without doing it in a custom action handler.
A custom action handler can:
[list=1]
[*]Get the current JDBC connection from the XSQLPageRequest
[*]Get the SQL statement to perform using the function getActionElementContent
[*]Handle any bind parameters specified an a bind-params attribute on the action element by calling handleBindVariables()
[*]Execute and fetch the row from the query
[*]Check to see that the return value of getPageRequest().getRequestType() equals the value "Servlet"
[*]Cast the page request to an XSQLServletPageRequest and call getHttpServletRequest()
[*]Call getSession() on the request
[*]Set the session variables you want to
[*]Close the JDBC statement
[list]
will consider a built-in enhancement for a future XSQL release.

Similar Messages

  • Create multiple portal instances with only one database?

    Can someone create multiple portal instances with only one database?
    If so, how is this done, just by running the portal configuration wizard?
    How are most people running with multiple developers working on portal? Do they share a portal instance, or create their own?
    Thank you very much!
    Phillip

    i'm currently using 9ias rel 2(9.0.2) and i have install one infrastructure and two mid tier, hoping that this will create two portal, but it didn't. Can you please tell me how to do create two portal within one server.
    thanks and regards;
    andrew

  • Can we create multiple session in BDC using Call session?

    Hi Experts,
    Can we create  multiple sessions in BDC using Call Session?
    Scenario:
    Program has to upload 1 million records,so can we programmatically create multiple sessions such that after every 50thousand records we create a different session.
    For moment due to large number of records BDC DYNPRO and BDC Field are unable to hold the large number of records,due to which we get a Out of memory error.
    Thanks in advance.
    Shilpa

    Hi
    If ITAB is your table with the data to be transfered:
    Open the first session:
    CALL FUNCTION 'BDC_OPEN_GROUP'.........
    IF SY-SUBRC = 0.
      FL_OPEN = 'X'.
    ENDIF.
    LOOP AT ITAB.
    IF FL_OPEN = SPACE.
    Create new session
    CALL FUNCTION 'BDC_OPEN_GROUP'.........
    IF SY-SUBRC = 0.
       FL_OPEN = 'X'.
    ENDIF.
    ENDIF.
    Here elaborate your data and fill BDCDATA
    Insert the transaction:
    CALL FUNCTION 'BDC_INSERT'
    IF SY-SUBRC = 0.
      COUNT = COUNT + 1.
      IF COUNT = COUNT_MAX.
        COUNT = 0.
    Close the session
        IF FL_OPEN = 'X'.
          CALL BDC_CLOSE_GROUP
          IF SY-SUBRC = 0.
            FL_OPEN = SPACE.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Max

  • How can i create multiple accounts but use the same itunes?

    how can i create multiple accounts but use the same itunes?

    Hi iCloud is Making Me Go Crazy,
    You will need to create a new Apple ID for your GameCenter and iCloud services.  You can continue to use the current Apple ID you share with your Mom for access to iTunes Store purchases if you wish. 
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Cheers,
    - Judy

  • Multiple Qaawses but use only one Qaaws at a time

    Hi,
    In Dashboard , I have two Qaawses (Qaaws1 and Qaaws2). When I am trying to generate SWF file both the qaawses are running. My requirement is, in Excel file I will set a flag value in one cell (0/1).
    If the cell value is '0' then the Dashboard should use only Qaaws1.
    If the cell value is '1' then the Dashboard should use only Qaaws2.
    In essence my requirement is, even though multiple Qaawses are present in Dashboard, the Dashboard should be able to use only one Qaaws at a time based on my requirement (i.e., based on flag bit value 0/1).
    Can any one suggest,  solution for this?
    Thanks in advance.
    Regards,
    M. N. Kishore Babu.

    Hi David,
    Thank you very much for the response and sorry for the delay.
    Our actual scenario is a s follows:
    We pass customer id and shipper Group Id as an input parameters to the flash variables from front end (through Java program). And these two values will written in Excel cells (let say Customer id in A1, and Shipper Group Id in B1)
    Now there are two Qaawses, Qaaws1 and Qaaws2 in the xlf in addition to flash variables.
    Qaaws 1 query is as follows :
    select * from shp_details where customer id = A1
    Qaaws 2 query is as follows :
    select * from shp_details where customer id = A1 and ShipperGroup_id = B1
    On front end we have two drop downs, Dropdown1  is for customer id and Dropdown2 is for Shipper Group Id.
    When we select an item in Dropdown1, from front end we pass only Customer Id and when we select an item in Dropdown2, we pass both Customer Id and Shipper Group Id.
    Our requirement is,
    When we select Dropdown1 (we are passing only customer id), we expect only Qaaws1 to be executed.
    When we select Dropdown2 (we are passing  both customer id and shipper Group Id), we expect only Qaaws2 to be executed.
    Please let me know, if I need to provide any further clarification.
    Thanks & Regards,
    M. N. Kishore Babu.

  • Ecommerce site - how do I create several product pages using only one table of data?

    Hi
    Im designing an ecommerce clothing site for my assignment using an access database.
    When I create the Data Set it takes all the information from my Acess table "Products" , creating one huge list of products on a single web page.
    However, i would like to have the product data split across many web pages depending on there specific Category given [i.e. T-shirts, Jumpers, Trousers, Bags, Acessories].
    Does anybody know how to do this? I think it involves setting certain Parameters, or writing a SQL statement in Dataset.
    Thanks for any help
    Amy

    Hi Amy,
    Here's a series of articles I did for Adobe Developer's Center, included is an example of a shopping cart app you can use as a staring point or an example if you like.
    http://www.adobe.com/devnet/dreamweaver/articles/build_shopping_cart.html
    http://www.adobe.com/devnet/dreamweaver/articles/build_shopping_cart_pt2.html
    http://www.adobe.com/devnet/dreamweaver/articles/build_shopping_cart_pt3.html
    Lawrence   *Adobe Community Expert*
    www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF

  • How can i create multiple page report using excel report generation toolkit from excel template?

    i am having code which create report in excel.but it prints only single page. if content is more than size of template than insted of tacking new page it prints only single page.Please help me out.
    Anyone has material for learning activeX in labview? Please mail me on [email protected] 
    PBP (CLAD)
    Labview 6.1 - 2014
    KUDOS ARE WELCOMED.
    If your problem get solved then mark as solution.

    Hi thanks for reply.....
    PBP (CLAD)
    Labview 6.1 - 2014
    KUDOS ARE WELCOMED.
    If your problem get solved then mark as solution.

  • How can we create a session variable in OAF

    Hi All,
    i have a Master and detail page.
    In Master Page I am searching based on Deptno.
    suppose i enter Deptno 10, i got the 10 th deptno infomation and i click on the Detail Button i went to the detail page and is showed the Details of Deptno.
    in detail page i have a Cancel Button to come back to the Master page.Here i need to show the previous data only(Deptno 10) .
    for this i gave
    Retain AM True.But it was display deptno 10 and 20 also.can you please any one can can help me on this.
    if(pageContext.getParameter("Back")!=null)
    System.out.println("I am In Cancel ");
    pageContext.forwardImmediately("OA.jsp?page=/xxcurnx/oracle/apps/ont/custdtls/webui/XxcustdrilldwnPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // release AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    The above method not woked properly.
    could you please anybody can help on this issue.
    Thanks,
    Mallik.

    HI Pratap,
    This is My search Page(Master Page) Controller Code:
    public class XxcustdrldwnCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean) //Process Request Method
    super.processRequest(pageContext, webBean);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("Search")!=null)
    if(pageContext.getParameter("CustID")!=null && !pageContext.getParameter("CustID").equals(""))
    String vCustID = pageContext.getParameter("CustID");
    am.srchCustidtlsfordrilldwn(vCustID);
    if("update".equals(pageContext.getParameter(EVENT_PARAM)))
    pageContext.setForwardURL("OA.jsp?page=/xxcurnx/oracle/apps/ont/custdtls/webui/XxcusttrxnPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    false,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    if("updateIndividual".equals(pageContext.getParameter(EVENT_PARAM)))
    pageContext.setForwardURL("OA.jsp?page=/xxcurnx/oracle/apps/ont/custdtls/webui/XxcustlinetrnxPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    false,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    if(pageContext.getParameter("Cancel")!=null)
    pageContext.getApplicationModule(webBean).invokeMethod("rollBack");
    pageContext.forwardImmediately("OA.jsp?page=/xxcurnx/oracle/apps/ont/custdtls/webui/XxcustdrilldwnPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    false, // release AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    Thnaks,
    Mallik

  • IPhoto 8.1.2 can you create a smart album with only one face

    I'm using iPhoto 8.1.2 and have about 23k photos in the library. I have identified 32 key faces, and would now like to create some smart albums that contain only the face or faces that I want and to exclude all the others.  S for example  a smart album that has only my son.
    I tried using the doesn't contain this face, but you can only have around 10 filters/critiria in a smart album.
    any suggestions are appriciated

    You can't really, because you can't exclude enough of the faces.
    I would keyword the preferred images as well, so finding the face and the keyword would find the pics of the person alone.
    Regards
    TD

  • Filer warning of creating multiple files even though only one is created

    I'm using the Apt tool with a custom program that I wrote to autogenerate some Java classes for my project. Unfortunately, the Filer is throwing a warning. Even thought the below code is only called once, I get a multiple create warning. Any ideas what's causing this?
    Mark McKay
    Filer filer = env.getFiler();
    PrintWriter pw = filer.createSourceFile(indexClassName);
    warning: Attempt to create 'C:\dev\cvs.kitfox.com\scarlet\gen\com\kitfox\scarlet\\Index.java' multiple times

    I disocvered that this error was coming from the fact that my processor was being called twice - once for my original soruce files, and then again to process the file I had just generated. Once I handled the case of the reentrant call to process(), I was able to avlid this warning.

  • How to create multiple Purchase Order  using the same document number?

    HI Friends,
    I m in a product which extracts data from SAP and stored in Access database.
    For that,while i extracting Purchase Order from the Demo Database (SBODemo_US)for OEC Computers,the same DocNum is used for several Purchase Order using Index Line numbers.
    eg:
    DocNum for Purchase Order1 -->3000   0 (Index)
      DocNum for Purchase Order2 -->3000   1 (Index)
        But i can't create multiple Purchase Order using same DocNum manually in SAP B1,Could anybody please help me <b>to create a Purchase Order using same DocumentNumber?</b>
    Thanks in Advance
    SooriyaKala.P

    Hi,
    The problem statement is not quite clear to me.
    As far as I understand your statement, I think you want to club multiple orders into one purchase order using the index incrementally.
    For this I think once you have created the first purchase order, open the purchase order in edit mode the second time and append the new line items.
    If I am getting you wrong please explain the problem statement in more detail.
    Regards,
    Rara.

  • Create multiple sessions

    Basically,
    I have to create multiple sessions and sessionIDs on one
    server, and then pass it off to various clients based on their IP
    address. Is this possible (to transfer sessions like that)? How can
    I create multiple sessions on the server?

    Not sure why you might want to do this but I think it may be
    possible doing a screen scrape against the url with the app you
    want to create the session on.
    Essentially you would need a page the client hits, that would
    then do a cfhttp call to the app where you want to create a
    session. The cfhttp return will contain a structure and you should
    have a new cfid and cftoken on there. do a <cfdump
    var="#cfhttp#"> to see what's in there. You'd grab these to
    values out of the return and do a cfcookie and set the cfid and
    cftoken values to the values you grabbed out of cfhttp.
    I've never done this before, but I don't see off hand why it
    wouldn't work. If the cfcookie thing doesn't work you may try a
    cflocation addtoken='no' and and a url the specifies the cfid and
    cftoken from the cfhttp call.

  • Is third-party SO/PO  process possible using only one company code?

    Hi friend,
    1) my client wants to implement third-party PO process but also wants a way of keeping track of inventory during this process. I know that inventory should be tracked on the vendor side and not on our client side since we're doing third-party PO.
    However my client wants to track inventory (in an inventory g/l account like 120100) so that when my client post a Goods Receipt, the inventory account
    gets Debited and when client post  the outgoing invoice to customer, the inventory account gets Credited. In this way, my client can track
    if the customer have received the ordered item or not.
    The problem is that third-party PO posts to consumption account but DOES NOT post to inventory account. Is there any way of
    setting this up so that in addition to posting to comsumption account every time a Goods Receipt occurs?
    2) i tried to create "Individual Purchase Order" (customer order from client -> client order from
    vendor -> vendor ships item to client -> client then ships item to customer) so that posting will hit inventory account.
    However, i find that taking this approach involves setting up a Plant for vendor (A), a Plant for our Client (B), and a Plant for Customer (C).
    Because when i do a Goods Receipt, the stock has move from Plant A to Plant B. Then when i do a Goods Issue to the customer, it asks for the receiving plant. I assume this means that the stock moves from Plant B to Plant C.  
    Also, from the reading i did on the forum, i get the impression that i need to create more than one Company Code if i were to do
    third-party PO.  Do the Vendors have to be created in a different company code then the Customer? Or does it mean that Just the
    plant (like Plant A) needs to be created in a different Company Code then Plant B and Plant C?
    3) can i do third-party PO using only ONE company code?
    Can anyone provide some clarification on this issue? I've read tons of posting but none really helped clear  this issue up.
    Thanks so much.

    Dear Kishore,
    Individual PO processing is not third party process at all. In third party process the vendor delivers the goods dirctly to the customer - please check what SAP help says.
    http://help.sap.com/saphelp_46c/helpdata/en/dd/5601d4545a11d1a7020000e829fd11/content.htm
    Dear Queyen,
    One important point of third party process is that there's no need to keep stock of materials - that is in harmony with reality. Why does your customer want to keep stock from the goods if they doesn't receive at all? Is it coreect? It doesn't correspond to the fact.
    You can do statistical (ghost) GR against the third-party PO and you can see the goods movement in MB51 - I think this should be enough.
    http://help.sap.com/saphelp_46c/helpdata/en/dd/560287545a11d1a7020000e829fd11/frameset.htm
    BR
    Csaba

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • Export to PDF - Can a single report (rpt file) create multiple PDF files using the export command?

    Post Author: markeyjd2
    CA Forum: Exporting
    Greetings forum members,
    My question is, in its entirety: Can a single report (rpt file) create multiple PDF files using the export command, ideally one PDF file per DB record?
    In my case; I have a Crystal Report that reads data from a DB table containing ~ 500 records.  When I export the report to a PDF file, I get one PDF file, with ~ 500 pages.
    What I would like to do is export the report to ~ 500 individual PDF files; One file per DB record.  The file names would be based on the table's primary key.
    Is this possible?

    Post Author: Micha
    CA Forum: Exporting
    Hi,
    you need some lines of code, but its easy. Dependend on how to start the generation of your 500 PDFs, you can write an ASP page and start it via Web Browser, or a Windows Script and start it via scheduled job...
    Here's an abstract of the ASP code I use:
    First, you create a recordset (here: "rsc") which gives you the list of ID fields you want to export, then you create CrystalRuntime.Application object, then you loop through the recordset, open your report (here: "oRpt") and set login info. Then set the selectionformula, so that the report displays only the data of the current ID, e.g.:
      oRpt.RecordSelectionFormula = "(" & oRpt.RecordSelectionFormula & ") AND {myTab.myVal}=" & rsc("myVal")
    Then you export the report, move to the next record in recordset, and repeat the loop until recordset.EOF. Then you close recordset and connection.
    Micha

Maybe you are looking for

  • Query Designer Conditions status in 3X  Web template

    Hi,   What are the 3 status of condition in report  defined on Query in Query designer Active- Condition is active Deactive-Condition is deactive Variant -???? Thanks

  • Mountain Lion thinks camera is a "package"

    So bought latest MBP 13" when it came out. Worked fine. Got my free upgrade to Mountain Lion and installed it. Nnder lion, when I connected my panasonic video camera I could go to finder, browse the camera (it appeared as a disk) and I could copy my

  • Low Res to High Res Help!!!

    I need some advise. I have still jpegs and tiffs that I need to convert up from a low resolution, without pixelating the picture (Low resolution to High Resolution. I own Adobe CS3(the suite)which include Photoshop. If photoshop is not the answer, pl

  • Last stages of Sales Opportunity in XL reporter

    Hi all! I would like to print last stage of Sale opportunity in Xl reporter. NOw, i only show all all stages in report but i want only last satges. Could you help me! Thanks!

  • Windows 7 Service Pack 1 for x64-based Systems (KB976932)

    After failed attempts to install Windows 7 Service Pack 1, I ran this HotFix Hotfix for Windows (KB947821) Installation date: ‎2/‎18/‎2014 1:41 PM Installation status: Successful Update type: Important Fix for KB947821 More information: http://suppor