Open AR transaction and Receipts

Can you let me know the standard concurrent programs which list all the Receivables Open AR Transaction and Open AR Receipts

The table ar_payment_Schedules_all gives you the outstanding information as on date. For eg. if the system date is 13th April and if you query the ar_payment_schedules_all table, the amount_due_remaining column will give you the open amount as on that date.
However if you want the oustanding as on some previous date, lets say as on 31st March, in that case you have to rollback all the applications that would have occured from 1st april to 13th april.
Find below the script that I used to get the oustanding as on any previous date. Pls. note that I am using a temp table here to populate the details.
declare
v_cash_receipt NUMBER;
v_adjustment NUMBER;
v_credit_memo NUMBER;
v_as_of_outstanding NUMBER;
v_cash_receipt_acctd NUMBER;
v_adjustment_acctd NUMBER;
v_credit_memo_acctd NUMBER;
v_credit_memo_acctd_1               NUMBER;
v_as_of_outstanding_acctd NUMBER;
p_as_of_date                          DATE;
cursor cs_get_trx (p_as_of_date1 IN Date) is
SELECT ps.customer_id CUST_ACCOUNT_ID
, trx.creation_date INV_CREATION_DATE
, ps.trx_number INVOICE_NUMBER
, trx.trx_date                              INVOICE_DATE
, ps.gl_date GL_DATE
, NVL(ps.amount_due_original,0) INVOICE_AMOUNT
, NVL(ps.tax_original,0) TAX_AMOUNT
, NVL(ps.acctd_amount_due_remaining,0) ACCTD_OUTSTANDING_AMOUNT
, ps.due_date
, CEIL(sysdate - ps.due_date) DAYS_OUTSTANDING
, ps.payment_schedule_id
, ps.number_of_due_dates INSTALLMENT_NUMBER
, trx.customer_trx_id
, CEIL(p_as_of_date1 - ps.due_date) DAYS_LATE_AS_OF
FROM ra_customer_trx TRX
, ar_payment_schedules PS
WHERE
trx.customer_trx_id = ps.customer_trx_id
AND ps.gl_date <= p_as_of_date1
AND ps.gl_date_closed > p_as_of_date1 ;
CURSOR cs_get_receipt(p_as_of_date2 IN DATE ) IS
SELECT ps.customer_id CUST_ACCOUNT_ID
, ps.payment_schedule_id
, CEIL(p_as_of_date - ps.GL_DATE) days_late_as_of_r
, ps.gl_date
, cr.receipt_number
, app.cash_receipt_id
, sum(app.acctd_amount_applied_from) ACCTD_AMOUNT_APPLIED
FROM ar_receivable_applications app
, ar_cash_receipts cr
, ar_payment_schedules ps
WHERE app.cash_receipt_id = cr.cash_receipt_id
AND app.payment_schedule_id = ps.payment_schedule_id
AND app.status in ('ACC', 'UNAPP', 'UNID', 'OTHER ACC' )
AND NVL(app.confirmed_flag,'Y') = 'Y'
AND app.gl_date <= p_as_of_date2
AND ps.gl_date <= p_as_of_date2
AND ps.gl_date_closed > p_as_of_date2
AND ( ( app.reversal_gl_date IS NOT NULL AND ps.gl_date <= p_as_of_date2 )
OR app.reversal_gl_date IS NULL
GROUP BY ps.customer_id
, cr.receipt_number
, app.cash_receipt_id
, ps.payment_schedule_id
, ps.gl_date
HAVING
sum(app.acctd_amount_applied_from) <> 0 ;
Begin
delete zxc_aging_cust1 ;
p_as_of_date := to_date('&Enter_as_of_date','DD-MON-RRRR') ;
     For invoice in cs_get_trx(p_as_of_date)
     LOOP
/* cash applied after p_as_of_date */
SELECT NVL(SUM(NVL(acctd_amount_applied_to, 0.0) +
NVL(acctd_earned_discount_taken,0.0) +
NVL(acctd_unearned_discount_taken,0.0)),0.0)
INTO v_cash_receipt_acctd
FROM ar_receivable_applications
WHERE TRUNC(gl_date) > p_as_of_date
AND status||'' = 'APP'
AND NVL(confirmed_flag,'Y') = 'Y'
AND applied_payment_schedule_id = invoice.payment_schedule_id
AND application_type LIKE 'CASH%';
/* adjustments applied after p_as_of_date */
SELECT NVL(SUM(ar_adjustments.acctd_amount), 0.0)
INTO v_adjustment_acctd
FROM ar_adjustments
WHERE TRUNC(gl_date) > p_as_of_date
AND status = 'A'
AND payment_schedule_id = invoice.payment_schedule_id;
/* invoice credited after p_as_of_date */
SELECT nvl(sum(nvl(acctd_amount_applied_to, 0.0)), 0.0)
INTO v_credit_memo_acctd
FROM ar_receivable_applications
WHERE applied_payment_schedule_id = invoice.payment_schedule_id
AND nvl(confirmed_flag,'Y') = 'Y'
AND status||'' = 'APP'
AND TRUNC(gl_date) > p_as_of_date
AND application_type LIKE 'CM%';
/*added new by anil patil 7/7/7 */
/* credit memo applied after p_as_of_date */
SELECT nvl(sum(nvl(acctd_amount_applied_to, 0.0)), 0.0)
INTO v_credit_memo_acctd_1
FROM ar_receivable_applications
WHERE payment_schedule_id = invoice.payment_schedule_id
AND nvl(confirmed_flag,'Y') = 'Y'
AND status||'' = 'APP'
AND TRUNC(gl_date) > p_as_of_date
AND application_type LIKE 'CM%';
/* calculate actual outstanding amount */
v_as_of_outstanding_acctd := invoice.acctd_outstanding_amount + v_cash_receipt_acctd - v_adjustment_acctd +
                                        v_credit_memo_acctd - v_credit_memo_acctd_1 ;
insert into zxc_aging_cust1
( customer_id ,
invoice_number     ,
          invoice_date ,
          gl_date          ,
          invoice_amount ,
          tax_amount ,
          acctd_outstanding_amount ,
          due_date     ,
          days_outstanding ,
          installment_number ,
          days_late_as_of ,
          current_os_amt ,
          cash_receipt_amt ,
          adj_amt ,
          credit_memo_amt ,
          credit_memo_amt_1
values
          (invoice.cust_account_id ,
          invoice.invoice_number     ,
          invoice.invoice_date ,
          invoice.gl_date          ,
          invoice.invoice_amount ,
          invoice.tax_amount ,
          v_as_of_outstanding_acctd ,
          invoice.due_date     ,
          invoice.days_outstanding ,
          invoice.installment_number ,
          invoice.days_late_as_of ,
          invoice.acctd_outstanding_amount ,
          v_cash_receipt_acctd ,
          v_adjustment_acctd ,
          v_credit_memo_acctd ,
          v_credit_memo_acctd_1
     END LOOP ;
COMMIT;
FOR receipt in cs_get_receipt (p_as_of_date )
LOOP
     INSERT INTO zxc_aging_cust1( customer_id
, invoice_number
, trx_type
, acctd_outstanding_amount
, gl_date
     VALUES( receipt.cust_account_id
, receipt.receipt_number
, 'RECEIPT'
, -1 * receipt.acctd_amount_applied
, receipt.gl_date );
END LOOP;
COMMIT ;
END;
Hope this helps.
Thanks,
Anil

Similar Messages

  • Customize approval process on transaction and receipt in Oracle AR

    Dear all,
    Is there anyone ever customize an approval function on AR transaction and AR receipt process? Can you share how you can achieve the customization, esp on the receipt process?
    HY

    Hi,
    I feel there is one workaround for this issue, but evaluate this as per your requirement.
    Enable Journal approval for Receivables Journal Source and periodically post the Journal entries of Receivables to General Ledger.
    Ask the approver to approve the receipts in General Ledger. (Using drilldown functionality if required).
    If there is any mistake the approver can always ask for reversal of Original receipt and direct the user to enter new one.
    Only drawback is Sales Invoices should also be approved. These should be approved blindly.
    Regards,
    Sridhar

  • I Need To Delete All Transactions and Balances From all Modules

    I Need To delete All Transactions From All Financial Modules (AP,Ar,Gl,Cm and FA)
    payables ( Delete All Invoices and Payment that validated and create accounting )
    Receivables ( Delete All Transactions and Receipts that completed and create accounting )
    Assets ( Delete All Asset Depreciation Amount )
    General Ledger ( Delete All Journals That Posted In General Ledger )
    I Need To Make This To Delete Any transaction Or Balances And Uploading Anew Balances and Journals
    Can I Make This By Purge and How Can I Do it ? Or any another Way ?
    Thanks,
    Mohamed Gamal
    Edited by: Mohamed Gamal on Sep 5, 2011 2:27 PM
    Edited by: Mohamed Gamal on Sep 5, 2011 2:28 PM

    Hello Mohamed.
    Each Application User's Guide (for AP, AR, GL, CM and FA) has a section dedicated to Archive and Purge process.
    Depending on the quantity of records you need to process perhaps you should consider other options like creating new organization(s), books, etc. and create only the desired open items in there.
    Octavio

  • Transaction open in client and closed in server ?

    Hi,
    I am new to tuxedo, so please excuse me if my question is naïve.
    I am on a project to replace the /Q system (QSpace, TMQUEUE, TMQFROWARD) by a system with storage in a database.
    We are developping in C.
    I wanted to know, if with the tpsuspend and tpresume functions, it is possible to start a transaction in the client (that replace tmqforward), make a tpcall to a service, then a tpsuspend and that the service get the transaction with a tpresume and do the tpcommit (or rollback) itself at the end of the treatment ?
    So that the client dont have to be aware of the result of the transaction and can immediatly open another one.
    Your help would be useful
    thanks
    Yann Delanoe
    Sterci SA
    GENEVA

    Hi Yann,
    I'm curious as to why you want to replace the /Q subsystem with your own servers? Are there features missing in /Q that you need?
    Also Tuxedo uses checked transaction semantics. This means that transactions can't be commited by anyone other than the initiator, nor can transactions be committed while there are outstanding requests or replies. The client can suspend the current transaction and start another one if you need to have multiple transactions in process at the same time. This is often done in multi-threaded applications.
    Regards,
    Todd Little
    BEA Tuxedo Chief Architect

  • Report to see and send as e-mail of all open Complaints/transactions

    Hello Gurus,
    We need to view all the Open Service Transactions/Incidents (we have a Ztransaction type) for the past 3 months and send that output as an attachment to our Service Manager's e-mail address for him to action on.
    Is there a standard way of achieving this ?
    Please point me if there are any GUI transaction codes that i can schedule them as a background job specifying an e-mail address ?
    Thanks in advance,
    Regards,
    Gopi.

    Hi Gopi,
    There are no standard tools for your requirement. It is very specific requirement to your customer.
    However, there are a couple of tools which you can use to extract the data. The mailing part needs to be development in custom solution.
    My suggestion would be develop a report and use the tools to extract the data. Then schedule the job in the back ground. I also developed a similar kind of functionality in one of my earlier project.
    Let me know if you need any kind of technical inputs regarding the development.
    Hope this helps.
    Thanks,
    Samantak Chatterjee.

  • Open a transaction via url, passing a parameter/value and SEND THE OK CODE

    Hello Guys,
    I'm trying to open a transaction via a hyperlink (System Action). That works so far, but my problem is that there is no button on the dynpro which triggers the going on. I have to press ENTER or the green hook in the corner of the gui. The transaction I'm opening is IE02 with an equipmentno. The value is in the destination field and the only thing what has to happen know is to trigger the next step (namely opening the "change equipment" dialog). Is there a standard OK-Code for the ENTER-Key or green hook ?
    Greetings,
    Jochen

    hi...
    I can't find that parameter in my Visual Composer environment. I tried to put it in my calling URL but it didn't work either. My URL looks like this:
    '/irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=' & STORE@systemalias & '&TCode=ie02&GuiType=' & STORE@guitype & '&DynamicParameter=RM63E-EQUNR%3D' & @EQUIPMENT & '&PROCESS_FIRST_SCREEN%3D' & 'YES'
    Instead of the last parameter "PROCESS_FIRST_SCREEN" i could use a ok-code, but in transaction ie02 there is no ok-code to commit the screen, because there is no button...
    Any ideas?
    Greets,
    Jochen

  • Open item mgt and only balances in local currency

    Hi ,
    What is open item management and only banlances in local currency ?
    for which gl accounts v select open item management and only balances in local currency
    Pls explain urgent
    Regards
    umesh

    1. Only Balances in Local Currency:
    Indicates that balances are updated only in local currency when users post items to this account.
    Use: You would set this indicator for accounts in which you do not want the system to update transaction figures separately by currency.
    It is required to set theis indicator in:
    1.  cash discount clearing accounts
    2. GR/IR clearing accounts.
    It cannot be set in reconciliation accounts for customers or vendors. Setting it in all other instances is optional.
    Open item management:
    Determines that open items are managed for this account.
    Explanation: Items posted to accounts managed on an open item basis are marked as open or cleared. The balance of these accounts is always equal to the balance of the open items.
    Procedure: Set up accounts with open item management if offsetting entries are to be assigned to the postings made to these accounts. Postings to these accounts represent incomplete transactions.
    USE:
    A goods receipt/invoice receipt (GR/IR) clearing account should be managed on an open item basis so that you can check at any time whether invoices have been received for the goods received for an order.
    Set up accounts without open item management if no offsetting entry is to be made against a posting to this account.
    Accounts that are managed on an open item basis include:
    Clearing accounts:
    Bank clearing account
    Payroll clearing account
    Cash discount clearing account
    GR/IR clearing account
    Accounts that are not managed on an open item basis:
    Bank accounts
    Tax accounts
    Raw material accounts
    Reconciliation accounts
    Hope this is helpful. Pleas assign points if it is.
    Julia

  • Open sales orders and open deliveries and open billing doc to sap from legesy

    Dear all
    i have some open sales orders and open deliveries and open billing doc are there in the legesy system
    so i want to know how to transfer the doc to sap by using lsmw plz tell me

    Hi Amith,
    it is always good to search in Google before posting .LSMW is very old topic and i am sure you will get lots of Documents on this .Please go through the below link .you will get some idea on this.
    http://scn.sap.com/thread/1012472
    there are 14 steps in LSMW and it is same for all (master data and Transaction Data)
    Pls practice this in your sand box or quality system before working it in the client requirement.
    Hope this helps to you
    Regards
    Sundar

  • Error opening a transaction in Logic Editor

    Hi,
    Using 11.5 SR3.
    I have a transaction which some 20 sequences and 30 action blocks. I configured it as a listener. For some strange reason, I just cannot open the transaction in the Logic editor.
    Another issue, though not sure if its related to the same thing is that some of the transactions say 'executing' even though the last sequence in the transaction is executed (the last sequence is a file write and the file is already created) when running from the Logic Editor. I also feel that the performance of the transaction execution has gone down recently. Not sure if all these issues are related or each one is a separate issue.
    Any clues from the gurus?
    Ravi.

    Hi Ravi,
    Found a SAP Note on the transaction loading issue.
    Note: 960362
    Title: Large Transactions can crash server
    URL: [Click Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_xap/~form/handler]
    It mentions increasing the heap size as an option.
    Cheers,
    Jai.
    Edited by: Jai Tamhane on Feb 7, 2008 12:23 PM

  • Open SD orders and partner type?

    Hi,
    I need to extract 'open sd orders' and 'partner type'  i.e all partner types  and not only  just SP or  SH
    The transaction  VA05 does no allow  all partner functions - and I need to sort by all types
    is there another way?
    If I want to use SQVI . . . what tables can I join?
    Thanks,
    SM

    IMG --> Sales and Distribution --> Sales --> Lists --> Set Updating of Partner Index.  Here, maintain the following values.
    Transaction Group      Partner Function
              0                             SP     
              0                             SH
              0                             PY
              0                             BP
    Now you can generate VA05 based on any partner functions.
    thanks
    G. Lakshmipathi

  • Opening Balance - Transactions - Closing Balance in FD10N & FK10N

    Hi All,
    I need to see the report in following format for FD10N & FK10N
    1. Opening Balance
    2. (+/-) Transactions
    3. Closing Balance
    FD10N and FK10N show the period balance and drilling into the balance shows the detail view of transactions posted in the period. But I need to see the above 3 items (Opening Balance, Transactions & Closing Balance) in 1 report.
    Thanks

    There is no such report to show the opening balance then your transactions and then your closing balance.  (something similar to personal bank statement)
    However, you may see the following reports may suffice your requirement (there is no drilldown available)
    S_ALR_87012172 (for customers)
    S_ALR_87012082 (for vendors)
    Regards,
    Ravi

  • Purchase Requisitions, Purchase Orders and Receipts

    Hello all,
    The following is the sequence for Purchasing
    Purchase Requision -> Purchase Orders -> Receipts
    However I have a requirement to bring in the related Purchase requisions,purchase orders and receipts from 11i into R12 instance.I can do that using the open interfaces.However How do i link these 3 objects together?
    I intend to import the purchase orders first and then import its related purchase requistions and the receipts...In doing so how do i link them together.How do i know that this purchase order was created from this Purchase requistion or this receipt is meant for this purchase order? What is the joiing columns in the base/open interface tables?
    Thanks
    AJM

    Hi Venkat
    1. To perform ATP do we need all the issues(Sales Orders, Deliveries) and receipts(Purchase Requisitions, Planned Orders) in APO?
    Yes you need all the mentioned elements above in APO to do ATP check. Again, you can also extend the scope of the check to further more receipts and issues. All  depends on your configuration of scope of check.
    3. I guess in Apo the planned order and process order is a single elment. Is that Correct?
    Yes, technically a planned order can be a planned process order or a planned production order.
    regards
    Mohan Chunchu

  • Importing os Open PO,GRPO and Invoice Through DTW

    Hi All,
        Please tell me what are the exact Templates and Mandatory fields for Open PO,GRPO and Invoice through DTW.
    Kind Regards
      silpa

    Purchase order - oPurchaseOrder DTW template
    Documents template
    -Record Key
    - Vendor Code (CardCode)
    Document Lines template
    -Record Key
    -Line Number
    - Item Code
    - Qty
    - TaxCode
    - Ware House
    Goods Receipt Purchase Order - oPurchaseDeliveryNotes DTW template
    Documents template
    -Record Key
    Vendor Code (CardCode)
    Document Lines template
    -Record Key
    -Line Number
    - Item Code
    - Qty
    - TaxCode
    - Ware House
    AP Invoice - oPurchaseInvoice DTW Template
    Document template
    -Record Key
    - Vendor code
    - Vendor ref no.
    Document Lines template
    -Record Key
    -Line Number
    - Item Code
    - Qty
    - Price
    - Tax Code
    Jeyakanthan

  • Re: Transactions and Locking Rows for Update

    Dale,
    Sounds like you either need an "optimistic locking" scheme, usually
    implemented with timestamps at the database level, or a concurrency manager.
    A concurrency manager registers objects that may be of interest to multiple
    users in a central location. It takes care of notifying interested parties
    (i.e., clients,) of changes made to those objects, using a "notifier" pattern.
    The optimistic locking scheme is relatively easy to implement at the
    database level, but introduces several problems. One problem is that the
    first person to save their changes "wins" - every one else has to discard
    their changes. Also, you now have business policy effectively embedded in
    the database.
    The concurrency manager is much more flexible, and keeps the policy where
    it probably belongs. However, it is more complex, and there are some
    implications to performance when you get to the multiple-thousand-user
    range because of its event-based nature.
    Another pattern of lock management that has been implemented is a
    "key-based" lock manager that does not use events, and may be more
    effective at managing this type of concurrency for large numbers of users.
    There are too many details to go into here, but I may be able to give you
    more ideas in a separate note, if you want.
    Don
    At 04:48 PM 6/5/97 PDT, Dale "V." Georg wrote:
    I have a problem in the application I am currently working on, which it
    seems to me should be easily solvable via appropriate use of transactions
    and database locking, but I'm having trouble figuring out exactly how to
    do it. The database we are using is Oracle 7.2.
    The scenario is as follows: We have a window where the user picks an
    object from a dropdown list. Some of the object's attributes are then
    displayed in that window, and the user then has the option of editing
    those attributes, and at some point hitting the equivalent of a 'save'button
    to write the changes back to the database. So far, so good. Now
    introduce a second user. If user #1 and user #2 both happen to pull up
    the same object and start making changes to it, user #1 could write back
    to the database and then 15 seconds later user #2 could write back to the
    database, completely overlaying user #1's changes without ever knowing
    they had happened. This is not good, particularly for our application
    where editing the object causes it to progress from one state to the next,
    and multiple users trying to edit it at the same time spells disaster.
    The first thing that came to mind was to do a select with intent to update,
    i.e. 'select * from table where key = 'somevalue' with update'. This way
    the next user to try to select from the table using the same key would not
    be able to get it. This would prevent multiple users from being able to
    pull the same object up on their screens at the same time. Unfortunately,
    I can think of a number of problems with this approach.
    For one thing, the lock is only held for the duration of the transaction, so
    I would have to open a Forte transaction, do the select with intent to
    update, let the user modify the object, then when they saved it back again
    end the transaction. Since a window is driven by the event loop I can't
    think of any way to start a transaction, let the user interact with the
    window, then end the transaction, short of closing and re-opening the
    window. This would imply having a separate window specifically for
    updating the object, and then wrapping the whole of that window's event
    loop in a transaction. This would be a different interface than we wanted
    to present to the users, but it might still work if not for the next issue.
    The second problem is that we are using a pooled DBSession approach
    to connecting to the database. There is a single Oracle login account
    which none of the users know the password to, and thus the users
    simply share DBSession resources. If one user starts a transaction
    and does a select with intent to update on one DBSession, then another
    user starts a transaction and tries to do the same thing on the same
    DBSession, then the second user will get an error out of Oracle because
    there's already an open transaction on that DBSession.
    At this point, I am still tossing ideas around in my head, but after
    speaking with our Oracle/Forte admin here, we came to the conclusion
    that somebody must have had to address these issues before, so I
    thought I'd toss it out and see what came back.
    Thanks in advance for any ideas!
    Dale V. Georg
    Indus Consultancy Services [email protected]
    Mack Trucks, Inc. [email protected]
    >
    >
    >
    >
    ====================================
    Don Nelson
    Senior Consultant
    Forte Software, Inc.
    Denver, CO
    Corporate voice mail: 510-986-3810
    aka: [email protected]
    ====================================
    "I think nighttime is dark so you can imagine your fears with less
    distraction." - Calvin

    We have taken an optimistic data locking approach. Retrieved values are
    stored as initial values; changes are stored seperately. During update, key
    value(s) or the entire retieved set is used in a where criteria to validate
    that the data set is still in the initial state. This allows good decoupling
    of the data access layer. However, optimistic locking allows multiple users
    to access the same data set at the same time, but then only one can save
    changes, the rest would get an error message that the data had changed. We
    haven't had any need to use a pessimistic lock.
    Pessimistic locking usually involves some form of open session or DBMS level
    lock, which we haven't implemented for performance reasons. If we do find the
    need for a pessimistic lock, we will probably use cached data sets that are
    checked first, and returned as read-only if already in the cache.
    -DFR
    Dale V. Georg <[email protected]> on 06/05/97 03:25:02 PM
    To: Forte User Group <[email protected]> @ INTERNET
    cc: Richards* Debbie <[email protected]> @ INTERNET, Gardner*
    Steve <[email protected]> @ INTERNET
    Subject: Transactions and Locking Rows for Update
    I have a problem in the application I am currently working on, which it
    seems to me should be easily solvable via appropriate use of transactions
    and database locking, but I'm having trouble figuring out exactly how to
    do it. The database we are using is Oracle 7.2.
    The scenario is as follows: We have a window where the user picks an
    object from a dropdown list. Some of the object's attributes are then
    displayed in that window, and the user then has the option of editing
    those attributes, and at some point hitting the equivalent of a 'save' button
    to write the changes back to the database. So far, so good. Now
    introduce a second user. If user #1 and user #2 both happen to pull up
    the same object and start making changes to it, user #1 could write back
    to the database and then 15 seconds later user #2 could write back to the
    database, completely overlaying user #1's changes without ever knowing
    they had happened. This is not good, particularly for our application
    where editing the object causes it to progress from one state to the next,
    and multiple users trying to edit it at the same time spells disaster.
    The first thing that came to mind was to do a select with intent to update,
    i.e. 'select * from table where key = 'somevalue' with update'. This way
    the next user to try to select from the table using the same key would not
    be able to get it. This would prevent multiple users from being able to
    pull the same object up on their screens at the same time. Unfortunately,
    I can think of a number of problems with this approach.
    For one thing, the lock is only held for the duration of the transaction, so
    I would have to open a Forte transaction, do the select with intent to
    update, let the user modify the object, then when they saved it back again
    end the transaction. Since a window is driven by the event loop I can't
    think of any way to start a transaction, let the user interact with the
    window, then end the transaction, short of closing and re-opening the
    window. This would imply having a separate window specifically for
    updating the object, and then wrapping the whole of that window's event
    loop in a transaction. This would be a different interface than we wanted
    to present to the users, but it might still work if not for the next issue.
    The second problem is that we are using a pooled DBSession approach
    to connecting to the database. There is a single Oracle login account
    which none of the users know the password to, and thus the users
    simply share DBSession resources. If one user starts a transaction
    and does a select with intent to update on one DBSession, then another
    user starts a transaction and tries to do the same thing on the same
    DBSession, then the second user will get an error out of Oracle because
    there's already an open transaction on that DBSession.
    At this point, I am still tossing ideas around in my head, but after
    speaking with our Oracle/Forte admin here, we came to the conclusion
    that somebody must have had to address these issues before, so I
    thought I'd toss it out and see what came back.
    Thanks in advance for
    any
    ideas!
    Dale V. Georg
    Indus Consultancy Services [email protected]
    Mack Trucks, Inc. [email protected]
    ------ Message Header Follows ------
    Received: from pebble.Sagesoln.com by notes.bsginc.com
    (PostalUnion/SMTP(tm) v2.1.9c for Windows NT(tm))
    id AA-1997Jun05.162418.1771.334203; Thu, 05 Jun 1997 16:24:19 -0500
    Received: (from sync@localhost) by pebble.Sagesoln.com (8.6.10/8.6.9) id
    NAA11825 for forte-users-outgoing; Thu, 5 Jun 1997 13:47:58 -0700
    Received: (from uucp@localhost) by pebble.Sagesoln.com (8.6.10/8.6.9) id
    NAA11819 for <[email protected]>; Thu, 5 Jun 1997 13:47:56 -0700
    Received: from unknown(207.159.84.4) by pebble.sagesoln.com via smap (V1.3)
    id sma011817; Thu Jun 5 13:47:43 1997
    Received: from tes0001.macktrucks.com by relay.macktrucks.com
    via smtpd (for pebble.sagesoln.com [206.80.24.108]) with SMTP; 5 Jun
    1997 19:35:31 UT
    Received: from dale by tes0001.macktrucks.com (SMI-8.6/SMI-SVR4)
    id QAA04637; Thu, 5 Jun 1997 16:45:51 -0400
    Message-ID: <[email protected]>
    Priority: Normal
    To: Forte User Group <[email protected]>
    Cc: "Richards," Debbie <[email protected]>,
    "Gardner," Steve <[email protected]>
    MIME-Version: 1.0
    From: Dale "V." Georg <[email protected]>
    Subject: Transactions and Locking Rows for Update
    Date: Thu, 05 Jun 97 16:48:37 PDT
    Content-Type: text/plain; charset=US-ASCII; X-MAPIextension=".TXT"
    Content-Transfer-Encoding: quoted-printable
    Sender: [email protected]
    Precedence: bulk
    Reply-To: Dale "V." Georg <[email protected]>

  • Transactions and Locking Rows for Update

    I have a problem in the application I am currently working on, which it
    seems to me should be easily solvable via appropriate use of transactions
    and database locking, but I'm having trouble figuring out exactly how to
    do it. The database we are using is Oracle 7.2.
    The scenario is as follows: We have a window where the user picks an
    object from a dropdown list. Some of the object's attributes are then
    displayed in that window, and the user then has the option of editing
    those attributes, and at some point hitting the equivalent of a 'save' button
    to write the changes back to the database. So far, so good. Now
    introduce a second user. If user #1 and user #2 both happen to pull up
    the same object and start making changes to it, user #1 could write back
    to the database and then 15 seconds later user #2 could write back to the
    database, completely overlaying user #1's changes without ever knowing
    they had happened. This is not good, particularly for our application
    where editing the object causes it to progress from one state to the next,
    and multiple users trying to edit it at the same time spells disaster.
    The first thing that came to mind was to do a select with intent to update,
    i.e. 'select * from table where key = 'somevalue' with update'. This way
    the next user to try to select from the table using the same key would not
    be able to get it. This would prevent multiple users from being able to
    pull the same object up on their screens at the same time. Unfortunately,
    I can think of a number of problems with this approach.
    For one thing, the lock is only held for the duration of the transaction, so
    I would have to open a Forte transaction, do the select with intent to
    update, let the user modify the object, then when they saved it back again
    end the transaction. Since a window is driven by the event loop I can't
    think of any way to start a transaction, let the user interact with the
    window, then end the transaction, short of closing and re-opening the
    window. This would imply having a separate window specifically for
    updating the object, and then wrapping the whole of that window's event
    loop in a transaction. This would be a different interface than we wanted
    to present to the users, but it might still work if not for the next issue.
    The second problem is that we are using a pooled DBSession approach
    to connecting to the database. There is a single Oracle login account
    which none of the users know the password to, and thus the users
    simply share DBSession resources. If one user starts a transaction
    and does a select with intent to update on one DBSession, then another
    user starts a transaction and tries to do the same thing on the same
    DBSession, then the second user will get an error out of Oracle because
    there's already an open transaction on that DBSession.
    At this point, I am still tossing ideas around in my head, but after
    speaking with our Oracle/Forte admin here, we came to the conclusion
    that somebody must have had to address these issues before, so I
    thought I'd toss it out and see what came back.
    Thanks in advance for any ideas!
    Dale V. Georg
    Indus Consultancy Services [email protected]
    Mack Trucks, Inc. [email protected]
    [email protected]------------------

    I have a problem in the application I am currently working on, which it
    seems to me should be easily solvable via appropriate use of transactions
    and database locking, but I'm having trouble figuring out exactly how to
    do it. The database we are using is Oracle 7.2.
    The scenario is as follows: We have a window where the user picks an
    object from a dropdown list. Some of the object's attributes are then
    displayed in that window, and the user then has the option of editing
    those attributes, and at some point hitting the equivalent of a 'save' button
    to write the changes back to the database. So far, so good. Now
    introduce a second user. If user #1 and user #2 both happen to pull up
    the same object and start making changes to it, user #1 could write back
    to the database and then 15 seconds later user #2 could write back to the
    database, completely overlaying user #1's changes without ever knowing
    they had happened. This is not good, particularly for our application
    where editing the object causes it to progress from one state to the next,
    and multiple users trying to edit it at the same time spells disaster.
    The first thing that came to mind was to do a select with intent to update,
    i.e. 'select * from table where key = 'somevalue' with update'. This way
    the next user to try to select from the table using the same key would not
    be able to get it. This would prevent multiple users from being able to
    pull the same object up on their screens at the same time. Unfortunately,
    I can think of a number of problems with this approach.
    For one thing, the lock is only held for the duration of the transaction, so
    I would have to open a Forte transaction, do the select with intent to
    update, let the user modify the object, then when they saved it back again
    end the transaction. Since a window is driven by the event loop I can't
    think of any way to start a transaction, let the user interact with the
    window, then end the transaction, short of closing and re-opening the
    window. This would imply having a separate window specifically for
    updating the object, and then wrapping the whole of that window's event
    loop in a transaction. This would be a different interface than we wanted
    to present to the users, but it might still work if not for the next issue.
    The second problem is that we are using a pooled DBSession approach
    to connecting to the database. There is a single Oracle login account
    which none of the users know the password to, and thus the users
    simply share DBSession resources. If one user starts a transaction
    and does a select with intent to update on one DBSession, then another
    user starts a transaction and tries to do the same thing on the same
    DBSession, then the second user will get an error out of Oracle because
    there's already an open transaction on that DBSession.
    At this point, I am still tossing ideas around in my head, but after
    speaking with our Oracle/Forte admin here, we came to the conclusion
    that somebody must have had to address these issues before, so I
    thought I'd toss it out and see what came back.
    Thanks in advance for any ideas!
    Dale V. Georg
    Indus Consultancy Services [email protected]
    Mack Trucks, Inc. [email protected]
    [email protected]------------------

Maybe you are looking for

  • How do I remove "other users" folder in mail and on my iPhone

    On one account only I have "other users" folder that lists all of the folders of every user on the server. On my iphone I have to scroll past pages of other user folders to get to any folder named with anything after "O" Does anyone know how to get t

  • A Critical Error on Search Service 2013

    So simply, one of our clients had an issue on an SP machine and decided to do a Bare Metal Restore on the OS Drive (Bad, Bad Idea). that has now created a whole host of issues on that SP box. The main issue that i've got left to fix are, Search Servi

  • When installing itunes on windows 7 i get and error, is there a way to fix this?

    I need help. the title pritty much explains it all. I run the setup and select my destination folder, then click install. down the bottem it tells what it is installing. it stops at 'installing apple software update'. it then comes up with a screen s

  • Reading Task Container in ABAP Webdynpro

    Hi All, I have to read the task container in ABAP Webdynpro to show the details on a ABAP interactive form which is embedded in WDA. For this I have approached in the following way. 1) Task is configured in SWFVISU with DYNPARM = WI_ID=${item.externa

  • Get old item name for renamed files using TFS API

    My current tfs will be retired in next few months.I am using tfs api to create a parallel tfs on a new server from the existing one. I have folders and solutions that have been renamed. I am iterating items and based on their changetype(add, edit, de