Why empty query if non-db items populated??

Can anyone tell me why having a block with non-database items, when preassigned before entering block, would result in an empty query for the rest of the database items in the block?
In a when-button-pressed trigger I assign values to the non-db items in the new block. When I do this, the query returns nothing. If I comment out those assignment commands, it queries fine. why??

Hi Anthony,
Did you get a FRM-40402 error - Field must be entered? If you did, you probably have a (Primary Key) mandatory field in the block.
Anyway, what is the reason for assigning values to the non-db items before executing a query?
Regards,
John

Similar Messages

  • How to query on non database item?

    I am working on AP Invoice form. The Invoice Header block based on table ap_invoices_all, I have database items such as invoice_num, invoice_date, and invoice_amount. I also have some non databases item like supplier and supplier number. I added POST_QUERY:
    declare
    supplier varchar2(240);
    supplier_number varchar2(30);
    supplier_site varchar2(15);
    begin
    select aps.vendor_name, aps.segment1
    into :invoice_header.supplier, :invoice_header.supplier_number
    from ap_suppliers aps
    where aps.vendor_id = :invoice_header.vendor_id;
    Also in PRE-QUERY
    declare
    supplier varchar2(240);
    supplier_number varchar2(30);
    supplier_site varchar2(15);
    invoice_num varchar2(50);
    invoice_date date;
    invoice_amount number;
    begin
    select aia.invoice_num, aia.invoice_date, aia.invoice_amount
    into :invoice_header.invoice_num, :invoice_header.invoice_date, :invoice_header.invoice_amount
    from ap_invoices_all aia
    where aia.vendor_id = (select vendor_id from ap_suppliers where vendor_name = :invoice_header.supplier);
    It's showing fine with Suppier iformation I query by invoices, but I doesn't work when I query by supplier.
    Can anyone help? I really appreciate.

    Hello,
    Thanks for your reply. I think I need to clarify my problem
    Your cursor has the same result as what I have in the post-query:
    Select aps.vendor_name, aps.segment1
    into :invoice_header.supplier, :invoice_header.supplier_number
    from ap_suppliers aps
    where aps.vendor_id = :invoice_header.vendor_id;
    and they both work when I query on a database item, such as invoice_num and the non database item vendor name and vendor number will show up. I am doing ok with this.
    My problem is when I query on vendor name field which is not a database item, such as CLARK PUBLIC UTILITIES, it will not return CLARK PUBLIC UTILITIES only, instead it returned all the suppliers. Could you please help with this? Thanks a lot.

  • Pl.tell a query for non databsae items values as zero

    hai
    i have table like this
    emp_name     date           hours
    xxx          19-12-2007     3
    yyy          20-12-2007     4
    zzz          23-12-2007     3
    i want a query to get the data for 5 days.(ie.19 to 23)
    In that the left two days should be placed as zero in the output.
    please help me.
    thanks

    Something like:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'xxx' as emp_name, to_date('19-12-2007','dd-mm-yyyy') as dt, 3 as hours from dual union all
      2             select 'yyy', to_date('20-12-2007','dd-mm-yyyy'), 4 from dual union all
      3             select 'zzz', to_date('23-12-2007','dd-mm-yyyy'), 3 from dual)
      4  -- END OF TEST DATA
      5  select t.emp_name, d.dt, nvl(t.hours,0) as hours
      6  from t,
      7       (select to_date('19-12-2007','dd-mm-yyyy')+rownum-1 as dt
      8        from dual connect by rownum <= to_date('23-12-2007','dd-mm-yyyy') - to_date('19-12-2007','dd-mm-yyyy') + 1) d
      9  where d.dt = t.dt(+)
    10* order by d.dt
    SQL> /
    EMP DT                       HOURS
    xxx 19/12/2007 00:00:00          3
    yyy 20/12/2007 00:00:00          4
        21/12/2007 00:00:00          0
        22/12/2007 00:00:00          0
    zzz 23/12/2007 00:00:00          3
    SQL>

  • Need a query to update the inventory item to non inventory item

    Dear all,
            I need a query which should update the Inventory to Non - Inventory Item.

    Hi,
    You need to freeze the inventory by click inactive tick box. This will prevent users to use the inventory.
    The inventory posting lists will still exists as an inventory's transaction history for auditor if the inventory have had transactions.
    To empty the warehouse, just perform good issue and use inventory decrease account. After the warehouse has been empty, create similar inventory item by right click --> select duplicate. Create new item code and in the tab remarks, just write this non inventory item was ever inventory item with code e.g. xxxx.
    if you want to recover the stock, just create new item and then receive the stock into warehouse using Good receipt. use the same account code with account code used in the good issue.
    JimM
    PS.
    Do not use sql statement to update B1 database. No SAP support provided afterwards.

  • About populating a non-database item in a multi-records block

    Hi, all
    I have a problem about populating a non-database item in a
    multi-records block. This block is set to database block with a
    controlled item which needs to be populated after query. so I
    create a post-query trigger, but my problem is when the records
    listed in this block are less than 10 ( the record number is set
    to 10), the trigger fires no problem. but when the retrieved
    records are greater than 10, the error message is 'post query
    trigger raised unhandled exception ora 01403'. anyone can help me
    fix this problem?
    Thanks in advance
    Diana

    Diana,
    When you have an unbound item in a block and want to fetch
    some data into it you need to write a post-query trigger.What
    you have done is right.But it seems that u are getting a No data
    found error.I am sure about how u r populating data into that
    field.If u have written a select statement to fetch the data in
    post-query trigger, kindly handle an exception and find out the
    problem.Having a look at ur code(pos-query) would be much more
    helpful for giving a better solution.Try this a let me know.
    Thanks
    Vinod.

  • 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

  • Querying a record from a non-database item

    I am working in Apex 4.0. I have a page based on a table with the following columns: dktnr, borrower, amount, previous_dktnr, subsequent_dktnr. The precious_dktnr is the dktnr under which the loan was financed in the past, before its assumption or refiancing. The subsequent_dktnr is the dktnr under which the loan is later identified. When a loan is refinanced, it is assigned a new dktnr in a new record, and the old dktnr is placed in the previous_dktnr column of that new record, and the current dktnr is placed in the subsequent_dktnr column of the old dktnr record.
    I created two buttons, one for the previous_dktnr and one of the subsequent_dktnr. When I click either of these buttons, the action redirects to the current page and places the value of either the previous or subsequent dktnr into the dktnr item. This queries the record for the dktnr that has the same value as the previous or subsequent dktnr.
    This works. It allows the user to shuffle back and forth between the two dktnr's.
    One would assume then that, if a non-database item were created, say :P22_QUERY_DKTNR, you would be able to enter an existing dktnr into that item and have a button, using the same logic as the previous and subsequent dktnr buttons, that would be able to return the record for the dktnr entered.
    I have tried this, and it does not work. Can anyone tell me why it does not work?
    Edited by: Doug on Apr 9, 2011 3:42 PM
    Edited by: Doug on Apr 9, 2011 3:43 PM
    Edited by: Doug on Apr 9, 2011 3:43 PM
    Edited by: Doug on Apr 9, 2011 3:45 PM
    Edited by: Doug on Apr 9, 2011 3:46 PM

    Doug,
    Made copies of your two page within your workspace, page 3 & 4.
    The issue was the page did not have a value in session containing your Look_Up value. I altered the Look-Up button to Submit the Page so as to capture the Look_Up value and then added a new Page Branch that was sequenced prior to your existing branch. This new branch sets your P4_DKTNR with the Look_Up value and then returns your results.
    Jeff

  • Non-Database items in enter-query mode

    I have a form with 2 base table blocks, typical master details situation. I wish to allow a field from the detail block to be queryable from the master block. I was considering adding a non-database item to the master block (visible only when in Enter-Query mode). In a pre-query trigger I would amend the DEFAULT-WHERE property of the master block when the appropriate where clause using the non-database item value. My prototype/test version works fine except the non-database item is not enabled while the master block is in enter-query mode.
    I think basically forms will enable only field s if they are database items and queryable set to yes. There are no more database items I can use to set the non-database item column name property.
    Any suggestions would be appreciated.
    Ralph
    Oracle Developer - Unisys Australia

    Hi Ralph,
    we have several Forms using non-database items as query-items which works fine.
    What we did is following:
    1) create non-database item xy in master-data-block
    2) set property database item to no
    3) set property query allowed to yes
    4) create a pre-query trigger on master-data-block where we change the where-clause (this is forms6i, in 9i we would use the one-time-where-clause)
    Peter

  • Best way to query on a non-table item?

    Hi,
    I have a form that has customer_name (non-table item) and customer_id (table item). Customer_id is not visible to the user. We need to be able to query on the customer_name. I have tried using the pre-query trigger but I get an error ORA-01422. Any suggestions would be appreciated. I am a non-technical person, so the simpler, the better.
    Thanks in advance.
    Trish

    Hi ,
    I know two alternatives:
    1) Use the POST-QUERY trigger not the PRE-QUERY... But, you would have the same problem because i think that the customer_id column is not unique. So you should select a combination of columns which guarantee the uniqueness of the selected column...
    2)Other design. Read the doc at :
    http://www.oracle.com/technology/products/forms/pdf/BlockOnAJoin.pdf
    Using this way you should not use the trigger POST-QUERY....
    Regards,
    Simon

  • How to query non database items

    hi every one
    I have database block has database items and non database items
    i want to make query in that non database items to retrieve data by that non database items and database items
    thinks

    Hi Every one
    I want to use the non databsae item in query to retireve data by it
    Example
    In table emp
    emp_id
    emp_name
    Dept_id
    But in Form
    Emp_name
    Dept_name
    When endtr data open lov to retireve Emp name and emp id
    and when enter department name in table enter dept id but in form user see dept name in form .
    but if he try to use dept name in query he can't because it non database item .
    How can i use this item in my query to retireve data by dept name ?

  • Query Non Database items in form

    I need to be able to query non database items in the form.

    Hi,
    Yes you can do this. You have to create control items all of them have same data type and lenght as table's. then you can issue select statement. eg.,
    select field1, field2
    into :item1, :item2
    from table_name;
    Hope this helps
    Mustafa

  • Auto G/L population for Non Stock Items

    Hi,
    I am trying to configure the Auto G/L Population for Non stock item (Material Master item).I have created the Material without Valuation class assignment.
    Master data:
    Material 1(Material type : Non Stock,No valuation class assignment,attached with Material Group X)
    Material group X is attached with Valuation class (Entry aid for items without material master)
    In OBYC -->Transaction GBB with modifier VBR maintained the G/L for the relevant valuation class.
    I am expecting to default that G/L in Purchase requisition creation screen. But system is not defaulting the G/L account.
    Is there anyother steps involve to achieve the G/L default for NON STOCK Materials without assigning the valuation class to Material master.

    Hi,
    You can set with the help of t.codes:
    OME9, OMGO,& OBYC.
    Check the below link how  to set default  General Ledger for  Non stock item (Material Master item) in purchasing document
    http://www.bluemarlinsys.com/ns/0603-03.asp
    Regards,
    Biju K

  • Including non database item in the query mode

    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??
    thnx alot

    Hi, it is probably best for you to post your question in the EBS forum
    General EBS Discussion

  • How to find the PREVIOUS value of a non-DB item?

    I want to do a simple thing but found it impossible.
    I want to find the previous value of a non-DB item in a form.
    I tried creating a text item and populating it using PRE-TEXT-ITEM but that does not work.
    WHEN-VALIDATE-ITEM does not work either because WVI fires only after item value has changed.
    Any suggestions will be greatly appreciated.
    Edited by: Channa on Apr 2, 2010 4:34 AM

    Channa wrote:
    I want to do a simple thing but found it impossible.
    I want to find the previous value of a non-DB item in a form.
    I tried creating a text item and populating it using PRE-TEXT-ITEM but that does not work.
    WHEN-VALIDATE-ITEM does not work either because WVI fires only after item value has changed.
    Any suggestions will be greatly appreciated.
    Edited by: Channa on Apr 2, 2010 4:34 AMPlease make it clear what is your requirement then possibly we can provide you a better answer
    You can use Global variables for to store old values also on Post-query populate a value in separate field or Parameter

  • 'Strange' naming restrictions none databound items in search

    I have a none databound item, which I want to use for an advanced search
    I want this to map to a variable in the ViewObject. I provided the query bind parameters for this in the JHS group under bindparameters.
    The attribute on the ViewObject is called ‘weekNummer’.
    Now what I did was create a group in JHS which is called ‘Weekoverzicht’
    I added a new item on the JHS group (WeekNr), since the attribute is not databound I don’t fill the attribute name. The attribute is a choice populated by a domain.
    Now when I first tried this page it failed, claiming the attrribute ‘WeekoverzichtWeekNr’ Does not exist.
    Which is true ofcourse, I was looking for a way to point the none databound item to the attribute weekNummer. I could not find this option, so I decided to run it and see what happend.
    What I did next is rename the attribute on the ViewObject to ‘WeekoverzichtWeekNr’ and reflect this in the query and bind parameters.
    Now it works fine but the naming convention is a bit weird, It has to be named <groupname><itemname> which is a form of tight coupling I’m not really happy with.
    Basically an option to ‘bind’ none databound items to an attribute directly would be very nice.
    Was this intended or do I just fail at using JHS?
    Anton

    The generated jspx is the following:
    Note that I added the binding post gen for supplying a dynamic default search value which I mentioned in another thread on this forum.
    <af:selectOneChoice id="SearchWeekoverzichtNummer" value="#{searchWeekoverzicht.criteria.WeekoverzichtNummer}" binding="#{WeekoverzichtBacking.currentWeekYear}">
    <af:forEach var="row2"  items="#{bindings.WeekData.rangeSet}" >
      <af:selectItem id="SiAsWeekoverzichtNummer" label="#{row2.Weekstring}" value="#{row2.Weeknummer}"/>
    </af:forEach>
    </af:selectOneChoice>  The corresponding generated bean code is the following.
    <managed-bean>
      <managed-bean-name>searchWeekoverzicht</managed-bean-name>
      <managed-bean-class>oracle.jheadstart.controller.jsf.bean.JhsSearchBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>bindings</property-name>
        <value>#{data.WeekoverzichtPageDef}</value>
      </managed-property>
      <managed-property>
        <property-name>searchBinding</property-name>
        <value>#{data.WeekoverzichtPageDef.advancedSearchWeekoverzicht}</value>
      </managed-property>
      <managed-property>
        <property-name>searchItem</property-name>
        <value>WeekoverzichtNummer</value>
      </managed-property>
      <managed-property>
        <property-name>dataCollection</property-name>
        <value>CasWeekOverzicht</value>
      </managed-property>
      <managed-property>
        <property-name>autoquery</property-name>
        <value>false</value>
      </managed-property>
        <managed-property>
        <property-name>findModeIters</property-name>
          <list-entries>
            <value>#{data.WeekoverzichtPageDef.WeekoverzichtIterator}</value>
                </list-entries>
      </managed-property>
          <managed-property>
        <property-name>operators</property-name>
          <map-entries>
         </map-entries>
        </managed-property>
    </managed-bean>Where the searchItem tag holds the value which I need to name my bind variable on the view object.
    I think I called it attribute on the ViewObject earlier which is wrong ofcourse, its bind variable.
    I know where to find them, but I always forget the names...
    I can live with it, although its not 'pretty'

Maybe you are looking for

  • My 13" MacBook pro can't turn on power, My 13" MacBook pro can't turn on power

    My MacBook pro turn off power while using . And can' turn on power .i tried all the way from user manual book. I won't work. What should I do?

  • Creating a Java game for Windows

    Does anyone know a website or tutorial that provides information to Java developers, regarding the production of games? I would like to create my own chess game in Java for use on a Windows platform. Thanks

  • Safari connection problems

    My Safari will not load webpages. It just sits there with a small bit of blue in the URL bar It is not an internet problem as Firefox works fine from this MacBook Pro. I have reset safari and cleared the cache..still no joy. Any help? Christian R

  • Cant edit the Charecteristic in CT04

    Hi Experts, I would like edit a charesteristic in CT04 but when I am trying to do that system is throwing a message "Characteristic from reserved name range: change not possible"". Could you please help me how to over come this error and proceed in e

  • Is TC useful if I don't use Time Machine?

    Long story short, I don't use Time Machine. But I do want storage on my (gigabit, wired) network to which my Macs can backup their internal drives. So if I purchase a TC, how does its drive appear in Finder to my Macs? Is it simply a "drive" I can ac