How to Create a record if vo.executequery does not return any rows

I would like to update a single record on adf form. However if the record does not exist would like to create a row and save it in the table.
The user does not want to add a "create" button on the screen. Hence would need to add the create code if vo.execute does not return any rows...
How to add this and where to add?

you can have a TF router for for exists and does not exist and based on that execute transient VO and other VO.
Add a method call activity like below to create a row in transient VO
public Row createRow()
ViewObjectImpl tVO = (ViewObjectImpl)getTVO();
tVO.executeEmptyRowSet();
Row newRow = tVO.createRow();
tVO.setCurrentRow(newRow);
tVO.insertRow(newRow);
return newRow;
}

Similar Messages

  • OIM-How can i set a password policy which does not contain any space?

    How can i set a password policy which does not contain any space?
    I put space at Characters not allowed but it is not working.
    Can anyone help me out?

    You can go to Settings>Messages and turn off Messages. Then go to Settings>General>Restrictions and turn on the the Restriction that prevent changing accounts.
    I just verified that it works.

  • How to know if the data model qry is not returning any data

    Hi
    If my report doesn't have data (meaning if the data model qry doesn't retreive any data), I wan't to show this text: "There is no data returned."
    My question is how would I know that the qry is not returning any data. I know I can create a text field, and write a trigger on it, to set it True or False depending on the fact that data is being returned or not.
    Thanks
    Shalu

    Hi,
    In Data Model create a summary column for function=count on one of your columns.
    Then for BeforeReport trigger you can write
    function BeforeReport return boolean is
    begin
    if :CS_RPT_NODATA > 0 then
    return (TRUE);
    end if;
    SRW.MESSAGE(300,'There is no data');
    return (FALSE);
    end;
    Regards, Gicu

  • FDM for PBCS - Drill Thru does not return any records in landing page

    This is referring to the Data Management functionality in PBCS, not on-premise FDMEE.
    I loaded in a file, for example:
    Region|Product|Account|Amount
    10|100|1000|9,000
    10|100|1000|1,000
    In FDM, I am using a multi dimensional map to derive another field. For example, if Region is 10 and Product is 100, than Department = 555.
    so in FDM, I would end up with
    10|100|1000|555|9,000
    10|100|1000|555|1,000
    Once loaded to PBCS, that loads in as:
    10|100|1000|555|10,000
    I built a form that shows this intersection, and then 'drilled to source'. When I get to the FDM landing page, there are no records shown. Is this because the derived field (department) does not exist in the source, or am I doing something wrong?
    Appreciate any help.

    Do you have access to the server logs by any chance?
    Can you check the dimension class for your Scenario dimension in your target application? is it set to SCENARIO?
    not showing source records is typically related to FDMEE not finding values in TDATASEG table.
    HTH

  • How to create a looping music player that does not restart when you go to other pages

    Hello
    I am new to web design. I apologize if I do not use the write
    terminology. I am designing a website. I want to have a song that
    loops continuously throughout the site and does not restart when
    you click on the different pages. I have included a link to a site
    that I found that does what I want to do. (Hopefully this link will
    give you a better idea of what I am trying to describe)
    http://www.marcuscoleministries.com/index2.html
    Thanks for your time and consideration

    You will have to use frames which in itself is a bad idea.
    IMO music that
    plays automatically is a terrible idea. It is likely to drive
    away many
    visitors and is unlikely to retain even a single visitor.
    Avoid frames. Drop the music. You'll be happy you did.
    Walt
    "dbone1" <[email protected]> wrote in
    message
    news:fn36v6$de7$[email protected]..
    > Hello
    >
    > I am new to web design. I apologize if I do not use the
    write terminology.
    > I
    > am designing a website. I want to have a song that loops
    continuously
    > throughout the site and does not restart when you click
    on the different
    > pages.
    > I have included a link to a site that I found that does
    what I want to do.
    > (Hopefully this link will give you a better idea of what
    I am trying to
    > describe)
    http://www.marcuscoleministries.com/index2.html
    >
    > Thanks for your time and consideration
    >
    >

  • None of the applications are coming up on my Ipad after I have downloaded them on my MAC. How do I transfer them as my Ipad does not have any icons showing on it.

    I purchased a new Ipad and I can't see any of the apps on the Ipad. The Itunes shows that they are there, but I can't see anything on the Ipad. It seems dead after it has been plugged in all night.
    I get a message that is stuck "Restoring IPad apps.

    Go to settings>messages>send and receive at>you can be reached by iMessages at> Uncheck your phone number and you can select your Apple ID emal address if you want to use that for messages.

  • Group Used as LOV does not return records

    Have:
    1. A header table called Claims
    2. A detail table called ClaimLines
    3. The Claims Table has a foreign key called emp_no which refers to an employee table ( Claims for an employee)
    4. The ClaimLines table has a foreign key called mem_id which refers to an employee family members table that also has emp_no as a foreign key (family members for an employee)
    5. A JHS group for Claims that shows the employee name and employee id. An LOV populates the employee name and employee id
    6. A details group fro CalimLines that shows family member name. An LOV populates the member name and member id. (The idea is to pull family members for the employee selected in the header section in 5 above.
    Problem:
    The calims LOV populates the employee name and employee id correctly.
    When I move to the calimlines (details), the members who should be restricted to the employee selected in the Claims group does not return any records.
    The LOV for the members is based on a VO called DependentsofEmpolyee that has a where clause emp_no=:p_emp_id (:p_emp_id is a bind parameter)
    The LOV group for the members has an EL expression in the Query Bind Parameters
    p_emp_id=#{bindings.ClaimsEmpId.inputValue}. The expression is to restrict the members to those who belong to the employee selected in the Claims section of the page.
    Debug gives the following information:
    -ViewObject DependentsOfEmployee1: bind parameter values have not changed, NO Requery performed.
    It seems that the p_emp_id is not being populated with the emp_id from the header section(Claims)
    The same EL expression works if applied to a dynamic LOV. The drawback of the dynamic LOV is that is only populates two fields, the value attribute and the meaning attribute. In our case we need to populate more than one attribute.

    Thanks for the input.
    I tried the following
    1. Create a managed bean in faces-config.xml.
    <managed-bean>
    <managed-bean-name>FamiliyLovContext</managed-bean-name>
    <managed-bean-class>FamiliyLovContext</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    2. Updated the skeleton class FamilyLovContext.java to:
    public class FamiliyLovContext {
    Number empId;
    public void setEmpId(Number empId) {
    this.empId = empId;
    public Number getEmpId() {
    return empId;
    3. Copied tableLovItem to tableLovItemFamily and added the following to the section
    <af:selectInputText
    <af:setActionListener from="#{bindings.ClaimsEmpId.inputValue}"
    to="#{FamilyLovContext.empId}"/>
    4. Used the the new template for the lov item in the claimlines group.
    5. set the query bind parameters of the lov group to #{FamilyLovContext.empId}
    I gor the following error
    16:38:08 ERROR (ApplyRequestValuesPhase) -java.lang.IllegalArgumentException: argument type mismatch
    javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: argument type mismatch
         at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:248)
         at oracle.adfinternal.view.faces.taglib.listener.SetActionListener.processAction(SetActionListener.java:50)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
         at oracle.adf.view.faces.component.UIXComponentBase.broadcast(UIXComponentBase.java:548)
         at oracle.adf.view.faces.component.UIXEditableValue.broadcast(UIXEditableValue.java:243)
         at oracle.adf.view.faces.component.UIXSelectInput.broadcast(UIXSelectInput.java:170)
    The ClaimsEmpId attribute is Number(4,0)

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How to create a record for table PLAF with order type 'NB'.

    How to create a record for table PLAF with order type 'NB'(standard purchase order).
    who can tell me the T-code or some usefull information?
    Thanks.

    Hi
    This will be updated automatically when generate planned orders thru MRP. (MD02)
    regards
    Srinivas

  • How to create a temp table in the memory, not in disk?

    in sql server, you can create a temp table in the memory instead of disk,
    then you can do the insert, delete,update and select on it.
    after finishing, just release it.
    in Oracle,
    I am wonderfing how to create a temp table in the memory, not in disk?
    thanks,

    Thanks for rectifying me Howard.
    I just read your full article on this too and its very well explained here:
    http://www.dizwell.com/prod/node/357
    Few lines from your article
    It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
    Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
    Thanks and Regards

  • Valuation record 600025 UP01 LOCAL does not exist

    Dear Friends,
    I have configured split valuation for materials.
    1. i activated split valuation in OMW0
    2. I created the following in OMWC
        2.1 global types IMPORT for 0003 spareparts
        2.2 global types LOCAL for 0003 spareparts
        2.3 global category P Batch
              for this category, above 2 types activated.
              for this category, above 2 types are assigned to my Org. Unit plant UP01.
    now i created a material 600025 and in accounting1 view, i have taken the following
           valuation category - P
           price control - V
           moving price - 1,00
    next i created a PO in ME21N for vendor 400015.
    while MIGO against this PO,
    after clicking Check the below error is coming.
    Valuation record 600025 UP01 LOCAL does not exist
    Message no. M7077
    how to fix this. please help me.
    Thanks in advance
    Ravi.

    Hi,
    create val types for your material in MM01,.
    Goto MM01 and select accounting view and give your org level plant and in the pop up window enter P val type and in acc view give details for your different val types.
    Regards,
    Deepak.
    Edited by: deepak k b on Dec 11, 2008 8:17 AM

  • Tuple Record deleted in MDM does not reflect in ECC

    Hello Experts,
    We have a scenario for central creation of Material master data in SAP MDM 7.1 and syndication to SAP ECC system. We are using tuples for Long text & Alternate unit of measure.
    The problem is as below:
    If we create a material with 1 or more tuple records for Long text & Alternate unit of measure and syndicate it, it gets created in the SAP ECC system properly.
    If we add 1 more a tuple record it gets updated successfully.
    But if we delete a record from the tuple for same material and save and syndicate it, it does not get updated in the SAP ECC system.
    Please help!
    Thanks in Advance
    ~ Suraj Sawarkar

    Hi Suraj,
    Or is there some other thing amiss?
    Can you please revert with whether this Tuple node Property is required or not in MDM syndicator. I mean in MDM Syndicator-->under Destination Items Tab, Property Required is Ticked in Check box or not.
    As I am able to figure it out that this may be one reason, If this is not ticked in check-box then this tuple node will not generate if it does not have any values. I mean in case if you delete tuple record in MDM a file will get syndicated out of MDM without these Tuple nodes. Thus would not able to pass Null to target side structure of IDOC and therefore your Tuple record is not getting deleted in  SAP ECC system.(R/3 side). So please make sure that this Tuple nodes must be generated even if it carries blank values (nothing) in syndication files so that you can map with required target structure of ECC IDOC to pass these blank values.
    Regards,
    Mandeep Saini

  • How do i set the background of the table( not of cell / row / column).

    How do i set the background of the table( not of cell / row / column).
    What happens when i load the applet the table is blank and displays the background color is gray which we want to be white.
    We tried using the setBackGround but it is not working maybe we are not using it properly. Any help would be gr8.
    Thanks in advance.

    I don't understand very well, but i guess that the background is gray when the table content's empty, isn't it?
    When the table model is empty, the JTable doesn't paint, so its container displays its background (often gray).
    In this case, what you must do is force the table to paint, even if the model is empty. So, you have to create your own table and override three methods :
    public class MyTable extends JTable
    //specify the preferred and minum size when empty
    myPreferredWidth = 200;
    myPreferredHeigth =200;
    myMinimunWidth = ...;
    myMinimunHeigth = ...;
    public Dimension getPreferredSize()
    if(getModel().getRowCount() < 1)
    return new Dimension(myPreferredWidth, myPreferredHeigth);
    else
    return super.getPreferredSize();
    public Dimension getMinimumSize()
    if( getModel().getRowCount() > 0)
    return new Dimension(myMinimunWidth, myMinimunHeigth);
    else
    return super.getMinimumSize();
    protected void paintComponent(Graphics g)
    if (getModel().getRowCount<1 && isOpaque()) { //paint background
    g.setColor(Color.white);
    g.fillRect(0, 0, getWidth(), getHeight());
    else super.paintComponent(g);
    }

  • ITunes drag to import new songs in library or to create playlists from folders on windows does not work!

    iTunes drag to import new songs in library or to create playlists from folders on windows does not work!
    WHY? I have to solve, how can I do? Thank you

    up

  • When i try to record a video it does not work

    When i try recording something the video does not start recording and it does not save

    This started for me today, too. I have turned my phone on and off, but I don't want to lose all my info by resetting my phone.
    What do I do to backup all my pics, phone numbers, texts, etc before I restore my phone? then once the restore is finished, how do I get this stuff back on my phone?
    thanks,
    hemi.powered4x4

Maybe you are looking for

  • IPod Video (5G) Freezes when playing videos

    I just bought (yesterday) a new black 30gb 5th generation video iPod. I purchased 2 songs of the iTunes and copied it to my iPod. After it said it was done updating my iPod, i disconnected it and viewed the video. It played smoothly. The next today (

  • Mail search no longer works after 10.7.2 upgrade

    The search field in the upper right hand corner no longer returns any results, from any mailbox, regardless of the text I type in.  This was working fine until I upgraded to 10.7.2.  I absolutely rely on the search feature as my mail messages are a w

  • Error when installing the crruntime_12_1.msm

    Hi We have Vis Studio 2008 and CR 2008 Recently upgraded to SP1 of CR2008 When installing the latest version of our software, which has the CrRuntTime_12_1.msm integrated into the installation, onto an XP sp2 machine, many of the DLL's failed to inst

  • Don't want ent svr email..

    I am setting up a new phone and the ONLY option available under - Setup - Setup Wizard - Email Setup.. is a button that says "I want to use a work email account with a BlackBerry Enterprise Server"... The button is clicked and cannot be un-clicked. D

  • Documentation Discoverer 3.1

    Hi ! Does anyone know where I can find Documentation on the internet about Oracle Discoverer User Edition 3.1 (or actually 3.1.40) and Oracle Discoverer Administration Edition 3.1 ? I am looking for information about using the programs and any nice t