Crud cycle

All the sample applications are grid applications. Present a set of all records with an option to create a new one. No option to update one because update is depend on selecting one of the records.
But we have a need for single record crud. Thus I am having trouble finding an example. I would like to use one form for display, insert, and update.
Our method: first field is the primary key (and not a generated key, a real meaningful primarykey). Upon entering the key, it can be determined if the key exists in the table. (thus need a submit right?) if it does exist, it's then slated for display/update. If it isn't this must be an insert
opportunity. So my question is, can the generated automatic row fetch and automatic row processing be adjusted to accommodate this or
is this always roll your own? I ask because I have been trying to tweak it and not getting anywhere but then I don't understand apex either. It would be really help me if anyone else who tried this could weigh in. The apex processing seems to assume that if there's a key there's an update
and if there is no key it's an insert. Which is not true the way we do things. There always is a key. That's where the problem comes but is there
a way to adjust the apex logic or should I just give up on it?
Here is an example of a non-grid form being created
http://st-curriculum.oracle.com/demos/db/apex/r40/les07_fmontbl/les07_fmontbl_viewlet_swf.html
but it has the problem that it only has an option for insert and no option for update. If it also had an option for update it would be useful
for what I am trying to do.
Edited by: lake on Oct 14, 2010 10:21 AM

