简体   繁体   中英

Forms in oracle apps

Am new to oracle apps,tried to implement a small logic to transfer the records from staging table to permanent table on clicking transfer button in form.After updating/inserting the data in perm table,transfer flag in staging table should be updated to 'Y'. In the form I am taking staging table columns as a datablock.

sample Code:

GO_BLOCK('stg_datablock');
  first_record;
Loop
--Insert/Update on perm table
--Now try to update staging table transfer_flag to Y to indicate the record has been transferred to perm.

    update staging_table set TRANSFER_FLAG='Y' WHERE col1=:stg_datablock.col1 and col2=:stg_datablock.col2;
    EXIT
    WHEN :system.last_record = 'TRUE';
      next_record;
    END LOOP;

But I tried to implement this,it took long time to execute.Could anyone please suggest me the reason for poor efficiency.Any suggestions wil be greatly appreciated.

I have found the reason for the Q.Sorry for creating confusion, i forgot to mention the last command which i have in the code,"commit_form",due to which it took more time to process.I have replaced commit_form() with standard commit,now the execution is as expected.

Thanks, Likitha

Oracle建议不要在表单中执行任何DML语句,您必须创建一个程序单元,然后对数据库调用pkg或过程并执行这些操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM