Data update job
- [
- SysSetupTable(tablestr(TableName)),
- SysSetupConfig(true, 300)
- ]
- class CPSysSetupTableName implements SysSetup
- {
- public void loadData()
- {
- DataArea dataArea;
- while select id from dataArea
- where dataArea.isVirtual == NoYes::No
- && dataArea.id != 'DAT'
- {
- changecompany(dataArea.id)
- {
- ttsbegin;
- //Some data update logic
- ttscommit;
- }
- }
- }
- }
Testing
To check that data update job runs correct on dev environment we can create temporary runnable class
- internal final class RunnableClass1
- {
- public static void main(Args _args)
- {
- CPSysSetupTableName sysSetup = new CPSysSetupTableName();
- sysSetup.loadData();
- }
- }
To run runnable class from user interface
/?mi=SysClassRunner&cls=RunnableClass1