Skip to main content
Question

IAL issue

  • January 15, 2025
  • 3 replies
  • 24 views

Forum|alt.badge.img+10

Hoping some one can help, when I run the following code in PL/SQL developer it runs without an issue - however when I put the same code into an IAL no records are created.  Why would that be please ?

 

With Rowsnum As (
Select to_char(dt,'dd/mm/yyyy') dt, row_number() Over( Order by dt) rn
From ( 
 SELECT ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate) -366
+ level dt
  from   dual
 connect by level <= ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate)      
 - (ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate)-366)
) rws 
where  to_char ( dt, 'fmday', 'nls_date_language = English'  ) = 'monday'
),


RqdParts As (
select part_no, ifsapp.Inventory_Part_API.Get_Description(CONTRACT,PART_NO) part_description, Contract
FROM ifsapp.Inventory_Part
where contract Not In ('CPH','CTM','VMS','CGP') 
--and part_no In ('WMPI10067','500086536','WSBB10501','WMVA10007')
and Nvl(Substr(ifsapp.Inventory_Part_API.Get_Accounting_Group(contract,part_no),1,2),'Y') Not In ('IS','PH')
)

select ip.part_no, ip.Part_description
, Sum( Nvl(quantity,0) ) quantity
, rn
, Substr(location_no,1,4) Warehouse, ip.contract Site, 'HIST' Row_Type
--, to_char(TRUNC(date_applied, 'DAY')+1,'dd/mm/yyyy')

from RqdParts ip Left Outer Join ifsapp.INVENTORY_TRANSACTION_HIST iph On ip.part_no=iph.part_no and ip.contract = iph.contract
     LEFT OUTER Join Rowsnum On to_char(TRUNC(date_applied, 'DAY')+1,'dd/mm/yyyy') = dt

where Substr(location_no,1,4) In ('M100','M200','M300','M400','M500') and direction='-' and
date_applied BETWEEN ifsapp.cd_user_util_api.Get_previous_period_end_date(sysdate) -366 and ifsapp.cd_user_util_api.Get_previous_period_end_date(sysdate)
Group by ip.part_no, ip.part_description
 , rn
, Substr(location_no,1,4), ip.contract

3 replies

Forum|alt.badge.img+7
  • Hero (Employee)
  • 47 replies
  • January 16, 2025

Hi ​@JannetteC,

Is this working in plsql developer when you login as IFSINFO(IAL_OWNER) user?


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 62 replies
  • January 16, 2025

Hi ​@subashfestus 

I have checked and it does not.

Thanks


Forum|alt.badge.img+7
  • Hero (Employee)
  • 47 replies
  • January 16, 2025

Hi ​@JannetteC,

Then the issue is with row level security(RLS). Views or methods used in the IAL should not have any inbuilt RLS in them. Use tables and methods without any inbuilt RLS filters.

Or grant the IFSINFO user access to those objects (Eg: company, site) but when using this approach whenever new objects are added they should be granted to IFSINFO user. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings