DAL, Data Access Layer is a new concept introduced in higher versions of Baan, from Baan V onwards. The very reason of introducing the same, was to have a common platform to write all the common Business Logics, and operations occurring on a table, rather than having the logics scattered in functions, scripts and libraries. This brought to the table a very convenient way of addressing logical changes which happens over time period. So going forward if any changes have to be addressed on a specific table we just have to traverse through the DAL of that table and check the existing logic and then build your logic on top of it or replace the existing logics.
All said and done, debugging a DAL is pretty much easy as debugging any script, library or any other functions.
I am not sure if you have encountered a problem where in you put the DAL in debug mode using the following approach.
Select the table for which the DAL has to be debugged using session table definition, ttadv4520m000.
Double click on the selected table, the following session will open. Here select the appropriate VRC and then click on debugger icon.
Select the appropriate VRC and Right click and select the Compile with Options -> Debugger.
This will put the DAL object in debugger mode.
Now to test whether DAL is in debugger mode, Open General Table Display (ttaad4500), find the table in GTD and ensure DAL is active and in choice input ‘Y’(if user language is English).
If DAL object is in debug mode, then when you input ‘Y’ in the choice field, a debugger screen will open.
In few cases the debugger screen might not open, the reason behind this would be the DAL object might not have gone in to debug mode, when you carried out the above steps.
The Solution to this, when you are compiling the DAL script in debugger mode, ensure that all instances of the table should be closed i.e.
a) General Table maintenance with the table opened
b) General Table Display with the table opened
c) Any session accessing the DAL table
d) Any function/libraries accessing the DAL table
e) Any third party applications accessing the DAL table
f) Any software components accessing the DAL table
We need to ensure any instances of the above probabilities are closed on the server where you are planning to put the object in debugger mode.
In case of UNIX OS, you can use grep the processes which are being run on the server to ensure that no other person is accessing any software components related to the DAL table under considerations are closed.
Once all instances are closed, you can then go and debug the object as specified in the step above. This will ensure the debug object is created and you can then use the debugging option in the debugger screen to debug the issue step by step or with breakpoints whichever appropriate.
If you have faced similar issues and if there is any better method to trace the users using the components which has dependency on the table, then please use this medium to share across your experience. This will hugely benefit people in Baan World.