How to Design a Page for Both Insertion and Updation

Hi,
I have Page where I need to populate a table from Standard PO/AP table and once the save is clicked on the table,
the data shoudl be inserted in custoim table.
Ex: Ui table wil have 3 columns and say 5 rows
- PO#
- Line#
- Amount for 'X' purpose
where PO# and Invoice# is populated and Amount is empty
User will enter value in Amount column in all 5 rows and click on Save button.
Now these 5 rows with 3 columns should be inserted into the custom table (PO#, Line# and Amount)
How Can I design Model Objects for such a requirement?
Thanks,
Kamath

You should create an EO on your custom table and a VO on your EO. As you insert records in the VO, corresponding rows are created as EO rows and when you commit (getOADBTransaction().commit()) in the AM everything would get committed to the DB.
As far as subject goes of having a common page, everytime you can execute the VO with the bind parameters and check whether a row exists. If it does exist then update the VO Row (I expect the master record to be unique row). Otherwise create a new Row for the master and then correspondingly for the details row.
Do let me know in case you need additional information.
Regards
Sumit

Similar Messages

  • Can we use both INSERT and UPDATE at the same time in JDBC Receiver

    Hi All,
    I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
    user send the file which contains both new and old record and I need to save those in MS SQL database.
    If the record exist then use UPDATE otherwise use INSERT.
    I looked on sdn but didn't find any blog which perform both the things at the same time.
    Interface Requirement
    FILE -
    > PI -
    > JDBC(INSERT & UPDATE)
    I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
    Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
    Thanks,

    Hi ,
              If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
    "If the record exist then use UPDATE otherwise use INSERT."
    Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ...  where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows  you proceed with "insert into tablename....." since there are no old records present in database.
      Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database.  A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server.   If you need further help on how to write and call stored procedure in MS SQL you can look into these links
    http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
    http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
    [ This part you can ignore, Since its not sure that you will face this situation
        Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
    http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
    http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
    http://www.faqs.org/docs/ppbook/r27479.htm
    http://msdn.microsoft.com/en-US/library/ms187373.aspx
    http://msdn.microsoft.com/en-US/library/ms173763.aspx
    http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
    http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
    http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
        There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
    regards
    Anupam

  • How to install Laserjet M1217 for both wireless and network

    How to install an HP Laserjet Pro M1217nfw MFP on an XP system for both network and wireless capabilities?

    Hi,
    Are you talking about a mixture of wired and wireless ? If yes, please check your existing hardware and use the following manual to select one connection type then post back if having any porblem during the setup:
       http://h10032.www1.hp.com/ctg/Manual/c00389927.pdf
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Methodaology to use a commom JSF/JSP page for both PDA and PC Browser

    hello,
    I am planing to write an application that should work on both PDA(Windows CE 4.2 Client) and PC(Desktop).I choosed JSF as it supports Rendering.Is there any methodology so that i can use a common JSF/JSP for both the client.
    As the PDA browser space constrint i can not use the same page for both.
    One way as i know is Conditional Component display whre there are ceparate components for PDA & PC ..But i need a methadology where in i can use same component for both PDA & PC .
    I came to know about the XML rendering capability of JSF can this be used?..
    can anybody please hep me in this regard.
    thanks & regards
    ullas kumar

    Firefox Mobile sends "Android" in its browser identification. If the site is checking for that, then you should get a mobile page. If the site requires more, e.g., Chrome, Webkit, or some other text, then that's a problem because Firefox doesn't use those terms. With server-based redirection, you cannot see what the site is checking for.
    For testing, or to work around sites not knowing about Firefox Mobile, you could try the Phony extension: https://addons.mozilla.org/en-us/mobile/addon/phony/

  • How to do IDOC debugging for both inbound and outbound

    Hi
    can somebody please help me on how to debug the idoc both inbound and outbound in SAP PI.
    Regards
    Blue

    Hi,
    Yes, i have checked but did not get any satisfactory answer.
    here is the solution:
    Inbound:
    We19, Give the idoc #,
    click on the inbound functional module and select the radio button in the fore ground
    check the check box call in debug mode, this will enter in the functional module debugging.
    Outbound:
    Check BD73, give the idoc # and execute
    or
    RSNASTED program and set the breakpoint there
    is this correct, i have not tested/ checked yet.
    Regards
    Blue

  • How to design interactive pdf. for multiple additions and saves???

    Using LiveCycle designer -  Can anyone clarify how we can let others make multiple additions and saves to an interactive pdf. I created in Live Cycle Designer 8.2.1...
    I have created an interactive pdf. with LiveCycle designer and sent to client.
    Is there any way I can give them ability to save the pdf. make  multiple additions and saves and send back when they have completed it?
    or even pull up the file make changes and resend at some point in the future without having to fill in all form field again?
    Thxz much,
    JR

    Sorry but this is the wrong forum (this is for the Collaboration Services). You may want to try the LiveCycle Designer forum:
    http://forums.adobe.com/community/livecycle/livecycle_es/livecycle_designer_es

  • How to design block diagram for axi tpg and axi vdma on zedboard using vivado 2014.4 and sdk c application

    Hi,
    I am working in image processing project ,but currently i want to use tpg ip and vdma ip to write frame data in ddr3 on zedboard,please provide me vivado block design and sdk c application for that
     

    Please don't post the same thing multiple times. This one is fine:
    http://forums.xilinx.com/t5/New-Users-Forum/how-use-axi-tpg-and-axi-vdma/m-p/638588

  • Can we define users for both studio and integrator server

    Can someone please let me know how can we define users for both studio and integrator server so that the user can be used to view UI page but not modify it.I want to define user in studio which will access the Page but not modify it. And the user in integrator server should be able to view scheduled jobs.
    Thanks a lot.
    Regards,
    Amrit

    Amrit,
    Both Studio and Integrator Server support LDAP. See http://docs.oracle.com/cd/E35976_01/studio.240/eid_studio_users/toc.htm#Integrating%20with%20an%20LDAP%20System%20to%20Manage%20Users for details about implementing LDAP in Studio. For Integrator Server, see "LDAP Authentication", p. 38 (document pagination; p. 44 pdf file pagination) in the Integrator Server Guide (http://docs.oracle.com/cd/E35976_01/integrator.240/DataIntegratorServer.pdf).
    RLJII

  • HT5843 I have OS X on both my iPad and my new iMac. I purchased Pages for my iPad and my husband's iPad at least a year ago. All of my stuff on the iPad is stored in the Cloud. Do I have to purchase it again on the iMac?  How do I get it to run on the iMa

    I have OS X on both my iPad and my new iMac. I purchased Pages for my iPad and my husband's iPad at least a year ago. All of my stuff on the iPad is stored in the Cloud. Do I have to purchase it again on the iMac?  How do I get it to run on the iMac?

    attymot wrote:
    Do I have to purchase it again on the iMac?  How do I get it to run on the iMac?
    You should also be able to access your docs (even without the Pages app on your iMac) by logging into iCloud.com and using the Pages for iCloud beta app via your browser.
    (By the way your iPad uses iOS and not OS X)

  • How can I sync my photo contents in iPhoto on my iMac to my new iPAD's iPhoto?  I follwed all the instructions on manuals for both iPAD and iTunes re syncing, but I cannot find "phone button" under Device name on iTunes page. Please help!  Thanks!

    I follwed all the instructions on manuals for both iPAD and iTunes re syncing, but after physically connecting iPAD with iMac with USB or via WiFi I still cannot find "phone button" under Device name on iTunes page. Please help!  Thanks!
    I have been creating a photo book using a lots of photographs on iPhoto, and then I took another photos by using new iPAD which I want to integrate with the original album/book on iMac. I was able to import them from iPAD's iPhoto to iMac's iPhoto.  However I cannot import or transfer or sync anything from iMac's iPhoto to that of my iPAD. 
    So my iPhoto page on iPAD contains only 3 or 4 newly created albums, and no other info.  That means no syncing....
    I am supposed to be able to work on this project on either of these iPAD and iMac, correct?
    I am puzzled.  I appreciate for your advice and help.
    Thank you!

    It doesn't appear under the iPad device on the left-hand sidebar of iTunes, you need to select the iPad device on the sidebar and then select the Photos tab on the right-hand side of iTunes e.g.
    And then on the right-hand side :

  • I transferred a pages file from ipad to mac (also pages) via email for editing. However received message that cannot save edited document to the mac because "trial period has expired for iwork"! I have purchased pages for both machines separately. Ideas?

    I transferred a pages file from ipad to mac (also pages) via email for editing. It opened normally. However, after editing, received message that cannot save edited document to the mac because "trial period has expired for iwork"! I have purchased pages for both machines separately and presumed they would work without a hitch. Am I missing something?

    It used to be that to update the trial to the licensed version with the box, you just inserted the DVD & ran the installer to convert the trial to licensed. This changed with Snow Leopard. You now need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user.
    Yvan Koenig has written an AppleScript that removes the files. You can find it on his iDisk in For_iWork > iWork '09 > uninstall iWork '09.zip.

  • HT4314 I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    Hi Jamesdwills,
    Welcome to the Support Communities!
    If you are using the same Apple ID on both devices, the Game Center profile should be the same.
    Check out this information from the iPad User Guide.  Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
    Using Game Center
    http://support.apple.com/kb/ht4314
    Game Center settings - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad9a13d039
    Game Center settings
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    Allow invites
    Let nearby players find you
    Edit your Game Center profile (tap your nickname)
    Get friend recommendations from Contacts or Facebook
    Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
    Change restrictions for Game Center. Go to Settings > General > Restrictions.
    Cheers,
    - Judy

  • I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.

    I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.  I want to be able to face time also using my ipad2 to my laptop especially if one of the members of the family is traveling.  Thanks.

    thanks.  your answer was correct, clearer.  I have another question, maybe you can answer.  I just purchase my ipad2 2 days ago.  yesterday, there was a sound.  today there is no sound.  there is a sound only in movies and you tube and music.  but no sound on all apps and keyboards.  I look it up and seems like ther are few that have this problem.  I called walmart coz I bought it there and they told me that they have not heard that before but if I can't fix it, just return it and exchange it with anew one since I have 14 days to do that.  I tried rebooting it and still won't work.  Should I just restore it?

  • How do I set up a POP account that links to my business email account for both receiving and sending

    How do I set up a POP account that links my icloud email to my business email account for both receiving and sending?

    Can you post your Troubleshooting Information?
    Help (Alt-H) - Troubleshooting Information

  • My 24"iMac won't upgrade past 10.7.5. How can I find PAGES for me?

    I just need Word Processing for this desktop gem/antique.
    I have Pages for both my iPads (iOS7 and 8.1) but cannot upgrade my iMac past OSX10.7.5.
    Pages would be fine if I can find Vers.3 or 4 (I think).
    Is there something easier, as good, and available?
    Don't tell me it's PageMaker haha...

    If you log onto the app store it should give you the option to download the version compatible with that device.
    Have done this a few time with iOS on older phones but never with OS X.
    Here is the support page for what you are after.
    Install the latest compatible version of an app on an earlier version of iOS or OS X
    Hope this helps.
    PJRS

Maybe you are looking for