How to ignore programmatically some items during a query ?

Hi all,
The process of my application is like this : first of all the end-user enters some criteria , then he/she presses a button to search for the possible results matching the criteria entered (execute_query). The possible results are displayed through a multirecord based datablock.
The criteria screen has two parts , say part_a and part_b. When the end-user does not enter any criteria in part_b then the datasource of the results block should be a table , say data_source_1 ; and if some criteria are entered in part_b then the datasource of the results block should be a view , say data_source_2.
The datasource data_source_1 has less number of columns than the datasource data_source_2 , but all of data_source_1's columns are included into data_source_2.
So my problem is when the datasource of the results block is set to data_source_1 then there are unknown columns when executing the query (alert error). All of the columns of data_source_2 are included in the results block , and all of the columns of data_source_1 are automatically there because mathematically speaking data_source_1 is included into data_source_2.
I have tried to use in the pre-query trigger of the results block this statement : set_item_property('results_possibles.column_a',queryable,property_false); but the same error still occurs.
So how to ignore these items ?
Thank you very much indeed.

After looking at what you did to try to solve the problem, I'm not sure what the actual problem is.
You can make both datasources have the same number of columns by selecting nulls:
data_source_1: select a, b, c, null as d, null as e from <table>
data_source_2: select a, b, c, d, e from <view>
If you have a field which is used to query a column which is included in data_source_2 but not in data_source_1, and that field is populated when you run the query, then just set the block's default_where to ignore that field.
eg
data_source_1: where...and c like nvl(:control.c,'%')
data_source_2: where...and c like nvl(:control.c,'%') and d like nvl(:control.d,'%')...

Similar Messages

  • How to disable programmatically an item in a Descriptive flexfield

    Hi friends,
    doy you know How to disable programmatically an item in a Descriptive flexfield using CUSTOM.pll?
    The problem is that I need to do it under the WHEN-NEW-RECORD-INSTANCE event, and the item (based in an attribute column of a database table) hasn't a canvas asociated at that moment....
    Do you have any example?
    Thanks,
    Jose.

    Hi Prashant,
    mmm yes, for now there are two fields it he DFF window.. but in a future .. may be more..
    I've found a function:
    fnd_flex_key_api.enable_column that may be properly for that, but I don't know what to pass in the the first parameter (flexfield IN flexfield_type)...
    I mean: I suppose is the "name" for my DFF but.. how can I get it?
    Thanks,
    jose.

  • How to include non database item in the query

    Hi
    I have a Master-Detail form. where in the detail block one of the field is text item 'X' attached the list of values(Y). Master block includes non database items which is based in the decoding result of the database items for example:
    Gender(Male, Female)>> non database item
    Gender_id(M,F)>>database item
    the form is created based on the template.fmb form for apps. When I run the form in the query mode, i can query about any database item while including query about others non database item does not affect.
    how to can i modify it so this could be handled??
    I know that one way to avoid this issue is to create a view with all my desired field.
    but there should be away to override the build in query used by oracle apps...
    any one has a link, source, document... etc that help on this??
    any idea how to do it without creating a view??
    thnx alot

    Hi HST,
    You can code the handling in POST-Query of the corresponding block to retrive the corresponding data depending on the Queried data.
    Regards,
    Kiran

  • How to Ignore Fiscal Year Variant in BEx Query displayed with FISCYEAR?

    Hi All,
    I am developing a report.
    In which I have taken Fiscal Year in columns.
    When I executed the report Fiscal Year is showing with Fiscal Year Variant, I mean it is displaying as K5/2009.
    Please let me know the settings how to ignore Variant? I mean Fiscal Year should show 2009 only.
    Regards,
    HM.
    Edited by: Hariman on Nov 9, 2010 7:47 AM
    Edited by: Hariman on Nov 9, 2010 8:05 AM
    Edited by: Hariman on Nov 9, 2010 8:13 AM

    Hi,
    Fiscal year variant is compounded to Fiscal year. So in Bex query output it will be the format.
    In case you need to remove the fiscal year variant you need to write customer Exit code.
    -- Selva

  • How to know previous navigation item during runtime in Forms

    Hi,
    How can one know the previous navigation item in oracle forms.
    Scenario:
    Navigation: US Super HRMS Manager --> People --> Enter and Maintain.
    On the Find Person window --> Query a Person
    On the People Window, there is an Assignment Button. When clicked, it will open new window "Assignment".
    At this point 'WHEN-NEW-ITEM-INSTANCE' is fired for the item 'ASSGT. ORGANIZATION_NAME'.
    There is DFF on this window and when DFF is closed by pressing OK button, 'WHEN-NEW-ITEM-INSTANCE' is fired again for the item 'ASSGT. ORGANIZATION_NAME'.
    Hence my question is how to know if the previous item is DFF or not.
    Thanks in Advance.
    Vishnu

    Hi,
    How can one know the previous navigation item in oracle forms.
    Scenario:
    Navigation: US Super HRMS Manager --> People --> Enter and Maintain.
    On the Find Person window --> Query a Person
    On the People Window, there is an Assignment Button. When clicked, it will open new window "Assignment".
    At this point 'WHEN-NEW-ITEM-INSTANCE' is fired for the item 'ASSGT. ORGANIZATION_NAME'.
    There is DFF on this window and when DFF is closed by pressing OK button, 'WHEN-NEW-ITEM-INSTANCE' is fired again for the item 'ASSGT. ORGANIZATION_NAME'.
    Hence my question is how to know if the previous item is DFF or not.
    Thanks in Advance.
    Vishnu

  • How to ignore a variable defined in a query when the query gets executed

    Hi SAP guru, I am creating a query, which has a user input variable, say A, and a replacement path variable, say B, Bu2019s value is determined by A and the whole purpose of A is letting user entering an initial value and A must be ignored when the query gets executed. How can I achieve this in query designer?
    Thanks

    Hi, thanks for the reply. Actually this is not my problem. My problem is the query should be filtered by  a variable, say B, but B is not allowed to be entered directly by user (i.e. B could be a replacement path variable or user exit type). So B has to be derived from another user input variable, say A. However if I defined A in the query, A is by default used as one of the filters, which is not desirable because A is a subset of B in my case and should be ignored.
    Is there options (settings) that allow the query ignore a specified variable (A) ? If not is there other ways to get around this?
    Thanks
    MichScott

  • How do we RESERVE certain items to a customer in SAP B1?

    Hi,
    How can I put some items on RESERVE or HOLD for certain customers of ours? Are there many ways of doing this?
    Is it just leaving a SALES ORDER in OPEN state? with CANCEL period of whatever is set at Sales Document level?
    Thank you for you help.

    Hi,
    To truly reserve certain items to a customer, only SP_TN or SDK can do the job exactly to meet your need. All other ways can help to reserve only.
    Thanks,
    Gordon

  • Item Cost in query

    Hi expert
    how can i find last item Cost via query .

    Item cost depends on the inventory valuation method.
    You can view the item cost in the Inventory audit report-cost column,if its not visible in the report then check the form setting-cost.
    If you would like to have a query report,you can use OINM table-price field
    There are two system reports available. One is Inventory Audit Report. Another is Inventory Valuation Report. When you use right mouse click to pop up menu from Item Master, you could view Inventory Valuation Report within current year.

  • How to change the line item storage location during the sales order creatio

    How to change the line item storage location during the sales order creatio

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • How to supply values for searchCriteria items in af:query programmatically

    Hi,
    Is it possible to supply the default values for search criteria items in af:query programmatically? I didn't find any of the method to set the values for the search criteria items inside the oracle.adf.view.rich.model.Criterion and oracle.adf.view.rich.model.AttributeCriterion classes.
    Please let me know how can I supply DATE values by default for the search criteria items inside the view criteria.
    Thanks

    Jdev I am using is 1.5.
    I've search page where I've a date field (like TransactionDate). The transactionDate is a transient variable in my VO. Created a view criteria using this transient date filed and kept the operator as 'Between'. When I load the page, I want to keep the values for Between operator as 'CurrentDate' and 'CurrentDate - 365 days' (LastYearDate as of today).
    I can't use bind variables to set the currentDate and lastYearDate to the values of the 'Between' operator. If I use so, I will get an error 'Attempt to set a parameter that doesn't occur in the sql.....'.
    So I thought of overriding the QueryEvent inside the bean. But I didn't find a way to set the values for the TransactionDate programmatically.
    I tried below code in the queryEvent method, but in this case the response time is very hign ( I didn't see the result till 30mn).
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    ViewCriteria vc =
    JUSearchBindingCustomizer.getViewCriteria((DCBindingContainer)bc.findExecutableBinding("SupplierSearchCriteriaQuery"),"__ImplicitViewCriteria__");
    Date curretYearDate = null, lastYearDate = null;
    Calendar calendar = Calendar.getInstance();
    curretYearDate = calendar.getTime();
    calendar.add(Calendar.DAY_OF_YEAR, -365);
    lastYearDate =calendar.getTime();
    Object o = new Date();
    ViewCriteriaRow vcr = (ViewCriteriaRow)vc.get(0);
    for(int i=0;i<vcr.getAttributeNames().length;i++) {
    if(vcr.getAttributeNames() == "LastTransactionDate") {
    System.out.println("====================== opeartor ================== " + vcr.getOperator("LastTransactionDate"));
    if( ("%".equals(vcr.getAttributeValues()[i]) || vcr.getAttributeValues()[i]==null)) {
    List nameList = new ArrayList();
    nameList.add("LastTransactionDate");
    List valueList = new ArrayList();
    valueList.add(lastYearDate);
    valueList.add(curretYearDate);
    vcr.setAttributeValues(nameList, valueList);
    vc.addRow(vcr);
    JUSearchBindingCustomizer.applyAndExecuteViewCriteria(bc, vc);
    Thanks,
    Lakshman

  • How come the color of items in some MC can be edited whilst the colors of other MC can't

    How come the color of items in some MC can be edited whilst
    the colors of other MC can't. All layers are unlocked.

    Need more info - could be anything - maybe the object is a
    Drawing Object - or Grouped - or an
    instance of a symbol - or...?
    Chris Georgenes / mudbubble.com / keyframer.com / Adobe
    Community Expert
    nikos_golf wrote:
    > How come the color of items in some MC can be edited
    whilst the colors of other MC can't. All layers are unlocked.

  • HT4847 my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    In iPhoto, Select All the Photos you want to move... Then goto  > File > Export >
    Choose the settings as seen here
    Click Export and select your External Drive
    Best to create a Folder to put them in... and away you go...

  • How to round quantity with FMS for some items in Production order lines?

    Hello,
    How to round the quantity with FMS or SP for only some items in the composition of Production order (lines) and the bill of materials like a box or a stick that should not be with commas.
    Exemple  of Production Order
    P1
      M1 | 234,78
      M2 | 104,04 --> 104
      M3 | 60,7
      M4 | 512, 00
      M5 | 107,67 --> 108
    and others will not be rounded
    Thanks,
    Hafid

    Hi Gordon,
    you're always the first to respond, thank you.
    Its when adding the production order, before its creation or when entering the quantity of product in OWOR.
    Like :
    SELECT CASE WHEN ($[$37.4.0] = 'M2') OR ($[$37.4.0] = 'M5') THEN ROUND (T0.[PlannedQty],0)
    ELSE T0.[PlannedQty] END AS PlannedQty FROM WOR1 T0
    or
    SELECT ROUND (T0.[PlannedQty],0) FROM WOR1 T0 WHERE T0.[ItemCode] =$[$37.4.0] AND (T0.[ItemCode] = 'M2' OR  T0.[ItemCode] = 'M5)
    Thanks,
    Hafid

  • After updating firefox it says some items had to be skipped. How do I resolve this problem?

    I had Firefox 6 and I tried to update to Firefox 8 on my macbook. After downloading it and I tried to drag the icon into my applications folder and it asked if I wanted to replace the old Firefox. I clicked yes and it says some items had to be skipped. It says to click on each item and make certain changes but I don't know where to find the items that were skipped in order to click on them.

    If there are problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the disk image (dmg) file to the desktop
    *Firefox 8.0.x: http://www.mozilla.com/en-US/firefox/all.html
    *Trash the current Firefox application to do a clean (re-)install
    *Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data if you uninstall and (re)install Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox

  • Performing Exchange Server patching & service pack for mailbox server without losing some data during the rollback ?

    People,
    I'd like to know how can I safely apply the Exchange Server service pack or cumulative update to the Mailbox Server role (no DAG) without losing some email during the downtime and rolling back the snapshot ?
    Can I do the following:
    1. Stop all of the Exchange Server services.
    2. Disconnect the vNIC in Mailbox server
    3. Take VM snapshot
    4. Apply the Exchange Server service Pack / Cumulative Update or Windows Update
    5. Reboot
    6. Reconnect the vNIC, if the server back online again with no issue, commit / delete the snapshot, if not, then disconnect the vNIC followed by roll back.
    would that be make sense or supported from both Vmware and Microsoft http://www.vmware.com/files/pdf/exchange-2010-on-vmware-support-and-licensing-guide.pdf ?
    If yu have any other suggestion, please let me know here.
    Thanks in advance.

    Hey AlbertWT,
    I'll start off by saying that I wouldn't do it.  Microsoft is explicit that snapshots are not supported with Exchange when virtualized.  See below (from Exchange 2013 virtualization: Exchange 2013 Help):
    Some hypervisors include features for taking snapshots of virtual machines. Virtual machine snapshots capture the state of a virtual machine while it's running. This feature enables you to take multiple snapshots of a virtual machine and then revert the virtual machine to any of the previous states by applying a snapshot to the virtual machine. However, virtual machine snapshots aren't application aware, and using them can have unintended and unexpected consequences for a server application that maintains state data, such as Exchange. As a result, making virtual machine snapshots of an Exchange guest virtual machine isn't supported.
    Even if we ignore the support statement on snapshots this is still not a good idea.  Here are some things to consider.
    1) Cumulative updates for Exchange make changes to the Active Directory Schema.  Rolling back the snapshot on the Mailbox server will not roll back the changes to AD, which could cause functional and supportability issues.  See this link to give you an idea of how there are AD schema updates in every Exchange CU and service pack: Exchange 2013 Active Directory schema changes: Exchange 2013 Help
    2) It is possible for email to come in during the time that you're testing the update, and if you need to roll back you would need a plan to get that email back.  Third party services could work, or you could prevent email from coming into your environment completely during that time, but those are not ideal solutions.
    A far better solution would be to create a lab environment that is isolated from production.  You could either take clones of your Exchange and AD VMs and put them into a network fenced environment, or create a lab and import your AD structure so it matches production.  I think this is a far better way to test than trying to rely on snapshots in production.
    Hope that helps!
    Matt

Maybe you are looking for

  • How to populate data from dynamic drop down list to the text field

    Hi, I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However

  • Default xml namespace = v hangs app

    This is probably due to my relative inexperience with Flex (using FlashBuilder 4.5 and Flex SDK 3.6) but I've got an app that is acting strangely and I'd like to find out what's wrong. Briefly, I'm trying to parse some XML (returned from a REST servi

  • MacBook Air FaceTime Problem:

    Hallo zusammen, ich wollte mein FaceTime auf meinem MacBook Air einrichten und mich mit meinem bestehenden Account anmelden, leider erkennt wohl Apple in diesem zusammenhang meinen Account nicht. Oder muss ich doch einen komplett neuen Account dafür

  • .xhtml file in ADF stack

    Hi Experts, can we have "*.xhtml*" file in ViewControler project instead of .jspx file ? thnks

  • How do you edit a jpeg file and add callouts and save it again as a jpeg file?

    I opened a jpeg file in Acrobat Pro XI and edited the photo adding callouts. It was saved again as a PDF, and when reopened all of the callouts where there.  I tried to save it as a jpeg file, and when repoened all of the callouts were gone.  How do