Transaction and table craeting.

Hi all,
I am using Oracle 8i and java as client.
How can I use transaction with table creating( for temp. tables).
For exmple:
1. insert into someTable ...
2. create GLOBAL TEMPORARY table myTable ....
3. insert into myTable select ....
4. update anotherTable set .....
5. Truncate myTable.
6. Drop myTable
7. On condition : ROLLBACK.
By making rollback, the system do not make rollback on step 1.
Can I do this with oracle and how.
Many thanks in advance.

Hi ,
Thanks for the information.
It was helpful.I could see that for VBELN of VBAK table the ROLLNAME is VBELN_VA.
When I queried DD04T for VBELN_VA ,it gives me the DDTEXT for it as 'Sales Document'.
However, if on VA03 the same field is displayed with label Standard Order.
My requirement is how to find relation  between a table field(VBELN)or DDTEXT(Sales Document) and the label displayed(STANDARD ORDER) on a transaction screen.
The two may be different. This is just one instance.
I need to derive a generalised solution for all transcations not just VA03.
Being a Java programmer, I have limited knowledge of SAP.
Hence, it would be great help if you could suggest some standard RFC or some table that stores this information so that it can be retrieved from java layer and not SAP GUI.
Regards,
MNGhosh
Edited by: MNGhosh on Sep 15, 2009 8:47 AM

Similar Messages

  • Autonomous Transactions and table locks

    Does a commit statement in an Autonomous Transaction block in PL/SQL release locks aquired in the master transaction block?
    e.g
    CREATE OR REPLACE PACKAGE test_auto_trans AS
    PROCEDURE mainproc;
    PROCEDURE testproc;
    END test_auto_trans;
    CREATE OR REPLACE PACKAGE BODY test_auto_trans AS
    /*****************Main Procedure*********************/
    PROCEDURE mainproc AS
    BEGIN
    LOCK TABLE a,b,c IN EXCLUSIVE MODE nowait;
    /*some processing involving tables a,b,c here. no commit done yet*/
    testproc();
    /* will the locks on a,b,c still be available here? */
    EXCEPTION
    WHEN others THEN
    dbms_output.put_line('Error');
    dbms_output.put_line(sqlcode);
    dbms_output.put_line(sqlerrm);
    RAISE;
    END mainproc;
    /*****************test Procedure*********************/
    PROCEDURE testproc AS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    /*some processing using tables a,b,c here*/
    commit;
    EXCEPTION
    WHEN others THEN
    dbms_output.put_line('Error');
    dbms_output.put_line(sqlcode);
    dbms_output.put_line(sqlerrm);
    RAISE;
    END testproc;
    END test_auto_trans;
    /

    No transaction will release the locks held by another transaction. When you declare a stored proc to be PRAGMA AUTONOMOUS_TRANSACTION, it is essentially the same as if you logged in as the same user but in a different session.
    For example, if I have two sqlplus sessions running as user a, if I do an update in session1 and a delete and commit in session 2 I can still rollback in session 1.
    However, your psuedo code as posted will not work at all since the call to test_proc will block until you commit in the main proc, and since test_proc will never return, the main proc will never get to commit. It is exactly analogous to the following:
    session1> SELECT * FROM t;
            ID DESCR
             1 One
             2 Two
    session1> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    Table(s) Locked.
    session1> UPDATE t SET descr = 'Un'
      2  WHERE id = 1;
    1 row updated.so far, this is your main proc. Now, in another session (which is equivalent to your autonomous transaction procedure), I do:
    session2> UPDATE t SET descr = 'Deux'
      2  WHERE id = 2;which as I type is still waiting on the commit from session 1. Therefore, I cannot get to commit the autonomous transaction which would return control to session1
    HTH
    John
    Message was edited by:
    John Spencer
    Sorry, I initially forgot to answer your actual question "what about DML statements like truncate". Since TRUNCATE is actually a DDL statement I will assume that is what you meant. My initial answer covers DML statements (except SELECT which will work).
    All DDL statements in Oracle go
    COMMIT
    DDL statement
    COMMIT
    since the initial commit requires a very brief exclusive lock, you will get an error like:
    ORA-00054: resource busy and acquire with NOWAIT specified
    Exactly as if you did:
    session1> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    Table(s) Locked.then tried to do it again the another session
    session2> LOCK TABLE t IN EXCLUSIVE MODE nowait;
    LOCK TABLE t IN EXCLUSIVE MODE nowait
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified

  • How to add a field and table control to BP transaction.

    Hi,
    I have a requirement to add a field and table control to the 'Control data' tab of the Transaction BP.
    Can some on please help me if having a solution and with any relavant documents.
    Thanks in advance.
    Raj & Khader.

    Also explore with EEWB tcode.
    Refer this threads
    Re: EEWB
    Created New fields in Business Activity with EEWB
    Cheers
    Manohar

  • Create a Cockpit (Transaction) for Reports and Tables

    Hi Gurus,
    i am very new in ABAP. I want to create a Transaction/view in SAP BW where i can put my favourite Abap reports and tables and execute These directly from the created view/Transaction without se16/se11 or se38 Access and dont know if this is possible and how to do it.
    the reason herefore is that we get deprived in differently time ranges our authorizations for the Standard Transactions.
    I have a list of my tables and programms.
    Thanks for your help.

    we get deprived in differently time ranges our authorizations for the Standard Transactions.
    So you try to bypass security checks put in place by the Basis team
    or could you explain your requirement ?
    Remember (or learn) that creating such transaction, you are able to bypass following authorization checks using SU24 (Identity Management, User and Role Administration of Application Server ABAP, AS ABAP Authorization Concept, From the Programmed Authorization Check to a Role, Editing Authorization Default Data (Development System) / Editing Authorization Default Data (Customer System). )
    Regard,
    Raymond

  • SoD Analysis , tables to relate roles, transactions and auth objects

    Hi everyone,
    I am analyzing my company SAP roles in terms of segregation of duties, however I having a problem.
    I need a table/report to give me for each role, every transactions and for each transaction in the role every authorization objects.
    For example I want to know for Role B that have transaction C which have the follow authorization object D with values X and Y.
    Therefore I want to know for each role and respective transactions which are only display or/and execute or/and editable. How can I do that?
    Thanks!

    Hi,
    There is no default report/table which gives you the required information. However, you can achieve this by using SQVI. Join the tables, and create a tcode for the same. Refer the below link:
    Re: SAP Query in SQVI transaction
    Alternatively, you can download all the data into spreadsheet and create Pivots to plot the information.
    The other alternative is to have a custom program built which takes the information from AGR_DEFINE, AGR_AGRS, AGR_1251, AGR_1252, AGR_TCODE tables.
    Hope this helps!!
    Regards,
    Raghu

  • How can i log transaction codes, programes and tables used by a user?

    Hi everyone,
    i need to log transaction codes, programes and tables a user has used in a certain time. how can i trace that and is it possible with timestamps?
    i tried something with the badi workload_statistic but thats not what i need. is there a simple function which can do that or is this really much more complicated?

    In SE13 there is an option to log table changes for a table.
    If you search for "SCU3" you will find plenty of information on this. Also search for "RECCLIENT" (without the "/") and you will find some more specialized threads.
    Cheers,
    Julius

  • Master data tables and Transaction data Tables

    Hello Gurus,
    Please let me know how to know which table belongs to master data  and which table belongs to transaction data.
    for FICO module.
    Does any one  have specific material relating to master data table and transaction data tables.
    Thanks
    Edited by: Manu Rathore on Jan 18, 2012 4:38 AM

    Hi Manu,
    Find attached table relation diagram by Christopher Solomon. It is one of the very comprehensive chart on this topic.
    deleted
    Warm regards,
    Murukan Arunachalam

  • 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

  • Material Transaction and Move Transaction Managers are Going Inactive

    hi
    it was running previously but currently it becomes inactive.can any one tell in which table to look for the error related to this problem?
    Kind Regards
    Sayantan

    Hi;
    What is your OS and EBS?
    It was working before? If yes what have you been changed on your system(patch etc)
    Please check below note:
    Material Transaction And Move Transaction Managers Are Going Inactive [ID 93507.1]
    Material Transaction and Move Transaction Managers are Going Inactive [ID 98757.1]
    Regard
    Helios

  • Field NAme and Table Name

    Hi All,
    I got some output values from the legacy system with me but need to know whats the actual field name and table name to which i need to transfer these values. How can i do it, since which theres is not field name or despcription given for the data.
    Is there any way i can do it.
    Points will be rewarded for all useful answers.
    Regards
    AB

    if you know the transaction code you use to post the uploaded data in SAP, you just need to do BDC recording in using transation SM35. Record the whole process and create a program from the recording... and you wont even need to know the tables and field names-- almost everything will be done for you....
    All you need to do is replace record data with upload data.
    You can also try to look for a standard Function Module / BAPI which can do the processing for you and provide it with a table containing the upload data ...
    Reward points if useful

  • Purchase Order released date field and table name

    Hi,
    Please tell me the  Purchase Order released date field and table name.
    Regards
    Deepak

    Hi,
    Table : EKKO.
    Fields : FRGKE,FRGZU.
    You can get release date of PO from CDHDR  table.
    give object value as your po number and check.dont forget to give leading zeros.
    The udate will be date field and transaction will be me29n for relaesed po.

  • 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]------------------

  • Excise modvat accounts not defined for CAPE transaction and TS excise group

    Hi Guys,
    Suddenly we are facing issue during exicse invoice capturing with MIGO
    system is giving following error
    "Excise modvat accounts not defined for CAPE transaction and TS excise group
    Message no. 8I402
    While in Excise account assignment table CAPE is Linked to Modvat Clearing Account which is further liked to correct GL
    Can any one explain the cause of this issue Points will be awarded
    Regards,
    Ashish

    Hi
    Pls maintain the following:
    1. SPRO->Logistics General -> Tax on Goods Movements -> India -> Account Determination -> Specify Excise Accounts per Excise Transaction
    Pls note the Sub Tansaction type is IP for ETT CAPE.
    ETT  <b>Sub Trn Type</b>   DC Ind                Account Name
    CAPE     IP           CR Credit     ONHOLD CENVAT on hold account
    CAPE     IP           DR Debit     ONHOLD CENVAT on hold account
    CAPE     IP           DR Debit     RG23AED RG 23 AED account
    CAPE     IP           DR Debit     RG23BED RG 23 BED account
    CAPE     IP           DR Debit     RG23SED RG 23 SED account
    CAPE       IP                   DR Debit             RG23ECS RG 23 ECS account
    2. SPRO->Logistics General -> Tax on Goods Movements -> India -> Account Determination -> Specify G/L Accounts per Excise Transaction
    Check the G/L accounts for Excise Transaction Type CAPE and maintain the same G/L accounts for ETT CAPE with <b>Sub Trn Type IP</b>.
    Hope this clarifies.
    Thanks

  • RFC function module with call transaction  and Import memory ID

    Hi,
    I am calling RFC function module from R/3 which exists in BW.
    In BW stand alone function module works fine.
    When I am Calling from R/3 it is not working,
    Can you tell me is it because of the below code, And suggest if any corrections required.
    I am calling the call transaction and using EXPORT memory iD inside the program
    and IMPORT in after that.
    And populating RFC table's table  " p_i_tcode_user" finally.
    set parameter id 'TCD' field p_tcode.
    call transaction 'Z_BW_RSUSR002' AND SKIP FIRST SCREEN.
      ENDIF.
    get the final user data from submitted program
    import gt_users_complete from memory id tcode_userid.
    LOOP AT gt_users_complete.
          lwa_tcode_user-tcode =  p_tcode.
          lwa_tcode_user-uname = gt_users_complete-Bname.
          APPEND lwa_tcode_user TO p_i_tcode_user.
    ENDLOOP.
    Thanks,
    Veerendra.

    HI,
       Can you just exaplin it clearly plz..
    Thanks
    Mahesh

Maybe you are looking for