ora学习

 

oracle 内置包,用于将表中数据以层次关系展开 将运行出的数据添加到零时表中

bompexpl.exploder_userexit(verify_flag => :verify_flag,
org_id => :rg_id,--organization_id --用户输入的组织号
order_by => :rder_by, --1 - Op seq, item seq
--2 - Item seq, op seq
grp_id => :grp_id, --unique value to identify current explosion use
--value from sequence bom_explosion_temp_s

session_id => :session_id, --unique value to identify current session
-- use value from bom_explosion_temp_session_s

levels_to_explode => :levels_to_explode, - -展开层数
bom_or_eng => :bom_or_eng, --1 - BOM; 2 - ENG
impl_flag => :impl_flag, -- 1 - implemented only 2 - both impl and unimpl

plan_factor_flag => lan_factor_flag, 默认2
explode_option => :explode_option, -- 1 - All| 2 - Current| 3 - Current and future
module => :module, -- 1 - Costing| 2 - Bom| 3 - Order entry| 4 - ATO| 5 - WSM

cst_type_id => :cst_type_id,--cost type id for costed explosion
std_comp_flag => :std_comp_flag, --std_comp_flag 1 - explode only standard components
-- 2 - all components

expl_qty => :expl_qty, -- explosion quantity
item_id => :item_id, --item id of assembly to explode--用户输入的库存号
alt_desg => :alt_desg, ---alternate bom designator
comp_code => :comp_code, --concatenated component code lpad 16
rev_date => :rev_date, -- explosion date YYYY/MM/DD HH24:MI:SS ;一定要这个格式to_char(sysdate, 'YYYY/MM/DD HH24:MI:SS')
err_msg => :err_msg, --error message out buffer返回错误信息
error_code => :error_code--error code out.returns sql error code if sql error 返回错误代码

)

