简体   繁体   English

Oracle应用程序中的表单

[英]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'. 这是oracle应用程序的新功能,尝试实现一种小的逻辑,即单击表单中的传输按钮时将记录从登台表传输到永久表。更新/插入perm表中的数据后,登台表中的传输标志应更新为'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. 我已经找到Q.Sorry造成混乱的原因了,我忘了提到代码中的最后一个命令“ commit_form”,因为它花了更多的时间来处理。我用标准替换了commit_form()提交,现在执行按预期执行。

Thanks, Likitha 谢谢,Likitha

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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