首页  ·  知识 ·  生产制造
FORM编程不知道的细节或语法整理收集
网友    ERP  编辑:dezai   图片来源:网络
FORM 编程不知道的细节或语法整理收集

设置光标所在记录的状态:
set_record_property(name_in('system.trigger_record'),'gme_batch',status,query_status);  
注意cursor_record,current_record,trigger_record之间的区别,有空研究一下。     

Check_Package_Failure
do_key('PREVIOUS_BLOCK');
hide_window('gme_lot');
copy(:gme_btn.sum_lot_qty,'gme_batch.trx_qty');
post ;--后台自己提交数据

转换库存主单位对应辅单位的数量:
l_second_qty := inv_convert.inv_um_convert(:gme_batch.inventory_item_id,'',:gme_batch.organization_id,38,:gme_batch.sum_lot_qty,:gme_batch.primary_uom_code,:gme_batch.secondary_uom_code,'','');

当在FORM中使用了RAISE FORM_TRIGGER_FAILURE,而又写了
exception
  when others then
   message(sqlerrm);
   RAISE FORM_TRIGGER_FAILURE;
有时会报error:100501:non-ORACLE exception错。
解决办法:1.不要excetion.
解决办法: 2.先定义一个例外, 再显示出来
declare
user_err exception;
begin
if .... then
  raise user_err;
end if;
exception
when user_err then
  message('user err sample');
  raise form_trigger_failure;
when others then
   message(sqlerrm);
   RAISE FORM_TRIGGER_FAILURE;
end;


validate(block_scope)
可选参数:DEFAULT_SCOPE :Perform normal validation for the default scope, determined by the runtime platform. 
Note: If you change the scope via SET_FORM_PROPERTY(VALIDATION UNIT) and then call VALIDATE(DEFAULT_SCOPE), you will override the default scope as defined in the form module. In this case, Oracle Forms will not validate at the default scope but at the scope defined by SET_FORM_PROPERTY.
FORM_SCOPE: Perform normal validation for the current form.
BLOCK_SCOPE: Perform normal validation for the current block.
RECORD_SCOPE :Perform normal validation for the current record.
ITEM_SCOPE: Perform normal validation for the current item.

关闭主窗口:app_window.close_first_window;

动态LOV:
       IF :mat_trx.trx_action_id = 1 THEN
           set_lov_property('lot_number',group_name,'lot_issue');
        ELSE
           set_lov_property('lot_number',group_name,'lot_receipt');
        END IF;
        set_item_property('gme_batch.lot',lov_name,'lot_number');

清除块数据:
APP_FIND.CLEAR;

设置回滚点与回滚:
issue_savepoint('gmetrxsave');
forms_ddl('rollback to gmetrx_save');

本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读
也许感兴趣的
我们推荐的
主题最新
看看其它的