作者 kiswind ( report技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期五, 五月 25, 2007

近期回答的问题总结

 

1.用户对于帐簿的隔离设置

在总帐超级用户->设置->人员->其他->分配->帐套

2.客户的应收帐款期初期末余额计算逻辑

取总帐数据,在对应到各个客户上
总帐要的是已经关帐的
输入帐期取出期末值
汇总明细
倒推出期初值

3. AP中应计负债帐龄分析报表逻辑

供应商汇总
把全部采购接受金额-发票已经匹配金额
在RCV_RECEIVING_SUB_LEDGER是GL在PO中的明细账能对应到采购接受的明细


那总帐日期作为查询日期
最后进行供应商汇总

如果要和总帐完全一致
建议再加上此科目匹配不到发票的数
这样3者合起来就为应计负债总帐科目内的余额

4.外币舍入和汇兑损益科目的设置

应该要设置舍入的
在应付超级用户->设置->应付款->币种
然后设置外汇舍入科目
设置的是财务费用

5.部门段科目查找和帐户包的srw回顾

帐户里的部门段,每家设置不一样的
总帐->设置->财务系统->弹性域->键->段

Oracle General Ledger
Accounting Flexfield
点segments
就能看见科目组合
找到部门的value set
再到下面<值>点value set
value set的名字

 


作者 kiswind ( EBS使用 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

EBS内的小数点问题

 

EBS内的小数点问题

一、总帐内的小数点

在总帐超级用户->设置->币种->定义->精度

二、PO内的小数点

http://www.itpub.net/showthread.php?s=&threadid=487377&highlight=%D0%A1%CA%FD%B5%E3

工具->

三、AP内的小数字点

http://www.itpub.net/showthread.php?s=&threadid=510810&perpage=10&pagenumber=2

中文环境所有的小数点变成't'?

http://www.itpub.net/showthread.php?s=&threadid=708049&perpage=10&pagenumber=2

步骤:
1.
Form界面中,帮助---诊断----检查,检查$ENVIRONMENT$ NLS_NUMBERIC_CHARACTERS 的设置是否正确. 应该是.,
2.
如果有问题,修改环境变量.那个参数是隐含的 NLS_NUMBERIC_CHARACTERS 直接输入就可以了 然后 tab

五、OM内小数点

http://www.itpub.net/showthread.php?s=&threadid=639577&highlight=%D0%A1%CA%FD%B5%E3

最近,在om模块挑库的时候,经常性的出现整数后面出现.000X的小数,让人很郁闷。而且还有一张订单,订单数量是500,结果挑库出来两行,一行数量是500,一行数量是0.0004。结果发运的时候两行还都发运过去了。这样订单是500,实际却发运出库了500.0004,无辜的多出库了0.0004。请问这是什么原因造成的,怎么解决比较合适?

工具栏 活动->重置小数点


作者 kiswind ( EBS使用 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期二, 五月 08, 2007

关于SET TRANSACTION READ ONLY

 

[ZT]ORACLE的隔离级别

隔离级别(isolation level

l 隔离级别定义了事务与事务之间的隔离程度。

l 隔离级别与并发性是互为矛盾的:隔离程度越高,数据库的并发性越差;隔离程度越低,数据库的并发性越好。

l ANSI/ISO SQL92标准定义了一些数据库操作的隔离级别:

l 未提交读(read uncommitted

l 提交读(read committed

l 重复读(repeatable read

l 序列化(serializable

l 通过一些现象,可以反映出隔离级别的效果。这些现象有:

l 更新丢失(lost update):当系统允许两个事务同时更新同一数据是,发生更新丢失。

l 脏读(dirty read):当一个事务读取另一个事务尚未提交的修改时,产生脏读。

l 非重复读(nonrepeatable read):同一查询在同一事务中多次进行,由于其他提交事务所做的修改或删除,每次返回不同的结果集,此时发生非重复读。(A transaction rereads data it has previously read and finds that another committed transaction has modified or deleted the data. )

l 幻像(phantom read):同一查询在同一事务中多次进行,由于其他提交事务所做的插入操作,每次返回不同的结果集,此时发生幻像读。(A transaction reexecutes a query returning a set of rows that satisfies a search condition and finds that another committed transaction has inserted additional rows that satisfy the condition. )

l 下面是隔离级别及其对应的可能出现或不可能出现的现象

 

Dirty Read

NonRepeatable Read

Phantom Read

Read uncommitted

Possible

Possible

Possible

Read committed

Not possible

Possible

Possible

Repeatable read

Not possible

Not possible

Possible

Serializable

Not possible

Not possible

Not possible

ORACLE的隔离级别

l ORACLE提供了SQL92标准中的read committedserializable,同时提供了非SQL92标准的read-only

l read committed

l 这是ORACLE缺省的事务隔离级别。

l 事务中的每一条语句都遵从语句级的读一致性。

l 保证不会脏读;但可能出现非重复读和幻像。

l serializable

l 简单地说,serializable就是使事务看起来象是一个接着一个地顺序地执行。

l 仅仅能看见在本事务开始前由其它事务提交的更改和在本事务中所做的更改。

l 保证不会出现非重复读和幻像。

l Serializable隔离级别提供了read-only事务所提供的读一致性(事务级的读一致性),同时又允许DML操作。

l 如果有在serializable事务开始时未提交的事务在serializable事务结束之前修改了serializable事务将要修改的行并进行了提交,则serializable事务不会读到这些变更,因此发生无法序列化访问的错误。(换一种解释方法:只要在serializable事务开始到结束之间有其他事务对serializable事务要修改的东西进行了修改并提交了修改,则发生无法序列化访问的错误。)

l If a serializable transaction contains data manipulation language (DML) that attempts to update any resource that may have been updated in a transaction uncommitted at the start of the serializable transaction, (并且修改在后来被提交而没有回滚),then the DML statement fails. 返回的错误是ORA-08177: Cannot serialize access for this transaction

l ORACLE在数据块中记录最近对数据行执行修改操作的N个事务的信息,目的是确定是否有在本事务开始时未提交的事务修改了本事务将要修改的行。具体见英文:Oracle permits a serializable transaction to modify a data row only if it can determine that prior changes to the row were made by transactions that had committed when the serializable transaction began. To make this determination efficiently, Oracle uses control information stored in the data block that indicates which rows in the block contain committed and uncommitted changes. In a sense, the block contains a recent history of transactions that affected each row in the block. The amount of history that is retained is controlled by the INITRANS parameter of CREATE TABLE and ALTER TABLE. Under some circumstances, Oracle may have insufficient history information to determine whether a row has been updated by a "too recent" transaction. This can occur when many transactions concurrently modify the same data block, or do so in a very short period. You can avoid this situation by setting higher values of INITRANS for tables that will experience many transactions updating the same blocks. Doing so will enable Oracle to allocate sufficient storage in each block to record the history of recent transactions that accessed the block.

l The INITRANS ParameterOracle stores control information in each data block to manage access by concurrent transactions. Therefore, if you set the transaction isolation level to serializable, you must use the ALTER TABLE command to set INITRANS to at least 3. This parameter will cause Oracle to allocate sufficient storage in each block to record the history of recent transactions that accessed the block. Higher values should be used for tables that will undergo many transactions updating the same blocks.

l read-only

l 遵从事务级的读一致性,仅仅能看见在本事务开始前由其它事务提交的更改。

l 不允许在本事务中进行DML操作。

l read onlyserializable的子集。它们都避免了非重复读和幻像。区别是在read only中是只读;而在serializable中可以进行DML操作。

l Export with CONSISTENT = Y sets the transaction to read-only.

l read committedserializable的区别和联系:

l 事务1先于事务2开始,并保持未提交状态。事务2想要修改正被事务1修改的行。事务2等待。如果事务1回滚,则事务2(不论是read committed还是serializable方式)进行它想要做的修改。如果事务1提交,则当事务2read committed方式时,进行它想要做的修改;当事务2serializable方式时,失败并报错“Cannot serialize access”,因为事务2看不见事务1提交的修改,且事务2想在事务一修改的基础上再做修改。具体见英文:Both read committed and serializable transactions use row-level locking, and both will wait if they try to change a row updated by an uncommitted concurrent transaction. The second transaction that tries to update a given row waits for the other transaction to commit or roll back and release its lock. If that other transaction rolls back, the waiting transaction (regardless of its isolation mode) can proceed to change the previously locked row, as if the other transaction had not existed. However, if the other (blocking) transaction commits and releases its locks, a read committed transaction proceeds with its intended update. A serializable transaction, however, fails with the error "Cannot serialize access", because the other transaction has committed a change that was made since the serializable transaction began.

l read committedserializable可以在ORACLE并行服务器中使用。

l 关于SET TRANSACTION READ WRITEread writeread committed 应该是一样的。在读方面,它们都避免了脏读,但都无法实现重复读。虽然没有文档说明read write在写方面与read committed一致,但显然它在写的时候会加排他锁以避免更新丢失。在加锁的过程中,如果遇到待锁定资源无法锁定,应该是等待而不是放弃。这与read committed一致。

l 语句级的读一致性

l ORACLE保证语句级的读一致性,即一个语句所处理的数据集是在单一时间点上的数据集,这个时间点是这个语句开始的时间。

l 一个语句看不见在它开始执行后提交的修改。

l 对于DML语句,它看不见由自己所做的修改,即DML语句看见的是它本身开始执行以前存在的数据。

l 事务级的读一致性

l 事务级的读一致性保证了可重复读,并保证不会出现幻像。

l 设置隔离级别

l 设置一个事务的隔离级别

l SET TRANSACTION ISOLATION LEVEL READ COMMITTED;

l SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

l SET TRANSACTION READ ONLY;

l 设置增个会话的隔离级别

l ALTER SESSION SET ISOLATION_LEVEL SERIALIZABLE;

l ALTER SESSION SET ISOLATION_LEVEL READ COMMITTED;

http://blog.oracle.com.cn/185365/viewspace_4805.html

一致性和事务
  一致性是事物控制的关键慨念。掌握了oracle 的一致性模型,能使您更好的,更恰当的使用事务控制。oracle通过一致性保证数据只有在事务全部完成后才能被用户看见和使用。这项技术对多用户数据库有巨大的作用。
  oracle常常使用语句级(state-level)一致性,保证数据在语句的生命期之间是可见的但不能被改变。事务由多个语句组成,当使用事务时,事物级(transaction-level)一致性在整个事务生命期中保证数据对所有语句都是可见的。
  oracle通过SCN(syatem change number)实施一致性。一个SCN是一个面向时间的数据库内部键。SCN只会增加不会减少,SCN表示了时间上的一个点,每个数据块都有一个SCN,通过比较这个点实施操作。
  事务级一致性
  SET TRANSACTION 的一个作用是确保事务级一致或语句级一致中有一个实施。ORACLE使用这些术语:
   ISOLATION LEVEL READ COMMIT 表示语句级一致
   ISOLATION LEVEL SERIALIZABLE 表示事务级一致。
  例:

SET TRANSACTION ISOLATION LEVEL READ COMMIT;

SET TRANSACTION ISOLATION LEVEL READ COMMIT
  下面的语句也能确保事务级一致:

SET TRANSCATION READ ONLY
  任何企图在只读(READ ONLY)事务中修改数据的操作都会抛出一个异常。但是,READ ONLY事务只能在下列语句中使用:

SELECT(
没有FOR UPDATE子句)
LOCK TABLE
SET ROLE
ALTER SYSTEM
ALTER ALARM
  即使没有改变任何数据,READ ONLY事务依然必须使用一个COMMITROLLBACK以结束整个事务。

http://www.itpub.net/showthread.php?threadid=313083&pagenumber

http://www.itpub.net/500115.html

http://skygodblue.spaces.live.com/Blog/cns!D18CEE1DB3D21A07!464.entry

6月19日

Transactions and Data Concurrency

折腾了一下午,弄个isolation level,好歹也要写点东西出来,要不然就白忙活这一个下午了。

其实所谓的 隔离级别只不过是 事务与事务之间的隔离程度

oracle提供了三种隔离级别 read committed (default)和serializable以及 非SQL92标准的read-only.

read commited:

从字面意思可以理解为不脏读,也就是说某一transaction只能读取其它trasaction的已经commit的数据和本transaction的没有提交的数据,也就是我们所理解的读一致性。

serializable:

这个就不是从字面意思理解的那样了。

它仅仅能看见在本事务开始前由其它事务提交的更改和在本事务中所做的更改。也就是说,其一旦设置了serializable的隔离级别之后,不管其它的会话的数据如何发生改变(不管是commit,还是不comit),并不影响本transaction 所能读取到的数据。也就是说,一旦设置了serializable的隔离级别之后,本transaction所能读取到的其它transaction的数据就是已经是固定的了,保证不会出现非重复读和幻像。

同时 serializable隔离级别允许DML操作,这是它与read only级别最大的不同之处。

tom 的解释:

A SERIALIZABLE transaction operates in an environment that makes it appear as if there are no other users modifying data in the database, the database will be ‘frozen’ at the point in time your query began. Your transaction sees the database consistently, at a single point in time. Side effects (changes) made by other transactions are not visible to it, regardless of how long it has been running. SERIALIZABLE does not mean that all transactions executed by the users are the same as if they were executed one right after another in a serial fashion. It does not imply that there is some serial ordering of the transactions that would result in the same outcome.

In Oracle, serializability is achieved by extending the read consistency we get at the statement level to the transaction level. Instead of results being consistent with respect to the start of a statement, they are pre-ordained at the time you begin the transaction.(也就是说,serializability级别下获得的数据是 会话开始时的时候 所能读取的数据,而并不是查询表达式发出时所能读取的数据) Pretty deep thought there – the database already knows the answer to any question you might ask it, before you ask it.

read only:

read only是serializable的子集。它们都避免了非重复读和幻像。区别是在read only中是只读;而在serializable中可以进行DML操作。

下面是关于serializable 两种设置隔离级别的实验:

session 1:

SQL> conn kingping
已连接。
SQL> desc b
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
X NUMBER
SQL> set time on
18:08:40 SQL>
18:09:29 SQL>
18:09:29 SQL> insert into b values(1);
已创建 1 行。
18:10:21 SQL> commit;
提交完成。
18:10:23 SQL> update b set x = 2 where x = 1;
已更新 1 行。
18:10:41 SQL> commit;
提交完成。
18:10:43 SQL> delete from b;
已删除 1 行。
18:10:52 SQL> commit;
提交完成。
18:10:54 SQL>
18:12:10 SQL>
18:12:11 SQL> insert into b values(1);
已创建 1 行。
18:12:13 SQL> commit;
提交完成。
18:12:14 SQL> update b set x = 2 where x = 1;
已更新 1 行。
18:12:19 SQL> commit;
提交完成。
18:12:20 SQL> delete from b;
已删除 1 行。
18:12:25 SQL> commit;
提交完成。

session 2:

Session级别设置:

SQL> conn kingping
已连接。
SQL> set time on
18:09:17 SQL>
18:09:45 SQL>
18:09:45 SQL> Alter session set isolation_level=serializable;
会话已更改。
18:10:12 SQL> select * from b;
未选定行
18:10:17 SQL>
18:10:25 SQL> select * from b;
未选定行
18:10:25 SQL> select * from b;
未选定行
18:10:45 SQL> select * from b;
未选定行

transaction级别设置:

SQL> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
事务处理集。
SQL> select * from b;
未选定行
SQL> select * from b;
未选定行
SQL> select * from b;
未选定行
SQL> select * from b;
未选定行

关于read committed和 serializable之间的区别以及 ORA-08177错误:

If a serializable transaction contains data manipulation language (DML) that attempts to update any resource that may have been updated in a transaction uncommitted at the start of the serializable transaction, (并且修改在后来被提交而没有回滚),then the DML statement fails. 返回的错误是ORA-08177: Cannot serialize access for this transaction。

事务1先于事务2开始,并保持未提交状态。事务2想要修改正被事务1修改的行。事务2等待。如果事务1回滚,则事务2(不论是read committed还是serializable方式)进行它想要做的修改。如果事务1提交,则当事务2是read committed方式时,进行它想要做的修改;当事务2是serializable方式时,失败并报错“Cannot serialize access”,因为事务2看不见事务1提交的修改,且事务2想在事务一修改的基础上再做修改.

具体见document:Both read committed and serializable transactions use row-level locking, and both will wait if they try to change a row updated by an uncommitted concurrent transaction. The second transaction that tries to update a given row waits for the other transaction to commit or roll back and release its lock. If that other transaction rolls back, the waiting transaction (regardless of its isolation mode) can proceed to change the previously locked row, as if the other transaction had not existed. However, if the other (blocking) transaction commits and releases its locks, a read committed transaction proceeds with its intended update. A serializable transaction, however, fails with the error "Cannot serialize access", because the other transaction has committed a change that was made since the serializable transaction began.

session1:

19:17:06 SQL> set time on
19:17:07 SQL> insert into b values(1);
已创建 1 行。
19:17:14 SQL> commit;
提交完成。
19:17:15 SQL> select * from b;

X
----------
1
19:17:17 SQL> update b set x=2 where x=1;
已更新 1 行。

19:18:19 SQL> commit;提交完成。
19:18:21 SQL> update b set x=3 where x=2;
已更新 1 行。

19:18:43 SQL>
19:19:21 SQL> rollback;回退已完成。

session2:

19:17:29 SQL> select * from b;

X
----------
1
19:17:36 SQL> Alter session set isolation_level=serializable;
会话已更改。
19:17:38 SQL> update b set x = 2 where x =1; (假如session1不commit,则此处hang)update b set x = 2 where x =1
*
ERROR 位于第 1 行:
ORA-08177: 无法连续访问此事务处理 (session1 commit)19:
18:21 SQL> select * from b;

X
----------
2 (但是此处竟然可以看到session1更改的结果,不明白原因)
19:18:32 SQL> update b set x = 4 where x =2; (假如session1不commit,则此处hang)
已更新 1 行。 (session1 rollback)

read committed下的实验就不做了。

另外还有一点比较奇怪:

http://asktom.oracle.com/pls/ask/f?p=4950:8:15112311275040223112::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:7636765105002


作者 kiswind ( DATEBASE ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期三, 四月 11, 2007

EBS财务后台动作(未完成版本)

 

AR模块:

1.事物处理
点“完成”就产生会计分录

借:应收款
贷:收入

2.收款
点“完成”就产生会计分录

借:现金
贷:未核销

点“核销”后

借:未核销
贷:应收款

AP模块


“保存”后按活动内“验证”后
产生会计分录


 

作者 kiswind ( EBS使用 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

oracle预定义异常

 

Category: sql
CURSOR_ALREADY_OPEN ORA-6511 试图打开一个已打开的光标
DUP_VAL_ON_INDEX ORA-0001 试图破坏一个唯一性限制
INVALID_CURSOR ORA-1001 试图使用一个无效的光标
INVALID_NUMBER ORA-1722 试图对非数字值进行数字操作
LOGIN_DENIED ORA-1017 无效的用户名或者口令
NO_DATA_FOUND ORA-1403 查询未找到数据
NOT_LOGGED_ON ORA-1012 还未连接就试图数据库操作
PROGRAM_ERROR ORA-6501 内部错误
ROWTYPE_MISMATCH ORA-6504 主变量和光标的类型不兼容
STORAGE_ERROR ORA-6500 内部错误
TIMEOUT_ON_RESOURCE ORA-0051 发生超时
TOO_MANY_ROWS ORA-1422 SELECT INTD命令返回的多行
TRANSACTION_BACKED_OUT ORA-006 由于死锁提交被退回
VALUE_ERROR ORA-6502 转换或者裁剪错误
ZERO_DIVIDE ORA-1476 试图被零除


 

作者 kiswind ( pl/sql使用技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期四, 四月 05, 2007

月结AP创建会计分录失败问题

 

月结AP创建会计分录失败问题

应付发票传送总账问题

在作应付发票传送总账的时候,出现下面问题,请问应该如何处理?
环境 11.5.9
数据库 oracle
模块 应付AP
操作过程描述:
1、创建一张应付发票 ,验证和创建分录;
2、对步骤一的发票进行取消操作。
结果:
1、产生的一条会计分录没有科目,在AP_AE_LINES_ALL中的ACCOUNTING_ERROR_CODE = 'INVALID ACCOUNT'
经检查,被反冲的账户科目正常。
请问:
该情况在什么条件下会产生?
3、运行“应付传送总账”后台请求,系统中正常的业务传送到总账,而取消产生的会计分录没有传送到总账。
经查看,科目ID=-1,解决方法:手工修改科目,还原到相应的科目。
4、再次运行“应付传送总账”后台请求,仍然没有传送到总账。
查看“应付传送总账”源程序,发现报表APXGLTRN调用的程序包XLA_GL_TRANSFER_PKG.XLA_GL_TRANSFER的一个条件为:事件头的状态AP_AE_HEADERS_ALL 的字段 EVENT_STATUS_CODE='ACCOUNTED'的情况下,系统才允许通过。 查看相应的记录发现该事件头记录的状态为'CREATED'
,请问:
1、事件状态的改变是什么条件下触发?
2、能否可以手工将状态更改为'ACCOUNTED',然后进行传送?

AP付款创建会计分录失败,界面显示会计分录状态为非正常的“Selected”

作应付发票传送总账的时候或者提交...程序

APPLLCSP Environment Variable set to :

Current NLS_LANG Environment Variable is :

SIMPLIFIED CHINESE_AMERICA.UTF8

MSG-00002: Check that AX is not installed before calling the accounting engine

MSG-00003: AX is not installed, Calling the accounting engine

MSG-00004: After the call to AP_Accounting_Engine_Pkg.Do_Accounting

MSG-00005: Error occured in the accounting process

MSG-00006: Error Message:

REP-1419: 'beforereport': PL/SQL 程序退出.
http://www.itpub.net/383073,1.html http://www.itpub.net/383073,1.html

http://www.itpub.net/196032.html http://www.itpub.net/196032.html


作者 kiswind ( EBS使用 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期二, 四月 03, 2007

Discoverer 汇总小结

 

Discoverer的汇总是只能按显示出来的字段进行group by
这次的开发中发现了一些小小的注意事项
包括
1.汇总前把有除出来的有小数点的先进行TRUNC(字段,4),保证在小数点18位以后也一致
p.s. 查看小数点的话用trim
2.汇总的话自动使用sum字段,如果后面的字段要使用这个汇总字段也要手工加上sum,并且最好数字字段都加上nvl。


 

作者 kiswind ( Discoverer ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期四, 三月 08, 2007

REP-1216:has an illegal print condition

 



>
> You can also check with the following solutions from Metalink:
>
> SOLUTION DESCRIPTION:
> >
> Objects in the margin region are restarted on every physical page. As a
> result, not all print condition types make sense for margin objects.
> Because
> objects are restarted on every page, it is as if you are always on the
> first
>
> page of the object.
>
> The print condition FIRST is the same as the print condition ALL.
>
> The print conditions LAST and ALL BUT LAST are invalid because "LAST" is
> never
> reached.
>
> The print condition ALL BUT FIRST causes the object to never appear
> because
> the object never goes beyond "FIRST" page.
>
> Thus, the only valid print conditions for the object are FIRST and ALL.
>
>
> **************************************************************************************
>
> *How to create a Reports with a frame displayed only at the bottom of
> the last page.*
> --------------------------------------------------------------------
>
> To display a frame only on the last page of a "repeating frame" the
> properties "Print Object On" and "Base Printing On" must be used.
>
> The frame to be displayed only on the last page should be anchored to the
> repeating frame and the properties "Print Object On" and "Base Printing
> On"
> should be set like this:
>
>
> Print Object On : Last Page
> Base Printing On : Anchoring Object
>
>
> The frame to be displayed only on the last page should NOT be included
> in the frame it is anchored to, else an error :
>
> REP-1216 : xxx has an illegal print condition
> Hope this info will help you....
>

1.出现框的距离大一点
2.正确分组,然后 选择 Base Print On: Anchoring Object

 

而且使用此方法选择item框可以在文本显示中可以保持换页面的时候没有空行


 

作者 kiswind ( report技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期二, 十一月 28, 2006

The MDS repository 错误

 

忙活了一下午装个OAF

一直报出

The MDS repository is incompatible with the middle tier. Repository version "9.0.3.6.0_323" is older than minimum repository version "9.0.5.0.0_242" required. Please upgrade the MDS repository to at least the minimum version specified.

 

结果到了网上查出是

The jdeveloper you are using is not compatible with the db instance you are running against. There is no jdeveloper with OAExt available for public consumption, Jdeveloper with OAExt was available only with 11.5.10.

think currently Oracle does not support JDev Development on fwk 5.7. I have worked in a situation like this (Apps 11.5.9, Fwk 5.7H) and i had to develop the entire page, compile it then import to MDS using XMLImporter before testing. You still can develop pages , but you cannot use embedded OC4J to test them as you are not on 11.5.10. Also, you need an 11.5.10 instance to create your Entities and View Objects, because BC4J must be connected to a 5.10 data source when creating these objects. Yet once you create and compile it, you can move the .class and .xml files to the server running 5.7H, import the pages, bounce apache and test it.
If you need further information please post here...

http://forums.oracle.com/forums/thread.jspa?threadID=374296

狠狠郁闷一把


 

作者 kiswind ( JDEVELOP ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

星期一, 十一月 20, 2006

环境变量

 

环境变量

begin
fnd_global.apps_initialize
(
user_id => 0,
resp_id => 5XXXXX,
resp_appl_id => 7XX
);
end;


 

作者 kiswind ( pl/sql使用技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

ora-01041内部错误,hostdef扩展名不存在

 

ora-01041内部错误,hostdef扩展名不存在

oracle服务器重启了以后,但SQLPLUS能进,本机不能打开数据库,
但是与服务器连接的客户端能连接上数据库且能访问其中数据,


oracle中的tnsnames.ora文件内容如下:

# TNSNAMES.ORA Network Configuration File: D:OracleOra81networkadmintnsnames.ora
# Generated by Oracle configuration tools.

MIS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.5)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = eguomis)
)
)


 

作者 kiswind ( pl/sql使用技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

REP-1219错误

 

Report Build error is REP-1219?

the error is : Rep-REP-1219 has no size --length or width is zero

REP-1219: 'R1的大小没有设置 -- 长度或宽度为零
最早遇到的错误

为report内格式的错误

使用的方法是

 

The best way to solve this issue is to convert the file.
File>Administration>Convert...(navigation for 6i)
Tools>File Conversions.... (navigation for 9i)
1. Select the Source and Destination(preferable take a new location)
2. Change the Destination Type to .RDF
3. Switch to Option tab
4. Change Destination Unit to "Character".

是要还是转换成rdf ,但是转换过了,问题依旧


 

作者 kiswind ( report技巧 ) :: 最新回复 (0) :: 静态链接网址 :: 引用 (0)

关于srw的总结

 

1.在报表触发器BeforeReport中调用用户出口函数 FND SRWINIT 来初始化环境:取得并发程序相关信息和预制文件信息
function BeforeReport return boolean is
begin
SRW.USER_EXIT('FND SRWINIT');
srw.reference( :P_COA_ID );------------帐套,必须在report和ebs里都定义这个参数不然会报错SRW.REFERENCE 将引用的对象添加到构造依赖列表中,让Report在触发初始化构造的时候对值进行测定
srw.user_exit('FND FLEXSQL --------------------在报表中调用 FND FLEXIDVAL来动态设置显示的弹性域数据
CODE = "GL#" ------‘GL#’是帐户关键性弹性域的代码;code:弹性域编码
NUM=":P_COA_ID" ---------包括弹性域结构ID的词义变量
APPL_SHORT_NAME = "SQLGL"-----弹性域对应的应用简称
OUTPUT=":ACC_SELECT_ALL" -------------output:用来存贮SQL语句的词义变量(Placeholder)

TABLEALIAS="c")--------如果使用表别名,制定弹性域对应表的别名

MODE="SELECT" "----SELECT 按照内部的格式取出所有段值

DISPLAY="ALL"');---指定有多少段是需要显示的,默认值为 ALL;如果只希望显示其中的一段,
可以通过指定段名或者段号码来实现
return (TRUE);
end;

 

 

2. 在报表触发器AfterReport中调用用户出口函数 FND SRWEXIT 来释放用户出口函数中使用的内存,USER_EXIT是一个用户出口函数,用于取得帐户段描

function AfterReport return boolean is
begin
SRW.USER_EXIT('FND SRWEXIT');
return (TRUE);
end;

3.在字段内

设置

function ACC_flex_dataFormula return VARCHAR2 is
begin
srw.reference(:ACC_flex);
srw.reference( :P_COA_ID );
srw.user_exit('FND FLEXIDVAL
CODE="GL#"
NUM=":P_COA_ID"
APPL_SHORT_NAME="SQLGL"
DATA=":ACC_FLEX"
VALUE=":ACC_FLEX_DATA"
DISPLAY="ALL"');
return(:ACC_FLEX_DATA);
end;

 

function ACC_FLEX_DESCFormula return Char is
begin
srw.reference(:ACC_flex);
srw.reference( :P_COA_ID );
srw.user_exit('FND FLEXIDVAL
CODE="GL#"
NUM=":P_COA_ID"
APPL_SHORT_NAME="SQLGL"
DATA=":ACC_FLEX"
FULL_DESCRIPTION=":ACC_FLEX_DESC"
DISPLAY="ALL"');

return(REPLACE(REPLACE(REPLACE(:ACC_flex_desc,'南京本部'),'缺省'),'无'));
end;

 

4.做一个cp acc_select_all

value is null 为

(c.segment1||'n'||c.segment2||'n'||

c.segment3||'n'||c.segment4||'n'||c.segment5||'n'||

c.segment6||'n'||c.segment7)

具体按要选择的段落分类

 

5.在报表的SqL里写

select
&acc_select_all acc_flex,

 

http://kiswind.itpub.net/

你可能感兴趣的:(ora学习)