Standard Tables functions in AL
Hello
Not able to get Local functions defined in standard tables in AL while creating extension. Any idea how to get these functions in extensions?
Regards Amol
I'm not sure I understand.
The local functions are local to the object the are defined in and can not be called from other objects. This is not new to extensions.
Can you share more details about the problem?
Here is scenario I am creating extension for Sales Line table and in sales line table we have function called 'GetSalesheader' which is define as local. I used this function in my customized procedure but it is showing error The GetSalesHeader does not exist in current context I try to use Rec. GetSalesHeader also but still same issue
The local functions (like GetSalesHeader) are local to the defining object. The tableextension is considered a separate object from the base table.
The reason behind this is that the developer of the original object should have the possibility of hiding functions that he/she for some reason don't want exposed. E.g. planning to refactor them later, not ready as a public API, security, ...
In this particular case it would probably make sense to have the GetSalesHeader function available to extensions for the SalesLine table, but for now we don't have support for that. It is either local or public.
I think we need to have it in extension or else we need to write our own program/function for the same.