Skip to main content
Solved

Custom PL/SQL Function in IAL


Forum|alt.badge.img+4

I created a custom function within PL/SQL to calculate the number of business days between two dates, based on a particular IFS calendar. I’d like to use this in an IAL Object, but I’m getting an error that it is not-defined. How do I appropriately define it so the IAL Object will deploy without error? We are on IE 10.

Best answer by dsj

Hi @emiller3061 

 

Try to prefix the function call in the sql with &AO..CalculateBusinessDayFromOffset to see if it solves the problem.

Login to plsql developer with IAL Owner (IFSINFO) and see if the SQL returns results.

A better practice is to add the function inside a PLSQL package and deploy :)

 

Regards,

Damith

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+7
  • Hero (Employee)
  • 49 replies
  • May 6, 2024

Hi @emiller3061 
Have you used the &AO.. prefix before the API call when writing the IAL object?

Also use an alias for the expression.

Eg -:  

 

IAL objects are created under IFSINFO (IAL Owner) user and the APIs are under IFSAPP (app owner) user. So to use objects under IFSAPP user we have to specify the user/schema before object name.

 


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 9 replies
  • May 6, 2024

Yes, I am, the part in question is the custom function. If I have a custom function declared, must I have written an API for that function? 


Forum|alt.badge.img+7
  • Hero (Employee)
  • 49 replies
  • May 7, 2024

@emiller3061 I don’t quite understand what you meant. Where is this custom function defined?

I thought you defined that in one of the existing entity .plsql files. If you do that it will be automatically a part of that relevant entity API.

In IAL we can write a view and it supports what a standard view supports in Oracle. 


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 9 replies
  • May 22, 2024

@subashfestus 

I added some files to try to explain. When I attempt to create the IAL, I’m getting the error I described above, which I think corresponds to the CalculateBusinessDayFromOffset function that I defined. Attached is the script and a Word document with some screenshots to help. Please let me know what alterations are needed to load this as an IAL.

Thank you!


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 855 replies
  • Answer
  • May 22, 2024

Hi @emiller3061 

 

Try to prefix the function call in the sql with &AO..CalculateBusinessDayFromOffset to see if it solves the problem.

Login to plsql developer with IAL Owner (IFSINFO) and see if the SQL returns results.

A better practice is to add the function inside a PLSQL package and deploy :)

 

Regards,

Damith


Forum|alt.badge.img+4
  • Author
  • Do Gooder (Customer)
  • 9 replies
  • May 22, 2024

@dsj That worked - thank you!


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