Skip to main content

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.

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.

 


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? 


@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. 


@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!


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


@dsj That worked - thank you!


Reply