Skip to main content
Solved

How to create an IAL from more than one view?


Forum|alt.badge.img+9

Hi, 

I want to create a Lobby Data Source which shows the sum of values stored in 3 views. Therefore, I need to create an IAL. But I struggle to get the desired result. I created the SQL Statement in the SQL Query Tool and it gives the result I want. But how do I implement the statement in an IAL? 

Your help is appreciated. 

The SQL Statement: 

select OPPORTUNITY_NO "ID", DESCRIPTION as Description, 'BO' "Type", EST_OPPORTUNITY_VALUE as Value
from BUSINESS_OPPORTUNITY
WHERE OBJSTATE <> (select ifsapp.BUSINESS_OPPORTUNITY_API.FINITE_STATE_ENCODE__('Cancelled') from dual) and OBJSTATE <> (select ifsapp.BUSINESS_OPPORTUNITY_API.FINITE_STATE_ENCODE__('Closed') from dual)
UNION
select QUOTATION_NO "ID", CATALOG_DESC as Description, 'SQ' "Type", ifsapp.Order_Quotation_Line_API.Get_Base_Sale_Price_Total(QUOTATION_NO, LINE_NO, REL_NO, LINE_ITEM_NO) as Value
from Order_Quotation_Line
WHERE OBJSTATE = (select ifsapp.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Planned') from dual) or OBJSTATE = (select ifsapp.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Rejected') from dual) or OBJSTATE = (select ifsapp.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Released') from dual) or OBJSTATE = (select ifsapp.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Revised') from dual)
 UNION
select contract_NO "ID", cf$_description as Description, 'SC' "Type", ifsapp.CONTRACT_REVISION_UTIL_API.Get_Contract_Sales_Value_Cc(CONTRACT_NO, REV_SEQ) as Value
from CONTRACT_REVISION_cfv
WHERE OBJSTATE <> (select ifsapp.SALES_CONTRACT_API.FINITE_STATE_ENCODE__('Cancelled') from dual)
AND (CF$_CONTRACT_STATUS = 'Enquiry' or CF$_CONTRACT_STATUS = 'Estimated' or CF$_CONTRACT_STATUS = 'Tendered')

Best answer by djay

Please use &AO..(double dot) instead of &AO. 

And the view CONTRACT_REVISION_cfv is missing &AO..

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

Forum|alt.badge.img+7

Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 77 replies
  • July 20, 2021

Hi @Oshada Samarasinghe , 

Thank you for the link. But I receive an error message when I want to deploy the IAL:

bind variables not allowed for data definition operations

Failed executing statement (ORA-01027: bind variables not allowed for data definition operations

 

My Select Statement: 

select OPPORTUNITY_NO "ID", DESCRIPTION as Description, 'BO' "Type", EST_OPPORTUNITY_VALUE as Value
from BUSINESS_OPPORTUNITY
WHERE OBJSTATE <> (select &AO.BUSINESS_OPPORTUNITY_API.FINITE_STATE_ENCODE__('Cancelled') from dual) and OBJSTATE <> (select &AO.BUSINESS_OPPORTUNITY_API.FINITE_STATE_ENCODE__('Closed') from dual)
UNION
select QUOTATION_NO "ID", CATALOG_DESC as Description, 'SQ' "Type", &AO.Order_Quotation_Line_API.Get_Base_Sale_Price_Total(QUOTATION_NO, LINE_NO, REL_NO, LINE_ITEM_NO) as Value
from Order_Quotation_Line
WHERE OBJSTATE = (select &AO.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Planned') from dual) or OBJSTATE = (select &AO.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Rejected') from dual) or OBJSTATE = (select &AO.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Released') from dual)
or OBJSTATE = (select &AO.ORDER_QUOTATION_LINE_API.FINITE_STATE_ENCODE__('Revised') from dual)
 UNION
select contract_NO "ID", cf$_description as Description, 'SC' "Type", &AO.CONTRACT_REVISION_UTIL_API.Get_Contract_Sales_Value_Cc(CONTRACT_NO, REV_SEQ) as Value
from CONTRACT_REVISION_cfv
WHERE OBJSTATE <> (select &AO.SALES_CONTRACT_API.FINITE_STATE_ENCODE__('Cancelled') from dual)
AND (CF$_CONTRACT_STATUS = 'Enquiry' or CF$_CONTRACT_STATUS = 'Estimated' or CF$_CONTRACT_STATUS = 'Tendered')


Forum|alt.badge.img+7
  • Hero (Customer)
  • 27 replies
  • Answer
  • July 20, 2021

Please use &AO..(double dot) instead of &AO. 

And the view CONTRACT_REVISION_cfv is missing &AO..


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 77 replies
  • July 20, 2021

Thank you @djay

That did the job.


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