Set query of VO through CO

How can I set query of VO on run time through CO?
Thanks,
Krunal

could you resolve the issue.
because I am also facing the same error when I use the
vo.setWhereClause(".........");
I have extended the existing controller by adding some conditions for the ViewObject. (see above)
after assigning the extended controller to the controller class of the page, I am receiving an error about the SQL statement, that includes two where statements in one sql.
what is the correct syntax for that?
how can I add one more condition within the controller to the VO???
thanks a lot in advance for your advices...
regards,
DOGAN
ps: the error I am receiving:
Error Page
Exception Details.
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT /* leading (PLL) NO_MERGE( PLL ) USE_NL( PLL POH ) */
POH.SEGMENT1 PO_NUMBER,
     PRL.RELEASE_NUM RELEASE_NUM,
     DECODE(PRL.PO_RELEASE_ID, NULL, POH.SEGMENT1, POH.SEGMENT1 || '-' || TO_CHAR(PRL.RELEASE_NUM)) DISPLAY_PO_NUMBER,
POL.LINE_NUM LINE_NUM,
POL.ITEM_ID ITEM_ID,
     POL.ITEM_REVISION ITEM_REVISION,
     POL.ITEM_DESCRIPTION ITEM_DESCRIPTION,
     POL.VENDOR_PRODUCT_NUM SUPPLIER_ITEM_NUMBER,
NVL(PLL.PROMISED_DATE, PLL.NEED_BY_DATE) DUE_DATE,
     PLL.RECEIPT_DAYS_EXCEPTION_CODE RECEIPT_DAYS_EXCEPTION_CODE,
     PLL.DAYS_EARLY_RECEIPT_ALLOWED DAYS_EARLY_RECEIPT_ALLOWED,
     PLL.DAYS_LATE_RECEIPT_ALLOWED DAYS_LATE_RECEIPT_ALLOWED,
     POL.UNIT_MEAS_LOOKUP_CODE UNIT_MEAS_LOOKUP_CODE,
     TO_NUMBER(NULL) SHIPMENT_QUANTITY,
     PLL.QUANTITY QUANTITY_ORDERED,
     PLL.QUANTITY_RECEIVED QUANTITY_RECEIVED,
     NVL(HRL.LOCATION_CODE, SUBSTR(RTRIM(HZ.ADDRESS1)||'-'||RTRIM(HZ.CITY),1,20))
SHIP_TO_LOCATION,
     PVS.VENDOR_SITE_CODE VENDOR_SITE_CODE,
     PVS.PAY_SITE_FLAG PAY_SITE_FLAG,
     POH.PO_HEADER_ID PO_HEADER_ID,
POH.CURRENCY_CODE CURRENCY_CODE,
POH.RATE_TYPE RATE_TYPE,
POH.RATE RATE,
POH.RATE_DATE RATE_DATE,
POL.PO_LINE_ID PO_LINE_ID,
PLL.LINE_LOCATION_ID LINE_LOCATION_ID,
PLL.SHIP_TO_ORGANIZATION_ID ORG_ID,
     POL.UNIT_PRICE UNIT_PRICE,
     POH.VENDOR_ID VENDOR_ID,
     POH.VENDOR_SITE_ID VENDOR_SITE_ID,
     POV.VENDOR_NAME VENDOR_NAME,
     PLL.SHIPMENT_NUM SHIPMENT_NUM,
     POH.VENDOR_CONTACT_ID VENDOR_CONTACT_ID,
     MSI.CONCATENATED_SEGMENTS ITEM_NUM,
     PLL.TAXABLE_FLAG TAXABLE_FLAG,
     '' TAX_NAME,
     POH.REVISION_NUM REVISION_NUM,
     TO_NUMBER(NULL) TOLERABLE_QUANTITY,
     NULL ORGANIZATION_CODE,
     HRO2.NAME SHIP_TO_ORG_NAME,
     HRO.NAME ORGANIZATION_NAME,
     MUM.UOM_CLASS UOM_CLASS,
     PLL.ORG_ID OPERATING_UNIT_ID,
     PLL.PO_RELEASE_ID PO_RELEASE_ID,
     PLL.MATCH_OPTION MATCH_OPTION,
     PVS.PAY_ON_CODE PAY_ON_CODE,
     PLL.CONSIGNED_FLAG CONSIGNED_FLAG,
     PLL.SHIP_TO_LOCATION_ID SHIP_TO_LOCATION_ID,
     POL.SUPPLIER_REF_NUMBER SUPPLIER_REF_NUMBER,
     nvl(POH.SHIPPING_CONTROL,'SUPPLIER') TRANSPORTATION_ARRANGED_BY ,     
PLC.DISPLAYED_FIELD TAB_Display,
NVL(MSI.PRIMARY_UNIT_OF_MEASURE,POL.UNIT_MEAS_LOOKUP_CODE),
PLL.QTY_RCV_EXCEPTION_CODE
FROM
PO_HEADERS_ALL     POH,
PO_LINES_ALL     POL,
PO_LINE_LOCATIONS_ALL      PLL,
PO_RELEASES_ALL           PRL,
PO_VENDOR_SITES_ALL      PVS,
HR_LOCATIONS_ALL_TL     HRL,
HZ_LOCATIONS          HZ,
PO_VENDORS               POV,
MTL_SYSTEM_ITEMS_KFV     MSI,
MTL_UNITS_OF_MEASURE     MUM,
HR_ALL_ORGANIZATION_UNITS_TL     HRO,
HR_ALL_ORGANIZATION_UNITS_TL     HRO2,
PO_LOOKUP_CODES PLC
WHERE
POH.PO_HEADER_ID = PLL.PO_HEADER_ID AND
POH.PO_HEADER_ID = POL.PO_HEADER_ID AND
POH.AUTHORIZATION_STATUS = 'APPROVED' AND
POL.PO_LINE_ID = PLL.PO_LINE_ID AND
POL.UNIT_MEAS_LOOKUP_CODE = MUM.UNIT_OF_MEASURE (+) AND
PLL.PO_RELEASE_ID = PRL.PO_RELEASE_ID(+) AND
POV.VENDOR_ID = POH.VENDOR_ID AND
PVS.VENDOR_SITE_ID = POH.VENDOR_SITE_ID AND
HRL.LOCATION_ID(+) = PLL.SHIP_TO_LOCATION_ID AND
HRL.LANGUAGE(+) = USERENV('LANG') AND
HZ.LOCATION_ID(+) = PLL.SHIP_TO_LOCATION_ID AND
NVL(PLL.APPROVED_FLAG, 'N') = 'Y' AND
NVL(PLL.CANCEL_FLAG, 'N') = 'N' AND
NVL(POH.FROZEN_FLAG, 'N') = 'N' AND
NVL(PLL.CLOSED_CODE, 'OPEN') NOT IN
('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING', 'CANCELLED') AND
(PLL.QUANTITY*(1+NVL(PLL.QTY_RCV_TOLERANCE, 0)/100)) >
(NVL(PLL.QUANTITY_RECEIVED, 0) + NVL(PLL.QUANTITY_SHIPPED, 0) + NVL(PLL.QUANTITY_CANCELLED, 0)) AND
PLL.SHIPMENT_TYPE IN ('STANDARD','BLANKET','SCHEDULED') AND
NVL(PLL.payment_type, ' ') not in ('ADVANCE', 'DELIVERY','MILESTONE','RATE','LUMPSUM') AND
POL.ITEM_ID = MSI.INVENTORY_ITEM_ID (+) AND
NVL(MSI.ORGANIZATION_ID, PLL.SHIP_TO_ORGANIZATION_ID) = PLL.SHIP_TO_ORGANIZATION_ID AND
HRO2.ORGANIZATION_ID (+) = PLL.SHIP_TO_ORGANIZATION_ID AND
HRO2.LANGUAGE (+)= USERENV('LANG') AND
HRO.ORGANIZATION_ID (+) = POH.ORG_ID AND
HRO.LANGUAGE (+)= USERENV('LANG') AND
DECODE(PLL.PO_RELEASE_ID, NULL, NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N'), NVL(PRL.CONSIGNED_CONSUMPTION_FLAG, 'N'))!='Y'
AND PLC.LOOKUP_TYPE='SHIPPING CONTROL'
AND NVL(POH.SHIPPING_CONTROL,'SUPPLIER') =PLC.LOOKUP_CODE
AND PLL.OUTSOURCED_ASSEMBLY <> 1
AND PLL.PAYMENT_TYPE IS NULL) QRSLT WHERE (NVL(HRL.LOCATION_CODE,SUBSTR (RTRIM (HZ.ADDRESS1) || '-' || RTRIM (HZ.CITY), 1, 20)) not in ('BU-TVP')) ORDER BY DUE_DATE ASC
Edited by: doGan on Jan 31, 2011 7:27 AM

