Using ROWTYPE to create undoable record

Does anyone have any insight on how I would perform the following in forms:
Define a %ROWTYPE record
On Each Navigation to a new Record
Store all the record's values in %ROWTYPE variable
An UNDO button on the form would then revert all the values in the current record to the values stored in the %ROWTYPE variable.
I am new to this, I can't even seem to figure out how to define the %ROWTYPE variable, much less populate and revert the form's contents.
Thanks for your help.
MS
null

1. Put a trigger on the table that populates the pk with the sequence
2. Change your procedure "PROMOTE" into a function that returns the new id
3. In your function code, use the "returning ... into" clause of an insert statement to get the new id:
create or replace function promote(
  p_early_proj_id in number)
return number
is
  l_new_id number;
begin
  insert into late_project (a,b,c) values (...) returning id into l_new_id;
  return l_new_id;
end promote;4. Call your function from a PL/SQL process like this:
:P8_NEW_LATE_PROJ_ID := PROMOTE(p_early_proj_id) ;This technique will also allow you to call this function from technologies other than APEX, instead of burning part of the logic into the APEX code itself.
Tyler

Similar Messages

  • Creating multiple records

    When creating multiple records in a table using a SBO object eg invoice object, do you have to create a new business object for each record that is created?  There is a lot of overhead in doing this (eg each object takes about 1MB of mem so to create 1000 invoices would hog 1GB of mem).  Is there a way to create just one instance of the object and use it to create many records?  How is the object cleared in between each record creation?

    Greg,
    Everytime you call GetBusinessObject() you should, at the end, also release the acquired memory.
    This can be done with the following code in .net (C#):
    System.GC.Collect();
    System.GC.WaitForPendingFinalizers();
    Another way to clear all the data is to call the <b>GetByKey(-1)</b>; the document with docentry '-1' does never exists and the fields of the object are normally cleared.
    Regards,
    Jurgen

  • Can't use function in creating record group

    Gurus,
    This question is for developers. Is this true one can't use
    function in creating record group. I am using form5.
    thanks,
    ZW

    I figured out the issue... they changed the way Group Calls are limited.
    Here's a full explaination - and a suggestion for a behavior fix: http://community.skype.com/t5/Windows-desktop-client/Please-Fix-Group-Video-Voice-Calling-Limit-Beha...
    Long story short, you can't do a video calling at all if the group has more than 10 people in it total (including you).
    Also, you can't do voice calling in groups with more than 25 people.
    Text chats are limited to 300 people (or so I've been told by Skype employees). I've been in a chat with over 100 participants though so I know it goes that high at least.

  • Howto use an existing record as template in a create new record form

    hi all,
    I have a table with configuration lines, Currently accessible via a report/form combination. This works fine to create, view & edit data.
    However users often need to create a new record which is 90% like an existing record.
    So what they want is to go to an existing record and use it as template for creating a new record (by clicking a button "create copy from"
    My solution attempt
    -when the button is pressed send users to the normal create form, and prefill some of the items with data from the "template record", after which everything is the same as creating a record from scratch
    What did I try
    - as above redirect user to the "create page" and sent the desired items values via URL Syntax. Failed since I have about 20 items and the button settings won't allow me to add more then 10 (besides it not a pretty sight)
    - Instead of sending via URL I've tried only sending the record id for the template and have a "before header process" load the item values in session state. Failed since the page items are all (load form source each time) since they are database columns
    Constraints for the solution
    - No, I can't go first inserting a copy of the record and then display it in edit mode since the remaining 10% of the record can not to be copied because of table constraints. They have serious constraints, which needs user input.
    - (and no I can't first insert dummy data, that's a poor man's solution)
    - I'd like to reuse the current create/edit form since it contains quite some business rules and constraints. So dubbing the page will put me up with a double load of maintenance in case of future changes in business rules
    I'd appreciate any good clues in solving this requirement
    best regards,
    Geert

    Hi Shunt,
    Not entirely what I wanted accomplished but it held the key.
    Removing the PK wouldn't trigger the DML to respond differently on it's own, since the DML decides the database action based on the request.
    I have the create/edit page working on with a "COPY" request
    This way I can call the page both from the report as the form page.
    When called with COPY request the page is loaded as normal edit except
    - I hide the delete and apply changes button
    - I show the create button
    When the create button is pressed a computation removes the PK
    Since the create button is pressed instead of apply_changes it will indeed perform an insert
    Thanx again for the hint
    Sometimes you need an new perspective
    Geert

  • Restricting User from creating new records using when-validate-record

    Hi,
    I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.
    I have done the following setups
    Seq 10
    Description Restricting user from creating Affiliate records
    Level Function
    Enabled Yes
    Condition:
    Trigger Event WHEN-VALIDATE-RECORD
    Trigger object VNDR
    Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
    and
    ${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
    Processing Mode BOTH
    Context
    Level User
    Value User Name
    Action Sequence 1
    Type Message
    Action Description Saving Affiliate record
    Language ALL
    Message Type Show
    Message Text You Cannot Create Affiliate records Here
    Action Sequence 2
    Type Builtin
    Action Description Stop Proceesing
    Language ALL
    Action Enabled Yes
    Builtin Type RAISE FORM_TRIGGER_FAILURE;
    This is working good on one instance but when I moved it to another instance
    when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
    Any suggestions on this would be higly appriciated.
    Thanks in Advance.

    Hi Srini,
    Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
    Sometimes it doesn't give any response.
    Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
    Please share any ideas/example if yiou have to achieve the below requirement.
    Requirement:
    Once New record is created , a Custom Procedure should be invoked.
    with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
    Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
    Thanks & regards,
    Edited by: user632004 on Mar 16, 2010 7:50 PM
    Edited by: user632004 on Mar 16, 2010 8:09 PM

  • How can we create info record using IDOC INFREC?

    Hi Friends,
    Can we create info record using IDOC INFREC. If Yes. How?
    Regards,
    Narendra

    Using IDOC INFREC & FM IDOC_INBOUND_SINGLE

  • Create a record using SAPUI5 and ODATA Service

    Hi there,
    since SPS6, SAP HANA should allow CRUD operations using an ODATA Service.
    That sounds nice and so I wanted to give it a try.
    I've started by creating a simple table and set up a tiny application that displays the data in a grid (using a JSON Model) and allows to insert new records by entering data into two textfields and save them as a new record to the databse. That works well, the grid shows the records which I have created using the SAP HANA Studio.
    So I wanted to create new records, and the documentation says very clearly how to create a new record.
    I've tried it this way, but when the request is send I get an 501 Not Implemented error.
    Thats the code I'm using in my SAVE-Button:
    btnSave.attachPress(function() {
       var entry = {};
       entry.id = tfUserId.getValue();
       entry.username = tfUserName.getValue();
       oData.create('/tbl_user', entry, null,
       function() {
          alert("Create successful");
       function() {
          alert("Create failed");
    After that I've tried to create a record using the POSTMAN extension for Chrome browser as mentioned in this cool video by Thomas Jung.
    Unfortunately, this also doesn't work for me. After sending the request I get as respone a sap hana xs login window with Status Code 200 instead of a status code "201 created".
    Here's a screenshot:
    I'm using SAP HANA Cloud Trial.
    Anybody got an idea what I'm doing wrong? Or does ODATA CRUD not work an SAP HANA Cloud Trial?
    Many thanks,
    ben

    Hi Jason,
    exactly, it's the logon page returned that is opened when I open the service URL in the browser. After logging on I can see the results of the ODATA service call.
    The URL must be correctly defined, the grid shows up the data from the ODATA Service.
    And yes, the URL looks OK when expecting in Chrome developer tools...
    Thanks,
    ben

  • How to create multiple records using ADF

    Currently working on my first ADF BC and UIX project, and I basically want to create multiple records after a user makes a choice on the screen. I would like to know at what layer should this functionality be implemented?
    Would this be more at the Struts/Controller level, where I have a java class to perform the creation as part of a data action? I ask because, I am not sure if this is feasible at the ADF BC level (View objects and Entity Objects) via some sort of customization, and i am new to the different possibilies avail as part of the ADF framework
    Regards
    Anora
    (Jdeveloper 10.1.2.1 build 1913, Oracle DB 10.1.2)

    I'd put it into the application module. You then can call the method from the controller layer or from an other application module. This way you put it into the business logic, which helps if you ever decide to use a different client approach (like swing).

  • If std iview can b used for creating qualified record

    Hi all
    standard iView can b used for creating qualified record ? if possible and how it is? please let me know ASAP
    Regards
    Sunil

    Hi Sunil,
    Yes it is possible to create qualified record using Standard MDM iViews.
    Please follow the steps mentioned below:
    1. Create the Item Details iView with Create and Edit option enabled and select the Qualified table fields along with the other fields.
    2. Go to the option Relationship and Qualified Display fields. You will find the entry of the Qualified field that you have selected earlier.
    3. Edit the entry and select the Qualifiers that you want to appear in the output. Also select the Non-Qualifier as well.
    4. Save the iView and preview it.
    Note: To create an entry in the Qualified table first create the main table record and click on save. Then click on Edit to make an entry in the Qualified tables.
    Regards,
    Jitesh Talreja

  • Inquiries: Creating mp3 recorder/player using Java

    Dear Gurus & Members,
    I am very new in Java. I wonder if it is possible to use Java to create a small application/plugin on my e-learning website that will record user's audio through microphone, save as .mp3 on the user's pc and enable user to playback the mp3s when they select. If yes, what do I need and how can i do?
    My website is created using mostly Macromedia Flash. Can Java be incorporated with Flash? How can i call this java plugin from the Flash-created button on my site?
    Is there any freeware that has built such application? Any suggestions and ideas are highly appreciated. Hope to hear some replies soon and have a pleasant day.
    Thanks in advance,
    Janice

    If you are doing it on Windows, JMF can use the DirectX stuff to play anything that is supported by Windows Media Player. But cross platform-ness goes out the window. Of course, you could write your own JMF codecs for any format under the sun if you know how.

  • Call the webdynpro appl while creating one record using itemDetail iView

    Dear Expert,
    I have one scenario where in the user want to create one record in MDM table using itemDetai iView. When the user clicks on one custom button in this itemDetais iView say validate one webdynpro applicatio should be called and this applicaiton should  validate the user input depending on business requirement.
    Thanks and Regards,
    M.D.Sahu

    thanks John for your valuable input.
    In my requirement user don't want to touch the MDM repository or don't want the serve side eventing. After giving the user input in Item detail Iview the user will click on Validate button and one WDJ applicaiotn should be called to validate the users input. Please guide me in achieving this result.
    Thanks in advance.
    Regards,
    M.D.Sahu

  • Error while creating absence record in PA30 using 2001 infotype

    Hi all,
    iam getting an error while creating absence record for infotype 2001for LOP(unpaid)
    error : No quota available for att./abs. 6000 for pers. no. 61000052 between 31.12.2009 and 31.12.2009
    i have did
    Create a absence type LOP
    Determine Entry Screens and Time Constraint Classes
    Define Counting Rules
    Assign Counting Rules to Absence Types
    Payroll: India>>Absences>Describe Absence Valuation Rules 01 Unpaid Leave
    Group Absences for Absence Valuation>>Absence valuation rule>>F4 country grouping 40>> assign 01Unpaid Leave
    please solve this

    Actually I don't know how your system is configured.
    However, the error you're receiving seems you have assigned the absence type to a quota type.
    Please go to your counting rule and check whether Deduction rule - absence quotas - within entitlement field is filled.
    If yes, get the deduction rule value and go to
    SPRO Time man- Time data rec - Absences - Absence Cat - Abs counting - rules for counting (new) - deduction rules for abs quotas and check the quota type in here.
    If there is a quota assignment in place, before creating an IT2001 you need to create a IT2006 for that specific time period.
    Or, you need to delete the quota assignment via two config steps mentioned above.
    Regards,
    Dilek

  • Getting "java.lang.NullPointerException" error message when trying to run an OATS OpenScript file from Eclipse to Create a record in Oracle EBS

    Hello,
    I'm trying to run a simple OpenScript script in Eclipse that creates a record (a Supplier in this case) in Oracle E-Business Suite. So I copied the the script file from OpenScript and created it as a Class in Eclipse.  Then I created a main class to call the methods within the script class but no matter what method I call (initialize, run or finalize) I'm getting the java.lang.NullPointerException message. The error doesn't seem to be related with any specific line in the script but with the way that I'm calling it.
    Should I call the OpenScript class from my main class in a different way? (see my examples below)
    BTW, all external .jar files coming with OATS have been added to my project in Eclipse.
    1) Here's the main class I created to call the OpenScript method (Eclipse auto-corrected my main class adding a Try and Catch around the method call):
    public class Test {
        public static void main(String[] args) {
            nvscript nvs = new nvscript();
            try {
                nvs.initialize();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    2) Here's the script from OpenScript (the actual script has more steps but I'm just using the first one for a proof of concept):
    import oracle.oats.scripting.modules.basic.api.*;
    import oracle.oats.scripting.modules.browser.api.*;
    import oracle.oats.scripting.modules.functionalTest.api.*;
    import oracle.oats.scripting.modules.utilities.api.*;
    import oracle.oats.scripting.modules.utilities.api.sql.*;
    import oracle.oats.scripting.modules.utilities.api.xml.*;
    import oracle.oats.scripting.modules.utilities.api.file.*;
    import oracle.oats.scripting.modules.webdom.api.*;
    import oracle.oats.scripting.modules.formsFT.api.*;
    import oracle.oats.scripting.modules.applet.api.*;
    public class nvscript extends IteratingVUserScript {
        @ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities;
        @ScriptService oracle.oats.scripting.modules.browser.api.BrowserService browser;
        @ScriptService oracle.oats.scripting.modules.functionalTest.api.FunctionalTestService ft;
        @ScriptService oracle.oats.scripting.modules.webdom.api.WebDomService web;
        @ScriptService oracle.oats.scripting.modules.applet.api.AppletService applet;
        @ScriptService oracle.oats.scripting.modules.formsFT.api.FormsService forms;
        public void initialize() throws Exception {
            this.getSettings().set("formsft.useformsonly",true);
            browser.launch();
        public void run() throws Exception {
            beginStep(
                    "[1] E-Business Suite Home Page Redirect (/ebs12cloud.winshuttle.com:8000/)",
                    0);
                web.window(2, "/web:window[@index='0' or @title='about:blank']")
                        .navigate("http://ebs12.xxxxxxx.com:8000/");
                web.window(4, "/web:window[@index='0' or @title='Login']")
                        .waitForPage(null);
                    think(4.969);
                web.textBox(
                        7,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_text[@id='usernameField' or @name='usernameField' or @index='0']")
                        .setText("winshuttle_user");
                    think(2.0);
                web.textBox(
                        8,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .click();
                    think(1.109);
                web.textBox(
                        9,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .setPassword(deobfuscate("kjhkjhkj=="));
                    think(1.516);
                web.button(
                        10,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:button[@id='SubmitButton' or @value='Login' or @index='0']")
                        .click();
            endStep();
        public void finish() throws Exception {       
    3) Here's the error messages I'm getting based on the method I call from my main class:
    3.a) when calling Initialize():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.getSettings(IteratingVUserScript.java:723)
        at nvscript.initialize(nvscript.java:22)
        at Test.main(Test.java:9)
    3 b) when calling Run():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.beginStep(IteratingVUserScript.java:260)
        at nvscript.run(nvscript.java:30)
        at Test.main(Test.java:9)
    Any help and/or constructive comment will be appreciated it.
    Thanks.
    Federico.

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • 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 Child record at the time of master record creation.

    Hi,
    I have MasterVO and ChildVO. And association between both are 1 to *. I have a requirement like, I need to create row in ChildVO at the time of MasterVO row creation.
    I have used entity based association to create view link. This view link created ChildVO accessor in MasterRowImpl as type RowIterator.
    Actually my idea is to override create method in MasterVORowImpl and call ChildVO ViewObject and call .createRow() method on it. But I don't have access to ViewObject, instead it gave access to RowIterator.
    Could you please provide any pointer to achieve above functionality?
    Many thanks in advance.
    Jdev version - 11.1.1.7.0
    Regards,
    Dileep.

    Hi Tim,
    Now it is creating child record at the time of master row creation. But it is working only through BC tester. But when I drag the child VO instance in the jsff page, only master is get created as editable only, child is displayed as read only without populating any default values like child VO surrogate key and other default attributes. But through BC tester it is working fine.
    Am I missing anything here while implementing in UI?
    Thanks,
    Dileep.

Maybe you are looking for

  • Reader X Search doesn't differentiate cached search paths for reselection

    I use the Search quite a bit (or did). Specifically the "All PDF Documents in" option, where  the paths of locations that have previously been browsed to are presented for  reuse. Previous Reader versions shortened long paths so as  to display the la

  • IMac CRT making POP sounds

    my bondi blue iMac is making loud popping sounds, and the screen is flickering.. it is completely random, even though i am expecting it to do it, it always scares me everytime it does it... is this thing going to explode, catch fire? it has never bee

  • Unable to connect to CMS :6400

    Hi Everyone, I just finished installing CR Server 2008.  I've been looking though posts and user guides and can't seem to find an explanation of what I am missing.  I have everything installed.  I had it create a new SQL database with a user name and

  • Modification of the ship to address in the sales order at item level

    SAP ECC6 Sales order. Transaction code VA01/VA02 Creation/modification of the ship to address at item level/Allowed by SAP when sold to ≠ ship to/Impossible when sold to = ship to Hello All, I would like to set up an enhancement on the sales order. >

  • Video software

    hi i just got my ibook clamshell and i want to edit movies because i got a mac just for videos but without spending $1099 on a macbook so i got a refurbished ibook g3 clamshell but the bad thing is that i don't have any movie editing programs on it.