View Single Post
  #3 (permalink)  
Old August 25th, 2008, 21:15
namitsinghi namitsinghi is offline
Junior Member
 
Join Date: Sep 2007
Posts: 6
Groans: 0
Groaned at 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
namitsinghi is on a distinguished road
Re: VPD PROFILE Error

Added the condition : (DOMAIN_NAME = SYS_CONTEXT('gl_user_ctx','domain_name')) OR <above query> for the Read/Write predicate and the issue is resolved. This this, I am able to insert new Order Base.

But now facing another issue: Inserting new Order Base manually works fine. But create new Order base by copy from another order base, get the error:
{? = call vpd.is_domain_writeable(?,?)=null}; inParams=[OB_ORDER_BASE, FWD]; outParamType=class java.lang.String
Checked function vpd.is_domain_writeable and determined that the issue is in select statement: v_select_stm. Dynamically generated v_select_stm is:

select 1 from domain where domain_name = 'FWD'
and (DOMAIN_NAME = SYS_CONTEXT('gl_user_ctx','domain_name')) OR EXISTS (SELECT 1 FROM ob_line obl, LOCATION_CORPORATION lcr WHERE lcr.LOCATION_GID = obl.SOURCE_LOCATION_GID AND obl.order_base_gid = OB_ORDER_BASE.order_base_gid AND lcr.CORPORATION_GID = SYS_CONTEXT('gl_user_ctx','CORPORATION_GID'))
and EXISTS ( SELECT 1 FROM domain_write_grants_made_v WHERE grantee_domain LIKE SYS_CONTEXT('gl_user_ctx','vpd_domain_name') AND domain_name LIKE grantor_domain AND table_name = 'OB_ORDER_BASE')

The above query will obviously fail. But not sure on how to modify the predicate such that query will work fine in Copy Order Base also. Help appreciated.
Reply With Quote