Similar Messages

  • How to set Query SQL Statement parameter dynamically in Sender JDBCAdpter

    Hi All,
    I have one scenario in which we are using JDBC Sender Adapter.
    Now in this case,we need to set Query SQL Statement with a SELECT statement based on some fields.
    This SQL statement is not constant, it would need to be changed.
    Means sometimes receiver will want to execute SQL statement with these fields and sometimes they will want to execute it with different fields.
    We can create separate channels for each SQL statement but again that is not an optimum solution.
    So ,I am looking out for a way to set these parameters dynamically or set SQL statement at Runtime.
    Can you all please help me to get this?

    Shweta ,
    <i>Sometimes receiver will want to execute SQL statement dynamically</i>....
    How you will get the query dynamically? Ok Let me assume, consider they are sending the query through file, then its definitely possible. But u need BPM and also not sender JDBC receiver adapter instead, receiver JDBC adapter.
    SQL Query File ->BPM>Synchronous send [Fetch data from DB]--->Response -
    >...............
    Do u think the above design will suit's ur case!!!!
    Best regards,
    raj.

  • Info set query condition

    we have a infoset query to generate a list of parked logistic invoices, we use the same vendor and the same T-code : MIR7 to generate park document, but I can see only the park documents generated by my collegue throgh this info set query.
    I can't see the park documents generated by me throgh this info set query, we are using the same T-code MIR7 and same query.
    why this happen? Is someone set the condition of this query, so i can't see the parked document generate by my self. I can see these parked document(both my collegue and mine) through MIR6

    any idea from query design point of view? thanks

  • TS1398 I set up my ipad through my windows XP PC, now when i try to access itunes on my Ipad 3, i get an error saying 'Cannot Connect to itunes'

    I set up my ipad through my windows XP PC, now when i try to access itunes on my Ipad 3, i get an error saying 'Cannot Connect to itunes'

    Try this:
    Go to Settings>General>Date & Time and change the date to a few months in the future and then re-try.

  • Query Performance and Result Set Query/Sub-Query

    Hi,
    I have an infoset with as many as <b>15 joins</b> with different ODS and Master Data..<b>The ODS are quite huge with 20 million, 160 million records)...</b>Its taking a lot of time even for a few days and need to get atleast 3 months data in a reasonable amount of time....
    Could anyone please tell me whether <b>Sub-Query or Result Set Query have to be written against the same InfoProvider</b> (Cube, Infoset, etc)...or they can be used in queries
    on different infoprovider...
    Please suggest...Thanks in Advance.
    Regards
    Anil

    Hi Bhanu,
    Needed some help defining the Precalculated Value Set as I wasnt succesful....
    Please suggest answers if possible for the questions below
    1) Can I use Filter Criteria for restricting the value set for the characteristic when I Define a Query on an ODS. When i tried this it gave me errors as below  ..
    "System error in program CL_RSR_REQUEST and form  EXECUTE_VTABLE:COB_PRO_GET_ALWAYS....                     Error when filling value set DELIVERY..                                               
    Job cancelled after system exception ERROR_MESSAGE"                                           
    2) Can I create a create a Value Set predefined on an Infoset -  Not Succesful as Infoset have names such as "InfosetName_F000232" and cannot find the characteristic in Paramter Tab for Value Set in Reprting Agent.
    3) How does the precalculated value Set variable help if I am not using any Filtering Criteria and is storing the List of all values for the Variable from the ODS which consists of 20 millio records.
    Thanks for your help.
    Kind Regards
    Anil

  • JDBC & setQueryTimeout - or is there another way to set query timeout?

    I am trying to set query timeout for TimesTen using jdbc library. But it seems like TimesTen jdbc library does not support setQueryTimeOut. Is there a way to set it without having to set it statically in the DNS?
    I tried to set the SqlQueryTimeout in the connection string but it doesn't work either:
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=bleh;TCP_PORT=17013;TTC_Server_DSN=blah;TTC_Timeout=0;SqlQueryTimeout=5;");
    Thanks for your help!

    Thanks for replying. I don't know have good knowledge on Cache Connect. I will have to read on that first.
    It seems like TimesTen does not support jdbc setQueryTimeout. Calling this method on TimesTen jdbc library will return false: supportsQueryTimeout().
    I created a test class for testing the SqlQueryTimeout. I set the TTC_Timeout to 400 seconds and SqlQueryTimeOut to 5 seconds. So after 5 seconds it should time out.
    The way I test it is by putting a break point before executing the query, do a route add DBServer to an un-connectible gateway to simulate the network delay/connection problem and then continue after I added the route.
    After executing the query, instead of timing out after 5 second, it will wait for a few minutes before timing out.
    The code for testing the timeout is as follow:
    public class TTTest {
         public static void main(String[] args) throws ClassNotFoundException {
         Class.forName("com.timesten.jdbc.TimesTenDriver");
         try {
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=server;TCP_PORT=17013;TTC_Server_DSN=server_dns;"
         + "TTC_Timeout=400;SqlQueryTimeout=5;");
         System.out.println(connection.getClass().getName());          
         Statement stmt = connection.createStatement();
         //com.timesten.jdbc.JdbcOdbcStatement stmt = (JdbcOdbcStatement)connection.createStatement();     
         System.out.println(stmt.getClass().getName());
         System.out.println("Query started " + new Date());
    // Pause here, put a route add and continue
         ResultSet rs = stmt.executeQuery("select count(*) from mse");
         rs.next();
         System.out.println("there are " + rs.getInt(1) + " rows");
         rs.close();
         stmt.close();
         connection.close();          
         } catch (Exception x) {           
         x.printStackTrace(System.err);
         System.err.println(new Date());
    }

  • How Transportation of Adhoc Query is done through RSAQR3TR report.

    Hi,
    How Transportation of Adhoc Query is done through RSAQR3TR report.i want to transport a new usergroup, new infoset and a query from Develpment to Quality and Production.
    I have gone through the documentation of the RSAQR3TR report and as well as the SAP library material, but still i am confused.
    Please help

    Hi,
    http://www.sap-img.com/basis/transport-of-abap-query.htm
    Hope this helps.
    Regards,
    Rashmi

  • Setting a price condition through a BAPI

    Hi,
    I have the following problem - I am trying to set a condition on an item in a quotation using the BAPI_CUSTOMERQUOTATION_CHANGE. The error that I get back is "Requirements are not fulfilled for condition PN00".
    When I try to set the condition manually through VA22, I can set it without any problems. Through the transaction V/08 I can also see that the requirement has been set to "2" (Item with pricing).
    Does anyone have any idea what the problem could be? What really stumps me is that using the GUI, I can set this condition without problems. It is only through the BAPI that I run into this error.
    I have also used the same code in another example to set conditions without problems. The only thing different in this case is that the Item where I am setting the condition is a lower level item - the item number 10 is the high level item for this position. Is it possible that this plays a role in this case?
    Bye
    Sameer

    Hi Mathieu,
    I am setting the flag in the HEADER_INX too, sorry I forgot to mention that
    Although I am only setting the update flag to U. I could not find any field/flag that has to do anything with conditions in the header structure.
    As I am setting the conditions on line items (positions), I fill in the QUOTATION_ITEM_IN and QUOTATION_ITEM_INX structures accordingly to update the positions.
    Could you please tell which fields you mean when you say that I need to fill something up also in the header and header_inx structures? (Other than the Update flag of course)
    Thanks,
    Sameer

  • Setting a pricing Condition through a BAPI

    Hi,
    I have the following problem - I am trying to set a condition on an item in a quotation using the BAPI_CUSTOMERQUOTATION_CHANGE. The error that I get back is "Requirements are not fulfilled for condition PN00".
    When I try to set the condition manually through VA22, I can set it without any problems. Through the transaction V/08 I can also see that the requirement has been set to "2" (Item with pricing).
    Does anyone have any idea what the problem could be? What really stumps me is that using the GUI, I can set this condition without problems. It is only through the BAPI that I run into this error.
    I have also used the same code in another example to set conditions without problems. The only thing different in this case is that the Item where I am setting the condition is a lower level item - the item number 10 is the high level item for this position. Is it possible that this plays a role in this case?
    Bye
    Sameer

    The parameter for the item number was being sent wrong to the R/3 system.

  • WEBI Sample Result Set Query Property Question

    Wnen I set the WEBI Sample Result Set query property my retrievals took longer than I thought they should especially with a limited result set.  When I hit the View SQL button and look at SQL I notice that the following order by is added to the query:
    Order by dbms_random.value
    I copied the query and ran it against our Oracle database with and without the order by.  Without the order by the query ran significantly faster.   Is there any way to stop the order by from being generated when the Sample Result Set property is set?
    Thanks,
    Bob

    Thanks for your reply.
    I tried to locate the parameter you mentioned in the parameters for my universe and did not find anything referencing not enforcing order bys.  I checked the documentation and did not see anything there either.   Please respond with the exact name of the parameter or if it is a custom parameter the settings you used to create it.
    Thanks,
    Bob

  • Creating user account and setting password in Solaris9 through shell script

    I need to create and set password of user through shell scripts.
    User can be added successfully through "useradd" command but password cant be set through "passwd" command in script.
    Is there any other alternative for the same.

    Hi,
    Did you get the answere for this ? I have the same problem as urs , like I want to creat the users by using useradd and want to hardcode there password in one script.
    But I cant use expect utility which would have made my work easier

  • Configuration setting for Auto TO through Delivery (outbound)

    Hi Gurus,
    Could you plz, tell me whrere is the config setting for TO. creation through VL06O.
    I am fallowing the below steps
    1.STO creation.(STR converted to STO via ME59N).
    2.Delivery created thru VL10B.
    3.TO created thru VL06O (When I click on TO in background, TO is creating and displaying in LT23)
    After the above process I confirm TO and do the post goods issue.
    I want to know info. about configuration setting to create TO through VL06O.
    your hlep will appriciated a lot.
    thanks
    raghu

    Hi Raghu,
    There is no separate settings for VL06O for Automatic TO creation.
    Normally we assign the Automatic Creation to Mov.types in WM.
    SPRO - LE - WM - Activities - Transfers - Set Up Autom. TO Creation for TRs / Posting Change Notices
    In the above scenario which you have mentioned you are creating TO in the background which is done using the Mov.type & Strorage type Strategy Settings & its not a Auto TO creation.
    Hope its clear,
    Regards,

  • How to set query parameters to i5Grid

    Hello Everyone,
    I am working on creating i5Charts.
    I mapped query template and display template to i5Chart template but I need to pass the query parameters dynamically.
    How to set query parameters to i5Grid?
    Pls help with syntax.
    Thanks.
    Regards,
    Minakshi

    Hi Minakshi,
    Yes you can try the first 2 options listed by Rohit, the 3rd one however is not supported.
    The below syntax should work for you:
      1.  gridObject.getQueryObject().setRowCount(<Value>);
      2.  gridObject.getQueryObject().setParameter("RowCount", <Value>);
    You can check the documentation at the following link:
    http|s://<host>:<port>/XMII/JSDOC/i5ChartAllClasses.html
    You could also use the script assistant to check for the JS methods.
    Regards,
    Ria

  • Info-set query datasource

    Hi Geeks,
    I have created an infoset query. Based on tables
    VBAK - Sales order header data
    VBAP - Sales order item data
    VBUP - Sales document item status
    VBPA - Parnter function table.
    I created a custom data-source in RSO2 based on this infoset query.
    Now I want to delete tables (VBPA) or entries (VBPA-KUNNR) in field groups from infoset query.
    & system is not allowing me to do this saying
    System says "VBPA-KUNNR" is used in queries.
    Can anybody please suggest me any way to change the infoset & inturn datasource created over it.
    Thanx in advance.
    Monica

    If I correctly understand , you want to remove the filed or table from info set query .
    As data source is based on Infoset query , it  will not allow to change the  same
    You can delete the data source  or if you do not want to delete  just  detach the info set from Data source  by removing the info set name  ( may be you can replace it with another duplicate query name for time being ) and save activate datasource  and later change the info set .
    You can revert back to original info set  query name in data sources after changes are done.

  • I set up a blog through google with a gmail account.  I was able to pull up the blog ap from the ap store.  BUT, page 1 (which gives me access to write, edit, etc) only comes up on my iphone; page 1 does not come up on my ipad....only the blog, "read only

    I set up a blog through google with a gmail account.  I was able to pull up the blog ap from the ap store.  When I go into the blog ap on my iphone, page 1 comes up first.....this is the page that allows me to edit, add, etc.  Unfortunately, when I go into the blog on my ipad, I only get the written information (blog) that I posted; there is no page 1 which allows me to make editions, etc.  How can I get this information over to my ipad?

    I personally suggest the new Drobo FS. Since it has an iTunes server built in and you can use any size sata hard drive in it it is better and a NAS that has to use the same size drives.

Maybe you are looking for

  • One multiple day event won't show in month view

    I have noticed that every time I launch iCal an event (checked for all day event) beginning 9/1 and ending 9/4 will not show up in the month view until I open that day (and it's there) click it and then it will show up as a banner event. If I close i

  • Create a folder with permissions set to This Folder, subfolders

    Basically my app creates 4 folders that gives a specific user certain permissions. I can create the folder find, and i can give the user the correct permissions, but by defaulse it has Apply To set to this folder only, so if the user creates a folder

  • Integration Builder Design

    Is it possible to change font or theme for IB?

  • How is a non skype user charged to call me

    tablets do not have stock dialers so, I want to use skye but my friends do not have it and will pay how much to call me.

  • Certain characters "glitch" in urxvt

    This has bothered me before. It seemed to go away at some point, but now it has come back: I'm using rxvt-unicode and the Consolas font, and the "w" character (and only ever the "w" character) is shown like this: If you can't see the picture, try her