Use the wizard to create a form, but don't do tabular form; do one of the other forms. That should get you a single-row form with all the built-ins that you need for processing.
Tabular forms (the grid style) use MRU and MRD (multi-row-update and multi-row-delete) generated processes.
Single-row insert/update/delete forms will instead generate an "automated row fetch" when the page loads and a "process row of xxxxx" process to do the DML.
Unfortunately though, Apex's general model of interacting with the database is that the PK of a table is either 1 or 2 columns (limited to no more than 2) and the values are generated by a function or trigger or sequence (basically, anything out of the user's control). It likes to not let the user enter this. How I design the database tables for this is to make a PK that is a numeric record ID populated by a sequence via a before-insert trigger. I then define the "business" PK as just a unique index on the table. So the underlying PK is just a number with a value that is meaningless for the business use.
Another thought occurred to me just now as I was typiing this. This would be a little ugly for a tabular form (and not entirely sure it's possible on a tabular form) but for a single-record form this might work.
Go through the wizard and built a single-record form on a table. Your PK field will be hidden (OK). Then, add a new field to the form (something like "P1_DISPLAY_PK_VALUE" and make it visible only when the field containing the real PK is null (so user is entering a new record). Let the user define the PK in this P1_DISPLAY_PK_VALUE" field. Then, define a computation that fires when the user is submitting an insert. Set your hidden PK field value to this displayed PK value. In my head, it seems like this would work...maybe give it a try?

Similar Messages

  • ADF BC: integrating REST API

    Using JDev 11g PS4
    The model of my application has a mix of different sources. Some entities are stored in my database.
    Other entities are coming from a call to an external REST API.
    I am wondering what the best solution is to integrate those REST API objects into my model project because I don't want to expose them as rest api to my view. In my view project, I want to hide the complexity of those API's by exposing data controls.
    Now, what is the best way?
    1) Creating POJO's and creating data controls out of them. These pojo's will have a signature like this:
    public class Foo {
       public List<FooObject> getFoos();
       public void addFoo(FooObject foo);
       public void removeFoo(FooObject foo);
    }This will be exposed to my view so I can easily use it in my view project.
    2) Create view objects to map the entities from my rest API and implement the REST API calls in the custom implementation of the view objects.
    3) ...
    Any other suggestion is more then welcom.

    Hi,
    if the rest of your model is ADF BC then it would feel natural to use prgrammatic view objects to access the REST service. However, if the data is unrelated then using a a POJO DC also appears to be a solution. For simple REST requests that return XML formatted data, you could use the URL Data Control which in 11g R1 allows for read access and in 11.1.2 the full REST CRUD cycle
    Frank

  • Cycle a precomp?

    Hi everyone
    This has been bugging me for days... I cannot understand how to make a very simple animation cycle.
    Here is my process so far...
    I have a cartoon character that I drew on paper and scanned and then modified in photoshop. It is a simple 3 drawing cycle. She is comprised of one drawing with her right foot forward, one with both feet side by each, and one with the left foot forward. In other words, it is a very crude walk cycle. I simply want to created a composition of her 3 drawing walk cycle and be able to loop that for an undisclosed amount fo times, so that I can re-use her walking in several little scenes.
    In FLASH i simply take the three drawings i would have made as vector are and turn them into a symbol that loops. Very straight forward and easy.
    After hours and hours of lookin at all these types of looping tutorials I can't get my head around the expressions.
    IInterpreting footage doesn't work for everal reasons. A I want to be able to change the drawings or update them if/when i update the original psds.
    I also do NOT want each drawing to merely represent ONE frame of animation. I want each drawing to appear for 3 frames, thus making a 3 Drawing cycle last 9 frames. Other wise the animation looks like it's been on fast forward.
    My question is, how can i turn my precomp into a realy cycle.
    Any helo is greatly appreciated... I only wish I knew of a way to help anyone else on this forum...
    cheers
    -J

    You can work around the expression solution but it requires more work.
    Place your walk cycle into its own composition with matching duration and size.  Render it out as a lossless Quicktime file, with alpha channel if necessary.
    Re-import the rendered file, and in Interpret Footage set the number of loops required.
    Learning the expression method will be more beneficial in the long run, but the solution above may be handy if you need a quick fix.

  • Issue in creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshots.
    Any pointers will be highly appreciated.
    This thread is further to the threads in Production Planning and LE/WM Forum. I could not resolve the issue with the threads.
    Hope that I will get any pointer in EWM forum.
    http://scn.sap.com/thread/3609441
    http://scn.sap.com/thread/3610822
    With Regards,
    Malay

    Hello Malay,
    Can first contact your ABAPer and ensure the bottom screen is not an Screen Enhancement?
    If it is a some custom development, your ABAPer can help you on the logic behind it.
    Else, Let us know.
    Regards,
    Sathish

  • Purchase order to payment cycle report

    Dear Sir/Madam
    We want to have a report on the purchase order to payment cycle.
    this includes the following points:
    1. Purchase Requisition is raised in the system
    2. PO is raised with various line items
    3. Advance payment is done against the PO
    4. GRN is made for goods delivered
    5. Invoice is processed against each GRN
    6. Retention is deducted to be paid in future
    7. Liquidated damages (LD) is deducted which is treated as miscellaneous income in companys books
    8. Payment is made to the vendor
    We require the report in such a way which will give the details of each payment against each GRN line item. tracking of the same should be possible.
    Do we have any standard report which will help in identifying the purchase order to payment cycle.
    Thanks and Regards
    Prashant P. Zinge

    Hi,
    It is always a requiremnet to have a report from PO, GR, IV to payment.
    But unfortunately, SAP do not have such a report, we develop one locally, the difficult is at payment side.
    Several invoices for one vendor has only one payment doc, how to display it need to discuss with end user.

  • Duplicate records for Sale Order Cycle Report(excluding item level detail)

    I have posted this issue in number of forums but till today no one is able to answer it correctly.Here it is:
    I need to create a report which I think most of the sd consultants have also done it.It basically covers sales order cycle without item lvel detail such as:
    Sale Order No -- Sales Order Date-- Delivery No-- Delivery Date
    Now as we all know ,sales orders and deliveries are connected through item table which means in the output I will get duplicate rows for the report above.For Example, if a sales order share 3 items with the delivery then we will get 3 exact duplicate rows in the report.
    What can be the best solution?connecting through VBFA has alos same result as it also has item level details.
    I need a good solution.This a common report and there must be some solution

    Hiiii,
    It is standard SAP rule that system will catch the document flow (document link history) at item level.
    Now your problem that you dont want to show the line item based report because of duplicacy.
    Try this.
    Brows table VBFA -
    In screen selection select the following......
    1. Subsiquent document category
    2. Preceding item
    select "J" in Subsiquent document category
    and "000010" in Preceding item  then execute the table.
    Now system will not show multple line item based delivery report. so No duplicacy will be there
    Regards
    Shambhu Sarkar

  • Ipod touch not recognized by Windows 7. screen cycles constantly

    I think this is different than the other posts. When i connect my ipod touch to my Win7 PC it 'cycles'. It displays the charging screen for about 0.5 seconds, then displays the 'start' screen for about 0.5 seconds. It then cycles between the 2 screens every 0.5 second or so until I unplug it. Anyone have a fix for this?
    John

    The symptoms are a bit different, but since you've got an nVidia chipset and (presumably) at least 4 GB of RAM, I think the first thing to do is make sure you've applied the *Microsoft Host Controller Driver Update* available for you at your drivers and downloads page at HP:
    [HP Pavilion Elite e9120f Desktop PC > Microsoft Windows 7 (64-bit) > Software & Driver Downloads: Microsoft Host Controller Driver Update|http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=pv -78469-1&lc=en&dlc=en&cc=us&lang=en&os=4063&product=3970019]
    With that update in place, does the Touch behave a bit better when you plug her into the PC?

  • My iphone keeps cycling apple logo, it won't power up when connected to a computer. I can power it up with just a power source, but the it comes up to a generic iphone "no service" screen

    This phone worked great for 2 years until I inherited it from my partner.  Since we changed the phone over to me, it has done this 4 times. The last 3 times it somehow magically came back after taking the Sim card out and putting it back in. I even went and got another new Sim card, in case that was the problem. Apparently it is not, because now I cannot get it to come back at all. I get either the generic gray "no service" screen, or it just cycles the apple logo. I've tried holding the buttons down together, separately, everything. Nothing seems to work. Since the phone is no longer under warranty, am i basically screwed?

    Could you specify the model of MacBook and the OS X it's running, please? Some of the advice or references vary along with the system, so this could be helpful to formulate a reply. I've never used a Guest User selection, but do have more than one User.
    If the computer does not have an optical drive, you may be able to boot it into a recovery disk mode or something; in an attempt to see what is wrong and maybe fix it.
    Good luck & happy computing!

  • Issue during creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshot.
    Any pointers will be highly appreciated.
    This thread is further to the thread in Production Planning Forum
    http://scn.sap.com/thread/3609441
    With Regards,
    Malay

    Manish,
    I do not understand how this going to solve the issue because why we need both KANBAN and WM control cycles for one material withdrawal for production?
    Br
    KK

  • HT1212 I am unable to get our of a continuous cycle when trying to update or restore my iPad 2. Plug in to iTunes 12.0.1 (latest version). Click update, told can't update, have to restore. Restore fails with error 9. Any help appreciated.

    When I tried to update my iPad I got an error 9. Now, I am unable to access my iPad. It is in a continuous cycle when I try to update or restore the iPad 2. Plug in to iTunes 12.0.1 (latest version). Click update, told can't update, have to restore. Restore fails with error 9. Any help appreciated.
    Here's the cycle:
    I plug in my iPad when “cable to iTunes shows on iPad screen. It says "Your iPad can't be updated, you must restore it to factory settings." That bad enough news, but it gets worse.
    Click Restore
    Extracting software…
    Preparing iPad for restore
    Waiting for iPad…
    Verifying iPad restore with Apple…
    (empty bar under the Apple logo…does not show any activity)
    “The iPad “iPad” could not be restored. An unknown error occurred (9).”
    Notes: I just upgraded to OS X Yosemite 10.10.1 on my iMac (27-inch, Mid 2011) in the last week. It’s the first time I’m tried to backup/update my iPad since the iMac update.
    I swapped out the USB cable to a new cable and get the same results.
    I also unplugged all other USB devices from the iMac and security on my iPad and still get the same results.
    I find it strange that it shows no Serial number for my my iPad 2 when plugged in. It shows “Serial Number: n/a on the screen when it displays: “iPad Recovery Mode To update your iPad without erasing its contents, click Update. To restore your iPad to its factory settings, click Restore iPad.
    I prefer to update my iPad, but it displays “Your iPad can’t be updated, you must restore it to factory settings. If you previously backed up the iPad, click Restore Backup after the restore process completes.”
    It’s a continuous loop. I get the display on my iPad to plug in the iPad to iTunes, plug it in which ends after going through the above procedure saying an error occurred (9).
    So now I cannot use my iPad. When I turn it on I get the display showing me to plug it into iTunes with the cable. Since this is the only option I have I plug it in and the loop begins.
    Any advice would be appreciated.
    Thanks!

    Hello jaybearden,
    Thanks for the question. After reviewing your post, it sounds like you are not able to restore the iOS device since you get an error 9. I would recommend that you read this article, it may be able to help the issue.
    Resolve iOS update and restore errors - Apple Support
    Check your security software
    Related errors: 2, 4, 6, 9, 1000, 1611, 9006. Sometimes security software can prevent your device from communicating with either the Apple update server or with your device.
    Check your security software and settings to make sure that they aren't preventing a connection to the Apple servers.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • I'm in cycle mode, and 'merge' is clicked in preferences. However, when I record, my previous track data keeps getting overwritten. Does anyone know what I'm doing wrong. Interestingly, I can still see the data in the region.

    I'm in cycle mode, and 'merge' is clicked in preferences. However, when I record, my previous track data keeps getting overwritten. Does anyone know what I'm doing wrong. Interestingly, I can still see the data in the region.

    jamestait wrote:
    when I record, my previous track data keeps getting overwritten.
    since you didn't specify, are you recording in a single take?
    http://www.bulletsandbones.com/GB/GBFAQ.html#multipassrecording
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Not Able to view layuot in SFP despite Adobe Life Cycle Designer on system

    Hi Friends ,
        I have installed Adobe Life Cycle Designer 8.0 on my system and I am running SAP version 7.10 with patch level 8.Is there any other setting to be done because I am still getting same error when I try to view layout in SFP .
    Please help me on this .
    Thanks
    Sahil

    Hi,
    Please check whether ALD is propeerly installed, go to c:/ program file/ Adobe, 2 files should be present Designer and Reader.
    Regards,
    Kimaya

  • Add Header and Footer in Live Cycle ES2

    Hi,
    We are quite new to the use of live cycle pdf generation. Can anyone help us with information as to how we can add header and footers to our pdf files using livecycle ES2.
    And further, we would like to know whether header and footer adding is available in the trial version of Livecycle ES2?

    Hi,
    Thanks for the reply.
    We have another newly raised problem in the header and footer adding from Livecycle ES2. According to the PDF that you referred in the previous reply, we can add graphics to the PDF header, but we are unable to find a DDX tag that would enable us to add a image URL.
    Can you please help us again on the above?
    Purnima

  • Off cycle payment is not getting updated in RT

    Hi Folks,
    we have an issue with off cycle payment, when we run LTA Payment to the employee, we are creating LTA wage type and amount in IT0267. As we run off cycle payroll, off cycle payrol is run with out the amount. It is not picking the amount and not showing the amount in  the RT. Moreover when create LTA in IT0267 it is showing "I" IN DIRECT VALUATION. amount is not at all getting picked in RT. Please share ur inputs on this. It is happening for few empployees under one payroll area.
    Thanks and regards,
    Samba.

    Hi All,
    Problem has been resolved, it seems, P0267 does not read if an amount is being populated through Indirect valuation. For LTA there was indirect valuation, in table t539j. Now when we go to IT0267 to create LTA the amount is being populated automatically.
    Now to rectify the issue, we have entered the same amount manually in the IT0267and saved the record. then LTA is not getting saved with Indirect valuation symbol. that is how the issue has been resolved. Now the RT is reading the amount.
    Thanks and regards,
    Samba.

  • No sound after recording MIDI using cycle mode take folder

    I'm going through the Apple Certified training book "Logic Pro 9 and Logic Express 9". My project and global settings are pretty close to what comes with Logic when you install them. I.e. I haven't been messing with any settings not explicitly described in the book.
    I'm at the chapter on MIDI recording, and am learning about MIDI cycle recording to a take folder. (I've already done this successfully for audio.) But, Logic does not seem to be behaving the way the book describes. I have recorded 3 takes. I see a MIDI take folder region after I've recorded, and I can double-click or click the arrow on the top left to reveal the 3 takes. All 3 take regions are white - as though none are selected. The region in the actual track (the take folder) above all three takes is green. When I try to play, in any combination (ie, Soloed, not soloed, other tracks all muted, no tracks muted) I cannot hear the MIDI take. I tried selecting the three different takes, both by clicking on them, and choosing from the drop down menu on the top-right of the take folder. I see the notes in the take folder display (the one that is green) changing when I select a different take, but the takes themselves always stay white. Although, the region header for the take becomes darker, as though the region is being selected, but the region is not green.
    Is there something I'm missing here? Why can't I hear anything from these takes? I can open up each take in the Piano Roll editor, and click on the keyboard keys to hear notes, as well as clicking on the notes themselves and hear those. But when playing, I get no sound.
    I tried "flattening" this take folder. It creates 3 new tracks below the current track. All regions are again white, and clicking on them does not make them turn green. I can play, and I hear all three takes playing at the same time. If I try to mute one of the tracks, ALL three tracks become muted, as though the mute button has been grouped to all these tracks. But I looked at the mixer and do not see any other channels have been created, not even for these new tracks. And they have not been assigned to a group either.
    I'm not sure if I'm doing something wrong, or if this is a known bug?
    Rob

    Rob Ross wrote:
    I tried this again on the same track, a few bars away. It worked this time. I've tried it 3 times now, and each time worked as expected. So I'm thinking this is a bug in Logic that caused the problems the first time?
    The "white" takes are muted >>regions<<, not tracks.
    You should be able to unmute (demute?) then using the "mute" tool.
    And... I believe you are correct, this is a bug in Logic that's been around for a while.
    pancenter-

Maybe you are looking for