├── .abapgit.xml ├── LICENSE ├── README.md └── src ├── package.devc.xml ├── zaps_appid.doma.xml ├── zaps_appid.dtel.xml ├── zaps_configid.doma.xml ├── zaps_configid.dtel.xml ├── zaps_demo ├── package.devc.xml ├── zaps_demo.fugr.lzaps_demotop.abap ├── zaps_demo.fugr.lzaps_demotop.xml ├── zaps_demo.fugr.saplzaps_demo.abap ├── zaps_demo.fugr.saplzaps_demo.xml ├── zaps_demo.fugr.xml ├── zaps_demo.fugr.z_aps_demo_func_executable.abap ├── zaps_demo_execute_func_dia.prog.abap ├── zaps_demo_execute_func_dia.prog.xml ├── zaps_demo_execute_funcunit.prog.abap ├── zaps_demo_execute_funcunit.prog.xml ├── zaps_demo_execute_object.prog.abap ├── zaps_demo_execute_object.prog.xml ├── zaps_demo_execute_report.prog.abap ├── zaps_demo_execute_report.prog.xml ├── zaps_demo_report_executable.prog.abap ├── zaps_demo_report_executable.prog.xml ├── zcl_aps_demo_object_executable.clas.abap ├── zcl_aps_demo_object_executable.clas.xml ├── zcl_aps_demo_object_select_fun.clas.abap ├── zcl_aps_demo_object_select_fun.clas.xml ├── zcl_aps_demo_object_select_obj.clas.abap ├── zcl_aps_demo_object_select_obj.clas.xml ├── zcl_aps_demo_object_select_rep.clas.abap └── zcl_aps_demo_object_select_rep.clas.xml ├── zaps_packetization ├── package.devc.xml ├── zcl_aps_object_packetizer.clas.abap ├── zcl_aps_object_packetizer.clas.xml ├── zcl_aps_object_packetizer_fact.clas.abap ├── zcl_aps_object_packetizer_fact.clas.xml ├── zcl_aps_object_packetizer_roro.clas.abap ├── zcl_aps_object_packetizer_roro.clas.xml ├── zif_aps_object_packetizer.intf.abap └── zif_aps_object_packetizer.intf.xml ├── zaps_parameter ├── package.devc.xml ├── zaps_obj_sel_classname.dtel.xml ├── zaps_parameter.msag.xml ├── zcl_aps_objectselectorfactory.clas.abap ├── zcl_aps_objectselectorfactory.clas.xml ├── zcl_aps_parameterset_factory.clas.abap ├── zcl_aps_parameterset_factory.clas.xml ├── zcl_aps_parameterset_func.clas.abap ├── zcl_aps_parameterset_func.clas.testclasses.abap ├── zcl_aps_parameterset_func.clas.xml ├── zcl_aps_parameterset_object.clas.abap ├── zcl_aps_parameterset_object.clas.xml ├── zcl_aps_parameterset_report.clas.abap ├── zcl_aps_parameterset_report.clas.testclasses.abap ├── zcl_aps_parameterset_report.clas.xml ├── zcx_aps_unknown_executable.clas.abap ├── zcx_aps_unknown_executable.clas.xml ├── zcx_aps_unknown_parameter.clas.abap ├── zcx_aps_unknown_parameter.clas.xml ├── zif_aps_objectselector.intf.abap ├── zif_aps_objectselector.intf.xml ├── zif_aps_parameterset.intf.abap ├── zif_aps_parameterset.intf.xml ├── zif_aps_parameterset_func.intf.abap ├── zif_aps_parameterset_func.intf.xml ├── zif_aps_parameterset_object.intf.abap ├── zif_aps_parameterset_object.intf.xml ├── zif_aps_parameterset_report.intf.abap └── zif_aps_parameterset_report.intf.xml ├── zaps_settings ├── package.devc.xml ├── zaps_change_info.tabl.xml ├── zaps_changing_timestamp.dtel.xml ├── zaps_changing_transact.dtel.xml ├── zaps_changing_user.dtel.xml ├── zaps_creating_timestamp.dtel.xml ├── zaps_creating_user.dtel.xml ├── zaps_creation_info.tabl.xml ├── zaps_creation_transact.dtel.xml ├── zaps_executable_name.dtel.xml ├── zaps_executable_type.doma.xml ├── zaps_executable_type.dtel.xml ├── zaps_job_prefix.dtel.xml ├── zaps_max_package_size.doma.xml ├── zaps_max_package_size.dtel.xml ├── zaps_max_parallel_tasks.doma.xml ├── zaps_max_parallel_tasks.dtel.xml ├── zaps_paraapp.tabl.xml ├── zaps_paraconf.tabl.xml ├── zaps_run_id.dtel.xml ├── zaps_run_status.doma.xml ├── zaps_run_status.dtel.xml ├── zaps_runs.tabl.xml ├── zaps_settings.msag.xml ├── zaps_task_type.doma.xml ├── zaps_task_type.dtel.xml ├── zaps_wait_until_finished.dtel.xml ├── zcl_aps_settings.clas.abap ├── zcl_aps_settings.clas.xml ├── zcl_aps_settings_factory.clas.abap ├── zcl_aps_settings_factory.clas.xml ├── zcx_aps_settings_unknown_app.clas.abap ├── zcx_aps_settings_unknown_app.clas.xml ├── zcx_aps_settings_unknown_conf.clas.abap ├── zcx_aps_settings_unknown_conf.clas.xml ├── zcx_aps_settings_unknown_run.clas.abap ├── zcx_aps_settings_unknown_run.clas.xml ├── zif_aps_settings.intf.abap ├── zif_aps_settings.intf.xml ├── ztd_aps_settings.clas.abap └── ztd_aps_settings.clas.xml ├── zaps_tasks ├── package.devc.xml ├── zaps_package.tabl.xml ├── zaps_packages.ttyp.xml ├── zaps_parameter_set.ttyp.xml ├── zaps_parameter_set_list.ttyp.xml ├── zaps_parameter_set_list_func.ttyp.xml ├── zaps_parameter_set_list_object.ttyp.xml ├── zaps_task.msag.xml ├── zaps_task_batch │ ├── package.devc.xml │ ├── zaps_batch_job_key.tabl.xml │ ├── zaps_batch_job_list.ttyp.xml │ ├── zaps_batch_task_run.prog.abap │ ├── zaps_batch_task_run.prog.xml │ ├── zaps_task_chain.ttyp.xml │ ├── zaps_task_chains.ttyp.xml │ ├── zcl_aps_batch_job.clas.abap │ ├── zcl_aps_batch_job.clas.xml │ ├── zcl_aps_batch_job_factory.clas.abap │ ├── zcl_aps_batch_job_factory.clas.xml │ ├── zcl_aps_task_starter_batch.clas.abap │ ├── zcl_aps_task_starter_batch.clas.testclasses.abap │ ├── zcl_aps_task_starter_batch.clas.xml │ ├── zcx_aps_task_job_creation.clas.abap │ ├── zcx_aps_task_job_creation.clas.xml │ ├── zcx_aps_task_job_event_raise.clas.abap │ ├── zcx_aps_task_job_event_raise.clas.xml │ ├── zcx_aps_task_job_release.clas.abap │ ├── zcx_aps_task_job_release.clas.xml │ ├── zcx_aps_task_job_submit.clas.abap │ ├── zcx_aps_task_job_submit.clas.xml │ ├── zif_aps_batch_job.intf.abap │ ├── zif_aps_batch_job.intf.xml │ ├── ztd_aps_batch_job.clas.abap │ └── ztd_aps_batch_job.clas.xml ├── zaps_task_dialog │ ├── package.devc.xml │ ├── zaps_starter_dialog.fugr.lzaps_starter_dialogtop.abap │ ├── zaps_starter_dialog.fugr.lzaps_starter_dialogtop.xml │ ├── zaps_starter_dialog.fugr.saplzaps_starter_dialog.abap │ ├── zaps_starter_dialog.fugr.saplzaps_starter_dialog.xml │ ├── zaps_starter_dialog.fugr.xml │ ├── zaps_starter_dialog.fugr.z_aps_task_starter_dialog.abap │ ├── zcl_aps_task_starter_dialog.clas.abap │ └── zcl_aps_task_starter_dialog.clas.xml ├── zaps_task_storage │ ├── package.devc.xml │ ├── zaps_task_status.doma.xml │ ├── zaps_task_status.dtel.xml │ ├── zaps_task_storage.msag.xml │ ├── zaps_task_storage_key.tabl.xml │ ├── zaps_taskstatus.tabl.xml │ ├── zaps_taskstore.tabl.xml │ ├── zcl_aps_task_storage_db.clas.abap │ ├── zcl_aps_task_storage_db.clas.xml │ ├── zcl_aps_task_storage_factory.clas.abap │ ├── zcl_aps_task_storage_factory.clas.xml │ ├── zcx_aps_task_serialization.clas.abap │ ├── zcx_aps_task_serialization.clas.xml │ ├── zcx_aps_task_status.clas.abap │ ├── zcx_aps_task_status.clas.xml │ ├── zcx_aps_task_storage.clas.abap │ ├── zcx_aps_task_storage.clas.xml │ ├── zif_aps_task_storage.intf.abap │ └── zif_aps_task_storage.intf.xml ├── zaps_taskid.dtel.xml ├── zcl_aps_executable_object.clas.abap ├── zcl_aps_executable_object.clas.xml ├── zcl_aps_task.clas.abap ├── zcl_aps_task.clas.xml ├── zcl_aps_task_factory.clas.abap ├── zcl_aps_task_factory.clas.xml ├── zcl_aps_task_functionunit.clas.abap ├── zcl_aps_task_functionunit.clas.xml ├── zcl_aps_task_object.clas.abap ├── zcl_aps_task_object.clas.testclasses.abap ├── zcl_aps_task_object.clas.xml ├── zcl_aps_task_report.clas.abap ├── zcl_aps_task_report.clas.xml ├── zcl_aps_task_starter.clas.abap ├── zcl_aps_task_starter.clas.xml ├── zcl_aps_task_starter_factory.clas.abap ├── zcl_aps_task_starter_factory.clas.xml ├── zcx_aps_executable_call_error.clas.abap ├── zcx_aps_executable_call_error.clas.xml ├── zcx_aps_job_creation_error.clas.abap ├── zcx_aps_job_creation_error.clas.xml ├── zcx_aps_jobs_aborted.clas.abap ├── zcx_aps_jobs_aborted.clas.xml ├── zcx_aps_task_creation_error.clas.abap ├── zcx_aps_task_creation_error.clas.xml ├── zcx_aps_task_instanciation_err.clas.abap ├── zcx_aps_task_instanciation_err.clas.xml ├── zcx_aps_task_invalid_class.clas.abap ├── zcx_aps_task_invalid_class.clas.xml ├── zcx_aps_task_unknown_exec_type.clas.abap ├── zcx_aps_task_unknown_exec_type.clas.xml ├── zif_aps_task.intf.abap ├── zif_aps_task.intf.xml ├── zif_aps_task_starter.intf.abap ├── zif_aps_task_starter.intf.xml ├── ztd_aps_task_object.clas.abap └── ztd_aps_task_object.clas.xml ├── zcl_parallelization_service.clas.abap ├── zcl_parallelization_service.clas.xml ├── zif_parallelization_service.intf.abap └── zif_parallelization_service.intf.xml /.abapgit.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | E 6 | /src/ 7 | FULL 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 BiberM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ABAP Parallelization Services 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_appid.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_APPID 7 | E 8 | CHAR 9 | 000050 10 | 000050 11 | X 12 | APS: AppID 13 | E 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_appid.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_APPID 7 | E 8 | ZAPS_APPID 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: AppID 15 | Application ID 16 | AppID 17 | Application ID 18 | Application ID 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_configid.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CONFIGID 7 | E 8 | CHAR 9 | 000050 10 | 000050 11 | X 12 | APS: ConfigID 13 | E 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_configid.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CONFIGID 7 | E 8 | ZAPS_CONFIGID 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: ConfigID 15 | Configuration ID 16 | ConfigID 17 | Configuration ID 18 | Configuration ID 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_demo/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Demo 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.lzaps_demotop.abap: -------------------------------------------------------------------------------- 1 | FUNCTION-POOL ZAPS_DEMO. "MESSAGE-ID .. 2 | 3 | * INCLUDE LZAPS_DEMOD... " Local class definition 4 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.lzaps_demotop.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | LZAPS_DEMOTOP 7 | S 8 | D$ 9 | I 10 | S 11 | X 12 | D$S 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.saplzaps_demo.abap: -------------------------------------------------------------------------------- 1 | ******************************************************************* 2 | * System-defined Include-files. * 3 | ******************************************************************* 4 | INCLUDE LZAPS_DEMOTOP. " Global Declarations 5 | INCLUDE LZAPS_DEMOUXX. " Function Modules 6 | 7 | ******************************************************************* 8 | * User-defined Include-files (if necessary). * 9 | ******************************************************************* 10 | * INCLUDE LZAPS_DEMOF... " Subroutines 11 | * INCLUDE LZAPS_DEMOO... " PBO-Modules 12 | * INCLUDE LZAPS_DEMOI... " PAI-Modules 13 | * INCLUDE LZAPS_DEMOE... " Events 14 | * INCLUDE LZAPS_DEMOP... " Local class implement. 15 | * INCLUDE LZAPS_DEMOT99. " ABAP Unit tests 16 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.saplzaps_demo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | SAPLZAPS_DEMO 7 | S 8 | D$ 9 | F 10 | S 11 | E 12 | X 13 | D$S 14 | X 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | APS: Demo 6 | 7 | LZAPS_DEMOTOP 8 | SAPLZAPS_DEMO 9 | 10 | 11 | 12 | Z_APS_DEMO_FUNC_EXECUTABLE 13 | APS: Demo Function Unit executable 14 | 15 | 16 | I_INDEX 17 | X 18 | I 19 | 20 | 21 | 22 | 23 | E_SQUARE 24 | X 25 | I 26 | 27 | 28 | 29 | 30 | I_INDEX 31 | P 32 | 33 | 34 | E_SQUARE 35 | P 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo.fugr.z_aps_demo_func_executable.abap: -------------------------------------------------------------------------------- 1 | function Z_APS_DEMO_FUNC_EXECUTABLE. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" REFERENCE(I_INDEX) TYPE I 6 | *" EXPORTING 7 | *" REFERENCE(E_SQUARE) TYPE I 8 | *"---------------------------------------------------------------------- 9 | try. 10 | data(randomWaitSeconds) = cl_abap_random_int=>create( 11 | seed = cl_abap_random=>seed( ) 12 | min = 5 13 | max = 20 14 | )->get_next( ). 15 | catch cx_abap_random. 16 | randomWaitSeconds = 5. 17 | endtry. 18 | 19 | wait up to randomWaitSeconds seconds. 20 | 21 | e_square = i_index * i_index. 22 | 23 | message i319(01) 24 | with |{ i_index }^2 = { e_square }|. 25 | 26 | 27 | 28 | ENDFUNCTION. 29 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_func_dia.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_demo_execute_func_dia 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_demo_execute_func_dia. 7 | " This part is normally done in table customizing 8 | " due to git restrictions this is done within the report 9 | data(appDefinition) = value zaps_paraapp( 10 | appid = 'APS_DEMO_FUNCUNIT_DIA' 11 | typeofexecutable = 'F' 12 | nameofexecutable = 'Z_APS_DEMO_FUNC_EXECUTABLE' 13 | objectselectionclass = 'ZCL_APS_DEMO_OBJECT_SELECT_FUN' 14 | ). 15 | 16 | modify zaps_paraapp 17 | from @appDefinition. 18 | 19 | 20 | data(configDefinition) = value zaps_paraconf( 21 | appid = 'APS_DEMO_FUNCUNIT_DIA' 22 | configid = 'DEMO_FUNCUNIT_5_1_DIA' 23 | parallelizationtype = 'D' 24 | maxpackagesize = 1 25 | maxparalleltasks = 5 26 | jobnameprefix = 'ZAPS_DEMO_' 27 | waituntilfinished = abap_true 28 | ). 29 | 30 | modify zaps_paraconf 31 | from @configDefinition. 32 | 33 | 34 | " this part needs to be done in every usage 35 | data(go_parallelization) = new zcl_parallelization_service( ). 36 | 37 | try. 38 | go_parallelization->zif_parallelization_service~start( 39 | i_appid = 'APS_DEMO_FUNCUNIT_DIA' 40 | i_configid = 'DEMO_FUNCUNIT_5_1_DIA' 41 | ). 42 | 43 | data(parameterSets) = go_parallelization->zif_parallelization_service~getFuncParameterSets( ). 44 | 45 | data(outputText) = value string( ). 46 | 47 | loop at parameterSets 48 | into data(parameterSet). 49 | data(square) = parameterSet->getExportingValue( 'E_SQUARE' ). 50 | 51 | assign square->* 52 | to field-symbol(). 53 | 54 | if sy-subrc = 0. 55 | outputText = outputText && |\ne_square = { }|. 56 | endif. 57 | endloop. 58 | 59 | cl_demo_output=>display_text( outputText ). 60 | 61 | catch zcx_aps_settings_unknown_app 62 | zcx_aps_settings_unknown_conf 63 | zcx_aps_task_creation_error 64 | zcx_aps_job_creation_error 65 | zcx_aps_unknown_parameter 66 | into data(parallelizationError). 67 | message parallelizationError 68 | type 'E'. 69 | endtry. 70 | 71 | 72 | " Again this is not necessary within real world usage 73 | delete from zaps_paraapp 74 | where appid = 'APS_DEMO_FUNCUNIT_DIA'. 75 | 76 | delete from zaps_paraconf 77 | where appid = 'APS_DEMO_FUNCUNIT_DIA' 78 | and configid = 'DEMO_FUNCUNIT_5_1_DIA'. 79 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_func_dia.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_DEMO_EXECUTE_FUNC_DIA 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | APS: Demo which executes a function unit in dialog tasks 17 | 56 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_funcunit.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_demo_execute_funcunit 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_demo_execute_funcunit. 7 | " This part is normally done in table customizing 8 | " due to git restrictions this is done within the report 9 | data(appDefinition) = value zaps_paraapp( 10 | appid = 'APS_DEMO_FUNCUNIT' 11 | typeofexecutable = 'F' 12 | nameofexecutable = 'Z_APS_DEMO_FUNC_EXECUTABLE' 13 | objectselectionclass = 'ZCL_APS_DEMO_OBJECT_SELECT_FUN' 14 | ). 15 | 16 | modify zaps_paraapp 17 | from @appDefinition. 18 | 19 | 20 | data(configDefinition) = value zaps_paraconf( 21 | appid = 'APS_DEMO_FUNCUNIT' 22 | configid = 'DEMO_FUNCUNIT_5_1_BATCH' 23 | parallelizationtype = 'B' 24 | maxpackagesize = 1 25 | maxparalleltasks = 5 26 | jobnameprefix = 'ZAPS_DEMO_' 27 | waituntilfinished = abap_true 28 | ). 29 | 30 | modify zaps_paraconf 31 | from @configDefinition. 32 | 33 | 34 | " this part needs to be done in every usage 35 | data(go_parallelization) = new zcl_parallelization_service( ). 36 | 37 | try. 38 | go_parallelization->zif_parallelization_service~start( 39 | i_appid = 'APS_DEMO_FUNCUNIT' 40 | i_configid = 'DEMO_FUNCUNIT_5_1_BATCH' 41 | ). 42 | 43 | data(parameterSets) = go_parallelization->zif_parallelization_service~getFuncParameterSets( ). 44 | 45 | data(outputText) = value string( ). 46 | 47 | loop at parameterSets 48 | into data(parameterSet). 49 | data(square) = parameterSet->getExportingValue( 'E_SQUARE' ). 50 | 51 | assign square->* 52 | to field-symbol(). 53 | 54 | if sy-subrc = 0. 55 | outputText = outputText && |\ne_square = { }|. 56 | endif. 57 | endloop. 58 | 59 | cl_demo_output=>display_text( outputText ). 60 | 61 | catch zcx_aps_settings_unknown_app 62 | zcx_aps_settings_unknown_conf 63 | zcx_aps_task_creation_error 64 | zcx_aps_job_creation_error 65 | zcx_aps_unknown_parameter 66 | zcx_aps_jobs_aborted 67 | into data(parallelizationError). 68 | message parallelizationError 69 | type 'E'. 70 | endtry. 71 | 72 | 73 | " Again this is not necessary within real world usage 74 | delete from zaps_paraapp 75 | where appid = 'APS_DEMO_FUNCUNIT'. 76 | 77 | delete from zaps_paraconf 78 | where appid = 'APS_DEMO_FUNCUNIT' 79 | and configid = 'DEMO_FUNCUNIT_5_1_BATCH'. 80 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_funcunit.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_DEMO_EXECUTE_FUNCUNIT 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | APS: Demo which executes a function unit 17 | 40 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_object.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_demo_execute_object 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_demo_execute_object. 7 | " This part is normally done in table customizing 8 | " due to git restrictions this is done within the report 9 | data(appDefinition) = value zaps_paraapp( 10 | appid = 'APS_DEMO_OBJECT' 11 | typeofexecutable = 'O' 12 | nameofexecutable = 'ZCL_APS_DEMO_OBJECT_EXECUTABLE' 13 | objectselectionclass = 'ZCL_APS_DEMO_OBJECT_SELECT_OBJ' 14 | ). 15 | 16 | modify zaps_paraapp 17 | from @appDefinition. 18 | 19 | 20 | data(configDefinition) = value zaps_paraconf( 21 | appid = 'APS_DEMO_OBJECT' 22 | configid = 'DEMO_OBJECT_5_1_BATCH' 23 | parallelizationtype = 'B' 24 | maxpackagesize = 1 25 | maxparalleltasks = 5 26 | jobnameprefix = 'ZAPS_DEMO_' 27 | waituntilfinished = abap_true 28 | ). 29 | 30 | modify zaps_paraconf 31 | from @configDefinition. 32 | 33 | 34 | " this part needs to be done in every usage 35 | data(go_parallelization) = new zcl_parallelization_service( ). 36 | 37 | try. 38 | go_parallelization->zif_parallelization_service~start( 39 | i_appid = 'APS_DEMO_OBJECT' 40 | i_configid = 'DEMO_OBJECT_5_1_BATCH' 41 | ). 42 | catch zcx_aps_settings_unknown_app 43 | zcx_aps_settings_unknown_conf 44 | zcx_aps_task_creation_error 45 | zcx_aps_job_creation_error 46 | zcx_aps_jobs_aborted 47 | into data(parallelizationError). 48 | message parallelizationError 49 | type 'E'. 50 | endtry. 51 | 52 | 53 | " Again this is not necessary within real world usage 54 | delete from zaps_paraapp 55 | where appid = 'APS_DEMO_OBJECT'. 56 | 57 | delete from zaps_paraconf 58 | where appid = 'APS_DEMO_OBJECT' 59 | and configid = 'DEMO_OBJECT_5_1_BATCH'. 60 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_object.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_DEMO_EXECUTE_OBJECT 7 | S 8 | D$ 9 | 1 10 | X 11 | D$S 12 | X 13 | 14 | 15 | 16 | R 17 | APS: Demo which executes an object 18 | 34 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_report.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_demo_execute_report 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_demo_execute_report. 7 | " This part is normally done in table customizing 8 | " due to git restrictions this is done within the report 9 | data(appDefinition) = value zaps_paraapp( 10 | appid = 'APS_DEMO_REPORT' 11 | typeofexecutable = 'R' 12 | nameofexecutable = 'ZAPS_DEMO_REPORT_EXECUTABLE' 13 | objectselectionclass = 'ZCL_APS_DEMO_OBJECT_SELECT_REP' 14 | ). 15 | 16 | modify zaps_paraapp 17 | from @appDefinition. 18 | 19 | 20 | data(configDefinition) = value zaps_paraconf( 21 | appid = 'APS_DEMO_REPORT' 22 | configid = 'DEMO_REPORT_5_1_BATCH' 23 | parallelizationtype = 'B' 24 | maxpackagesize = 1 25 | maxparalleltasks = 5 26 | jobnameprefix = 'ZAPS_DEMO_' 27 | waituntilfinished = abap_true 28 | ). 29 | 30 | modify zaps_paraconf 31 | from @configDefinition. 32 | 33 | 34 | " this part needs to be done in every usage 35 | data(go_parallelization) = new zcl_parallelization_service( ). 36 | 37 | try. 38 | go_parallelization->zif_parallelization_service~start( 39 | i_appid = 'APS_DEMO_REPORT' 40 | i_configid = 'DEMO_REPORT_5_1_BATCH' 41 | ). 42 | catch zcx_aps_settings_unknown_app 43 | zcx_aps_settings_unknown_conf 44 | zcx_aps_task_creation_error 45 | zcx_aps_job_creation_error 46 | zcx_aps_jobs_aborted 47 | into data(parallelizationError). 48 | message parallelizationError 49 | type 'E'. 50 | endtry. 51 | 52 | 53 | " Again this is not necessary within real world usage 54 | delete from zaps_paraapp 55 | where appid = 'APS_DEMO_REPORT'. 56 | 57 | delete from zaps_paraconf 58 | where appid = 'APS_DEMO_REPORT' 59 | and configid = 'DEMO_REPORT_5_1_BATCH'. 60 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_execute_report.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_DEMO_EXECUTE_REPORT 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | APS: Demo which executes a report 17 | 33 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_report_executable.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_demo_report_executable 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_demo_report_executable. 7 | parameters: 8 | p_index type i. 9 | 10 | try. 11 | data(randomWaitSeconds) = cl_abap_random_int=>create( 12 | seed = cl_abap_random=>seed( ) 13 | min = 5 14 | max = 20 15 | )->get_next( ). 16 | catch cx_abap_random. 17 | randomWaitSeconds = 5. 18 | endtry. 19 | 20 | wait up to randomWaitSeconds seconds. 21 | 22 | message i319(01) 23 | with |This is task number { p_index }|. 24 | -------------------------------------------------------------------------------- /src/zaps_demo/zaps_demo_report_executable.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_DEMO_REPORT_EXECUTABLE 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | APS: Demo Report to be executed in parallel 17 | 43 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_executable.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_demo_object_executable definition 2 | public 3 | final 4 | inheriting from zcl_aps_executable_object 5 | create public. 6 | 7 | public section. 8 | methods: 9 | start redefinition. 10 | protected section. 11 | private section. 12 | endclass. 13 | 14 | 15 | 16 | class zcl_aps_demo_object_executable implementation. 17 | method start. 18 | data(dataRef) = parameterSet->getdatareference( ). 19 | 20 | assign dataRef->* 21 | to field-symbol(). 22 | 23 | try. 24 | data(randomWaitSeconds) = cl_abap_random_int=>create( 25 | seed = cl_abap_random=>seed( ) 26 | min = 5 27 | max = 20 28 | )->get_next( ). 29 | catch cx_abap_random. 30 | randomWaitSeconds = 5. 31 | endtry. 32 | 33 | wait up to randomWaitSeconds seconds. 34 | 35 | message i319(01) 36 | with |This is task number { }|. 37 | endmethod. 38 | 39 | endclass. 40 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_executable.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_DEMO_OBJECT_EXECUTABLE 7 | E 8 | APS: Demo Objet to be executed 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_fun.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_demo_object_select_fun definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | 8 | interfaces: 9 | zif_aps_objectselector. 10 | 11 | protected section. 12 | private section. 13 | endclass. 14 | 15 | 16 | 17 | class zcl_aps_demo_object_select_fun implementation. 18 | method zif_aps_objectselector~calculateObjects. 19 | do 10 times. 20 | data(currentLoopCounter) = sy-index. 21 | 22 | data(singleExecutionParameters) = zcl_aps_parameterset_factory=>providefunctionunitparameters( i_settings ). 23 | 24 | singleExecutionParameters->addImporting( 25 | i_parametername = 'I_INDEX' 26 | i_parametervalue = ref #( currentLoopCounter ) 27 | ). 28 | 29 | singleExecutionParameters->addExporting( 'E_SQUARE' ). 30 | 31 | insert singleExecutionParameters 32 | into table result. 33 | enddo. 34 | endmethod. 35 | 36 | endclass. 37 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_fun.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_DEMO_OBJECT_SELECT_FUN 7 | E 8 | APS: Demo Object Selector for demo function unit 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_obj.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_demo_object_select_obj definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | 8 | interfaces: 9 | zif_aps_objectselector. 10 | 11 | protected section. 12 | private section. 13 | endclass. 14 | 15 | 16 | 17 | class zcl_aps_demo_object_select_obj implementation. 18 | method zif_aps_objectselector~calculateObjects. 19 | do 10 times. 20 | data(currentLoopCounter) = sy-index. 21 | 22 | data(singleExecutionParameters) = zcl_aps_parameterset_factory=>provideobjectparameters( i_settings ). 23 | 24 | singleExecutionParameters->setdatareference( ref #( currentLoopCounter ) ). 25 | 26 | insert singleExecutionParameters 27 | into table result. 28 | enddo. 29 | endmethod. 30 | 31 | endclass. 32 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_obj.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_DEMO_OBJECT_SELECT_OBJ 7 | E 8 | APS: Demo Object Selector for demo object 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_rep.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_demo_object_select_rep definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | 8 | interfaces: 9 | zif_aps_objectselector. 10 | 11 | protected section. 12 | private section. 13 | endclass. 14 | 15 | 16 | 17 | class zcl_aps_demo_object_select_rep implementation. 18 | method zif_aps_objectselector~calculateObjects. 19 | do 10 times. 20 | data(currentLoopCounter) = sy-index. 21 | 22 | data(singleExecutionParameters) = zcl_aps_parameterset_factory=>providereportparameters( i_settings ). 23 | 24 | singleExecutionParameters->addParameter( 25 | i_parametername = 'P_INDEX' 26 | i_parametervalue = conv #( currentLoopCounter ) 27 | ). 28 | 29 | insert singleExecutionParameters 30 | into table result. 31 | enddo. 32 | endmethod. 33 | 34 | endclass. 35 | -------------------------------------------------------------------------------- /src/zaps_demo/zcl_aps_demo_object_select_rep.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_DEMO_OBJECT_SELECT_REP 7 | E 8 | APS: Demo Object Selector for demo report 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_packetization/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Object Packetization 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_object_packetizer definition 2 | public 3 | abstract 4 | create public. 5 | 6 | public section. 7 | interfaces: 8 | zif_aps_object_packetizer 9 | all methods abstract. 10 | 11 | methods: 12 | constructor 13 | importing 14 | i_settings type ref to zif_aps_settings. 15 | 16 | protected section. 17 | data: 18 | settings type ref to zif_aps_settings. 19 | private section. 20 | endclass. 21 | 22 | 23 | 24 | class zcl_aps_object_packetizer implementation. 25 | method constructor. 26 | settings = i_settings. 27 | endmethod. 28 | 29 | endclass. 30 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_OBJECT_PACKETIZER 7 | E 8 | APS: object packetizer 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer_fact.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_object_packetizer_fact definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | provide 9 | importing 10 | i_settings type ref to zif_aps_settings 11 | returning 12 | value(result) type ref to zif_aps_object_packetizer. 13 | protected section. 14 | private section. 15 | endclass. 16 | 17 | 18 | 19 | class zcl_aps_object_packetizer_fact implementation. 20 | method provide. 21 | *///////// ToDo: different types from settings /////////////////* 22 | result = new zcl_aps_object_packetizer_roro( i_settings ). 23 | endmethod. 24 | 25 | endclass. 26 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer_fact.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_OBJECT_PACKETIZER_FACT 7 | E 8 | APS: Object Packetizer factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer_roro.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_object_packetizer_roro definition 2 | public 3 | inheriting from zcl_aps_object_packetizer 4 | final 5 | create public. 6 | 7 | public section. 8 | methods: 9 | zif_aps_object_packetizer~packetize redefinition. 10 | protected section. 11 | private section. 12 | methods: 13 | calculatePackageCount 14 | importing 15 | i_objects type ref to zaps_parameter_set_list 16 | returning 17 | value(result) type dec10_0, 18 | 19 | initializePackages 20 | importing 21 | i_objects type zaps_parameter_set_list 22 | returning 23 | value(result) type zaps_packages. 24 | endclass. 25 | 26 | 27 | 28 | class zcl_aps_object_packetizer_roro implementation. 29 | method zif_aps_object_packetizer~packetize. 30 | result = new #( ). 31 | 32 | result->* = initializePackages( i_objects ). 33 | 34 | loop at i_objects 35 | reference into data(object). 36 | " Modulo only works directly if index started with 0. But ABAP starts at 1. 37 | data(packageIndex) = ( ( sy-tabix - 1 ) mod lines( result->* ) ) + 1. 38 | 39 | " Meh, ABAP! Syntax check doesn't want that adressing directly in INSERT 40 | assign result->*[ packageIndex ] 41 | to field-symbol(). 42 | 43 | if sy-subrc <> 0. 44 | " As packageIndex is always <= lines( result->* ) this cannot happen! 45 | " (Modulo + 1) 46 | endif. 47 | 48 | insert object->* 49 | into table -selections[]. 50 | endloop. 51 | endmethod. 52 | 53 | 54 | method initializePackages. 55 | data(packageCount) = calculatePackageCount( ref #( i_objects ) ). 56 | 57 | do packageCount times. 58 | insert initial line 59 | into table result. 60 | enddo. 61 | endmethod. 62 | 63 | 64 | method calculatePackageCount. 65 | result = ceil( lines( i_objects->*[] ) / settings->getMaxPackageSize( ) ). 66 | endmethod. 67 | 68 | endclass. 69 | -------------------------------------------------------------------------------- /src/zaps_packetization/zcl_aps_object_packetizer_roro.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_OBJECT_PACKETIZER_RORO 7 | E 8 | APS: object packetizer round robin 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_packetization/zif_aps_object_packetizer.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_object_packetizer 2 | public. 3 | methods: 4 | "!

5 | "! Starts the object packetization of App with Config 6 | "! @parameter i_objects |

Object list to be packetized

7 | "! @parameter result |

Packages

8 | packetize 9 | importing 10 | i_objects type zaps_parameter_set_list 11 | returning 12 | value(result) type ref to zaps_packages. 13 | endinterface. 14 | -------------------------------------------------------------------------------- /src/zaps_packetization/zif_aps_object_packetizer.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_OBJECT_PACKETIZER 7 | E 8 | APS: Object Packetizer 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_parameter/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Parameter in and out 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_parameter/zaps_obj_sel_classname.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_OBJ_SEL_CLASSNAME 7 | E 8 | CLASSNAME 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Classname for object seletion 15 | Object Selection Classname 16 | ObjSelClas 17 | Object Sel Classname 18 | Object Selection Classname 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_parameter/zaps_parameter.msag.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAMETER 7 | E 8 | APS: Object parameter messages 9 | 10 | 11 | 12 | E 13 | ZAPS_PARAMETER 14 | 001 15 | Unknown parameter &1. 16 | 17 | 18 | E 19 | ZAPS_PARAMETER 20 | 002 21 | Executable &1 does not exist. 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_objectselectorfactory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_objectselectorfactory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | "!

Returns an instance of the class specified in customizing

9 | "! 10 | "! @parameter i_settings |

APS settings

11 | "! @parameter result |

object selector instance

12 | "! @raising cx_sy_create_object_error |

Invalid Class

13 | provideObjectSelector 14 | importing 15 | i_settings type ref to zif_aps_settings 16 | returning 17 | value(result) type ref to zif_aps_objectSelector 18 | raising 19 | cx_sy_create_object_error. 20 | protected section. 21 | private section. 22 | endclass. 23 | 24 | 25 | 26 | class zcl_aps_objectselectorfactory implementation. 27 | method provideobjectselector. 28 | data(classname) = i_settings->getObjectSelectionClassname( ). 29 | 30 | create object result 31 | type (classname). 32 | endmethod. 33 | 34 | endclass. 35 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_objectselectorfactory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_OBJECTSELECTORFACTORY 7 | E 8 | APS: Object Selector Factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | ZCL_APS_OBJECTSELECTORFACTORY 17 | PROVIDEOBJECTSELECTOR 18 | E 19 | Returns an instance of the class specified in customizing 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_parameterset_factory definition 2 | public 3 | final 4 | create private. 5 | 6 | public section. 7 | class-methods: 8 | provideFunctionUnitParameters 9 | importing 10 | i_settings type ref to zif_aps_settings 11 | returning 12 | value(result) type ref to zif_aps_parameterSet_func 13 | raising 14 | zcx_aps_unknown_executable, 15 | provideReportParameters 16 | importing 17 | i_settings type ref to zif_aps_settings 18 | returning 19 | value(result) type ref to zif_aps_parameterSet_report 20 | raising 21 | zcx_aps_unknown_executable, 22 | provideObjectParameters 23 | importing 24 | i_settings type ref to zif_aps_settings 25 | returning 26 | value(result) type ref to zif_aps_parameterSet_object. 27 | 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcl_aps_parameterset_factory implementation. 35 | method providefunctionunitparameters. 36 | result = new zcl_aps_parameterset_func( i_settings ). 37 | endmethod. 38 | 39 | method provideobjectparameters. 40 | result = new zcl_aps_parameterset_object( ). 41 | endmethod. 42 | 43 | method providereportparameters. 44 | result = new zcl_aps_parameterset_report( i_settings ). 45 | endmethod. 46 | 47 | endclass. 48 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_PARAMETERSET_FACTORY 7 | E 8 | APS: Factory for parameters objects 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_func.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_PARAMETERSET_FUNC 7 | E 8 | APS: Parameters for a function unit 9 | 1 10 | X 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_object.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_parameterset_object definition 2 | public 3 | final 4 | create private 5 | global friends zcl_aps_parameterset_factory. 6 | 7 | public section. 8 | interfaces: 9 | zif_aps_parameterset_object. 10 | protected section. 11 | private section. 12 | data: 13 | dataReference type ref to data, 14 | object type ref to if_serializable_object. 15 | 16 | methods: 17 | createDataTypeDescriptorByRef 18 | importing 19 | i_dataRef type ref to data 20 | i_parametername type abap_parmname 21 | returning 22 | value(result) type ref to cl_abap_datadescr 23 | raising 24 | zcx_aps_unknown_parameter. 25 | endclass. 26 | 27 | 28 | 29 | class zcl_aps_parameterset_object implementation. 30 | method zif_aps_parameterset_object~getdatareference. 31 | result = dataReference. 32 | endmethod. 33 | 34 | 35 | method zif_aps_parameterset_object~getobject. 36 | result = object. 37 | endmethod. 38 | 39 | 40 | method zif_aps_parameterset_object~setdatareference. 41 | try. 42 | data(dataType) = createDataTypeDescriptorByRef( 43 | i_dataRef = i_dataRef 44 | i_parametername = 'Data reference' 45 | ). 46 | 47 | create data dataReference 48 | type handle dataType. 49 | 50 | catch cx_sy_itab_line_not_found 51 | cx_sy_create_data_error 52 | zcx_aps_unknown_parameter. 53 | return. 54 | endtry. 55 | 56 | if i_dataRef is bound. 57 | assign dataReference->* 58 | to field-symbol(). 59 | 60 | if sy-subrc ne 0. 61 | " type ref to data ... 62 | return. 63 | endif. 64 | 65 | assign i_dataRef->* 66 | to field-symbol(). 67 | 68 | if sy-subrc ne 0. 69 | "inside that if-construct? 70 | return. 71 | endif. 72 | 73 | = . 74 | endif. 75 | endmethod. 76 | 77 | 78 | method zif_aps_parameterset_object~setobject. 79 | object = i_object. 80 | endmethod. 81 | 82 | 83 | method createDataTypeDescriptorByRef. 84 | 85 | try. 86 | cl_abap_typedescr=>describe_by_data_ref( 87 | exporting 88 | p_data_ref = i_dataRef 89 | receiving 90 | p_descr_ref = data(datatypeDescriptor) 91 | exceptions 92 | reference_is_initial = 1 93 | others = 2 94 | ). 95 | 96 | if sy-subrc ne 0. 97 | raise exception 98 | type zcx_aps_unknown_parameter 99 | exporting 100 | i_parametername = conv #( i_parametername ). 101 | endif. 102 | 103 | result = cast cl_abap_datadescr( dataTypeDescriptor ). 104 | catch cx_sy_move_cast_error. 105 | raise exception 106 | type zcx_aps_unknown_parameter 107 | exporting 108 | i_parametername = conv #( i_parametername ). 109 | endtry. 110 | 111 | endmethod. 112 | 113 | endclass. 114 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_object.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_PARAMETERSET_OBJECT 7 | E 8 | APS: Parameters for a method call 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcl_aps_parameterset_report.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_PARAMETERSET_REPORT 7 | E 8 | APS: Parameters for a report 9 | 1 10 | X 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcx_aps_unknown_executable.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_unknown_executable definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_unknown_executable, 15 | msgid type symsgid value 'ZAPS_PARAMETER', 16 | msgno type symsgno value '002', 17 | attr1 type scx_attrname value 'EXECUTABLENAME', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_unknown_executable. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_unknown_executable 27 | i_previous type ref to cx_root optional 28 | i_executableName type zaps_executable_name. 29 | protected section. 30 | private section. 31 | data: 32 | executableName type zaps_executable_name. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_unknown_executable implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | executableName = i_executableName. 47 | 48 | endmethod. 49 | endclass. 50 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcx_aps_unknown_executable.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_UNKNOWN_EXECUTABLE 7 | E 8 | APS: unknown appID 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_UNKNOWN_EXECUTABLE 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcx_aps_unknown_parameter.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_unknown_parameter definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_settings_unknown_app, 15 | msgid type symsgid value 'ZAPS_PARAMETER', 16 | msgno type symsgno value '001', 17 | attr1 type scx_attrname value 'PARAMETERNAME', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_settings_unknown_app. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_settings_unknown_app 27 | i_previous type ref to cx_root optional 28 | i_parameterName type text50. 29 | protected section. 30 | private section. 31 | data: 32 | parameterName type text50. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_unknown_parameter implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | parameterName = i_parameterName. 47 | 48 | endmethod. 49 | endclass. 50 | -------------------------------------------------------------------------------- /src/zaps_parameter/zcx_aps_unknown_parameter.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_UNKNOWN_PARAMETER 7 | E 8 | APS: unknown appID 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_UNKNOWN_PARAMETER 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_objectselector.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_objectselector 2 | public. 3 | methods: 4 | "!

Supplies the to be parallelized objets/parameter sets

5 | "! 6 | "! @parameter i_infoFromCaller |

abstract/application specific additional info from caller

7 | "! @parameter i_settings |

parallelization settings

8 | "! @parameter result |

objects / parameter sets

9 | "! @raising zcx_aps_unknown_executable |

invalid executable

10 | "! @raising zcx_aps_unknown_parameter |

invalid parameter

11 | calculateObjects 12 | importing 13 | i_infoFromCaller type ref to object 14 | i_settings type ref to zif_aps_settings 15 | returning 16 | value(result) type zaps_parameter_set_list 17 | raising 18 | zcx_aps_unknown_executable 19 | zcx_aps_unknown_parameter. 20 | endinterface. 21 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_objectselector.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_OBJECTSELECTOR 7 | E 8 | APS: Object Selector 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | ZIF_APS_OBJECTSELECTOR 16 | CALCULATEOBJECTS 17 | E 18 | Supplies the to be parallelized objets/parameter sets 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_parameterset 2 | public. 3 | interfaces: 4 | if_serializable_object. 5 | 6 | endinterface. 7 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_PARAMETERSET 7 | E 8 | APS: Parameters 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_func.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_parameterset_func 2 | public. 3 | interfaces: 4 | zif_aps_parameterSet. 5 | 6 | methods: 7 | addImporting 8 | importing 9 | i_parameterName type abap_parmname 10 | i_parameterValue type ref to data 11 | raising 12 | zcx_aps_unknown_parameter, 13 | 14 | addExporting 15 | importing 16 | i_parameterName type abap_parmname 17 | raising 18 | zcx_aps_unknown_parameter, 19 | 20 | addChanging 21 | importing 22 | i_parameterName type abap_parmname 23 | i_parameterValue type ref to data optional 24 | raising 25 | zcx_aps_unknown_parameter, 26 | 27 | addTables 28 | importing 29 | i_parameterName type abap_parmname 30 | i_parameterValue type ref to data optional 31 | raising 32 | zcx_aps_unknown_parameter, 33 | 34 | getParametersTab 35 | returning 36 | value(result) type abap_func_parmbind_tab, 37 | 38 | getExceptionsTab 39 | returning 40 | value(result) type abap_func_excpbind_tab, 41 | 42 | getExportingValue 43 | importing 44 | i_parameterName type abap_parmname 45 | returning 46 | value(result) type ref to data 47 | raising 48 | zcx_aps_unknown_parameter, 49 | 50 | getChangingValue 51 | importing 52 | i_parameterName type abap_parmname 53 | returning 54 | value(result) type ref to data 55 | raising 56 | zcx_aps_unknown_parameter, 57 | 58 | getTablesValue 59 | importing 60 | i_parameterName type abap_parmname 61 | returning 62 | value(result) type ref to data 63 | raising 64 | zcx_aps_unknown_parameter, 65 | 66 | setExportingValue 67 | importing 68 | i_parameterName type abap_parmname 69 | i_parameterValue type ref to data 70 | raising 71 | zcx_aps_unknown_parameter, 72 | 73 | setChangingValue 74 | importing 75 | i_parameterName type abap_parmname 76 | i_parameterValue type ref to data 77 | raising 78 | zcx_aps_unknown_parameter, 79 | 80 | setTablesValue 81 | importing 82 | i_parameterName type abap_parmname 83 | i_parameterValue type ref to data 84 | raising 85 | zcx_aps_unknown_parameter. 86 | 87 | endinterface. 88 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_func.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_PARAMETERSET_FUNC 7 | E 8 | APS: Parameter for a function unit 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_object.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_parameterset_object 2 | public. 3 | interfaces: 4 | zif_aps_parameterSet. 5 | 6 | methods: 7 | setDataReference 8 | importing 9 | i_dataRef type ref to data, 10 | 11 | setObject 12 | importing 13 | i_object type ref to if_serializable_object, 14 | 15 | getDataReference 16 | returning 17 | value(result) type ref to data, 18 | 19 | getObject 20 | importing 21 | value(result) type ref to if_serializable_object. 22 | 23 | endinterface. 24 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_object.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_PARAMETERSET_OBJECT 7 | E 8 | APS: Parameter for an object/method 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_report.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_parameterset_report 2 | public. 3 | interfaces: 4 | zif_aps_parameterSet. 5 | 6 | methods: 7 | addParameter 8 | importing 9 | i_parameterName type rsscr_name 10 | i_parameterValue type tvarv_val 11 | raising 12 | zcx_aps_unknown_parameter, 13 | 14 | addSelectOption 15 | importing 16 | i_selectOption type rotselect 17 | raising 18 | zcx_aps_unknown_parameter, 19 | 20 | getSelectionsTable 21 | returning 22 | value(result) type rsparams_tt. 23 | 24 | endinterface. 25 | -------------------------------------------------------------------------------- /src/zaps_parameter/zif_aps_parameterset_report.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_PARAMETERSET_REPORT 7 | E 8 | APS: Parameter for a report 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_settings/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Settings 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_change_info.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CHANGE_INFO 7 | E 8 | INTTAB 9 | APS: change info fields 10 | E 11 | 1 12 | 13 | 14 | 15 | CHANGE_USER 16 | ZAPS_CHANGING_USER 17 | 0 18 | E 19 | 20 | 21 | CHANGE_TIMESTAMP 22 | ZAPS_CHANGING_TIMESTAMP 23 | 0 24 | E 25 | 26 | 27 | CHANGE_TRANSACTION 28 | ZAPS_CHANGING_TRANSACT 29 | 0 30 | E 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_changing_timestamp.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CHANGING_TIMESTAMP 7 | E 8 | TZNTSTMPL 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: timestamp that dataset was last changed 15 | Change timestamp 16 | Ch tstmp 17 | Change timestamp 18 | Change timestamp 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_changing_transact.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CHANGING_TRANSACT 7 | E 8 | TCODE 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: transaction that dataset was last changed by 15 | Change Transaction 16 | Cr TCode 17 | Change Transaction 18 | Change Transaction 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_changing_user.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CHANGING_USER 7 | E 8 | XUBNAME 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: User that last changed that dataset 15 | Changing User 16 | Ch User 17 | Changing User 18 | Changing User 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_creating_timestamp.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CREATING_TIMESTAMP 7 | E 8 | TZNTSTMPL 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: timestamp that dataset was created initially 15 | Creation timestamp 16 | Cr tstmp 17 | Creation timestamp 18 | Creation timestamp 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_creating_user.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CREATING_USER 7 | E 8 | XUBNAME 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: User that initially created that dataset 15 | Creating User 16 | Cr User 17 | Creating User 18 | Creating User 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_creation_info.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CREATION_INFO 7 | E 8 | INTTAB 9 | APS: creation info fields 10 | E 11 | 1 12 | 13 | 14 | 15 | CREATION_USER 16 | ZAPS_CREATING_USER 17 | 0 18 | E 19 | 20 | 21 | CREATION_TIMESTAMP 22 | ZAPS_CREATING_TIMESTAMP 23 | 0 24 | E 25 | 26 | 27 | CREATION_TRANSACTION 28 | ZAPS_CREATION_TRANSACT 29 | 0 30 | E 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_creation_transact.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_CREATION_TRANSACT 7 | E 8 | TCODE 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: transaction that initially created that dataset 15 | Creation Transaction 16 | Cr TCode 17 | Creation Transaction 18 | Creation Transaction 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_executable_name.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_EXECUTABLE_NAME 7 | E 8 | X 9 | 55 10 | 10 11 | 20 12 | 40 13 | APS: Name of executable 14 | Executable Name 15 | ExecName 16 | Executable Name 17 | Name of the executable 18 | E 19 | CHAR 20 | 000030 21 | 000030 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_executable_type.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_EXECUTABLE_TYPE 7 | E 8 | CHAR 9 | 000001 10 | 000001 11 | X 12 | APS: type of the executable 13 | E 14 | 15 | 16 | 17 | 0001 18 | E 19 | R 20 | Report 21 | 22 | 23 | 0002 24 | E 25 | F 26 | Function Module 27 | 28 | 29 | 0003 30 | E 31 | O 32 | Object 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_executable_type.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_EXECUTABLE_TYPE 7 | E 8 | ZAPS_EXECUTABLE_TYPE 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Type of executable 15 | Executable Type 16 | Exectype 17 | Executable Type 18 | Type of the executable 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_job_prefix.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_JOB_PREFIX 7 | E 8 | TEXT25 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Prefix used for background job name 15 | Job Prefix 16 | Job Prefix 17 | Job Prefix 18 | Job Prefix 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_max_package_size.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_MAX_PACKAGE_SIZE 7 | E 8 | INT4 9 | 000010 10 | 000011 11 | APS: maximum package size 12 | E 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_max_package_size.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_MAX_PACKAGE_SIZE 7 | E 8 | ZAPS_MAX_PACKAGE_SIZE 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: maximum package_size 15 | maxPackageSize 16 | maxPackSiz 17 | maxPackageSize 18 | maximum package size 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_max_parallel_tasks.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_MAX_PARALLEL_TASKS 7 | E 8 | INT4 9 | 000010 10 | 000011 11 | APS: maximum number of simultaniously running tasks 12 | E 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_max_parallel_tasks.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_MAX_PARALLEL_TASKS 7 | E 8 | ZAPS_MAX_PARALLEL_TASKS 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: maximum number of simultaniously running tasks 15 | maxParallelTasks 16 | maxParTask 17 | maxParallelTasks 18 | maximum number of simultaniously running 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_paraapp.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAAPP 7 | E 8 | TRANSP 9 | X 10 | APS: Parallelization application 11 | E 12 | X 13 | C 14 | 3 15 | 16 | 17 | ZAPS_PARAAPP 18 | A 19 | 0 20 | APPL2 21 | P 22 | X 23 | X 24 | 25 | 26 | 27 | CLIENT 28 | X 29 | 0 30 | C 31 | 000006 32 | X 33 | CLNT 34 | 000003 35 | CLNT 36 | 37 | 38 | APPID 39 | X 40 | ZAPS_APPID 41 | 0 42 | X 43 | E 44 | 45 | 46 | TYPEOFEXECUTABLE 47 | ZAPS_EXECUTABLE_TYPE 48 | 0 49 | X 50 | F 51 | E 52 | 53 | 54 | NAMEOFEXECUTABLE 55 | ZAPS_EXECUTABLE_NAME 56 | 0 57 | E 58 | 59 | 60 | OBJECTSELECTIONCLASS 61 | ZAPS_OBJ_SEL_CLASSNAME 62 | 0 63 | E 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_paraconf.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARACONF 7 | E 8 | TRANSP 9 | X 10 | APS: Parallelization configuration 11 | E 12 | X 13 | C 14 | 3 15 | 16 | 17 | ZAPS_PARACONF 18 | A 19 | 0 20 | APPL2 21 | P 22 | X 23 | X 24 | 25 | 26 | 27 | CLIENT 28 | X 29 | 0 30 | C 31 | 000006 32 | X 33 | CLNT 34 | 000003 35 | CLNT 36 | 37 | 38 | APPID 39 | X 40 | ZAPS_APPID 41 | 0 42 | X 43 | E 44 | 45 | 46 | CONFIGID 47 | X 48 | ZAPS_CONFIGID 49 | 0 50 | X 51 | E 52 | 53 | 54 | PARALLELIZATIONTYPE 55 | ZAPS_TASK_TYPE 56 | 0 57 | X 58 | F 59 | E 60 | 61 | 62 | MAXPACKAGESIZE 63 | ZAPS_MAX_PACKAGE_SIZE 64 | 0 65 | E 66 | 67 | 68 | MAXPARALLELTASKS 69 | ZAPS_MAX_PARALLEL_TASKS 70 | 0 71 | E 72 | 73 | 74 | JOBNAMEPREFIX 75 | ZAPS_JOB_PREFIX 76 | 0 77 | E 78 | 79 | 80 | WAITUNTILFINISHED 81 | ZAPS_WAIT_UNTIL_FINISHED 82 | 0 83 | X 84 | F 85 | E 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_run_id.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_RUN_ID 7 | E 8 | SYSUUID_C 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Run ID 15 | Run ID 16 | Run ID 17 | Run ID 18 | Run ID 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_run_status.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_RUN_STATUS 7 | E 8 | CHAR 9 | 000001 10 | 000001 11 | X 12 | APS: run status 13 | E 14 | 15 | 16 | 17 | 0001 18 | E 19 | A 20 | Aborted 21 | 22 | 23 | 0002 24 | E 25 | S 26 | Started 27 | 28 | 29 | 0003 30 | E 31 | R 32 | Running 33 | 34 | 35 | 0004 36 | E 37 | C 38 | Completed 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_run_status.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_RUN_STATUS 7 | E 8 | ZAPS_RUN_STATUS 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Run status 15 | Run status 16 | Run status 17 | Run status 18 | Run status 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_runs.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_RUNS 7 | E 8 | TRANSP 9 | X 10 | X 11 | APS: started runs 12 | E 13 | A 14 | 1 15 | 16 | 17 | ZAPS_RUNS 18 | A 19 | 4 20 | APPL0 21 | X 22 | N 23 | 24 | 25 | 26 | CLIENT 27 | X 28 | 0 29 | C 30 | 000006 31 | X 32 | CLNT 33 | 000003 34 | CLNT 35 | 36 | 37 | RUNID 38 | X 39 | ZAPS_RUN_ID 40 | 0 41 | X 42 | E 43 | 44 | 45 | STATUS 46 | ZAPS_RUN_STATUS 47 | 0 48 | X 49 | F 50 | E 51 | 52 | 53 | APPID 54 | ZAPS_APPID 55 | 0 56 | E 57 | 58 | 59 | CONFIGID 60 | ZAPS_CONFIGID 61 | 0 62 | E 63 | 64 | 65 | .INCLUDE 66 | 0 67 | ZAPS_CREATION_INFO 68 | S 69 | APS: creation info fields 70 | S 71 | CREATION 72 | 73 | 74 | .INCLUDE 75 | 0 76 | ZAPS_CHANGE_INFO 77 | S 78 | APS: change info fields 79 | S 80 | CHANGE 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_settings.msag.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_SETTINGS 7 | E 8 | APS: Settings messages 9 | 10 | 11 | 12 | E 13 | ZAPS_SETTINGS 14 | 001 15 | application ID &1 unknown. Check table zaps_paraapp. 16 | 17 | 18 | E 19 | ZAPS_SETTINGS 20 | 002 21 | configuration ID &1 is unknown for application &2. Check zaps_paraconf. 22 | 23 | 24 | E 25 | ZAPS_SETTINGS 26 | 003 27 | Run ID &1 is unknown. 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_task_type.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_TYPE 7 | E 8 | CHAR 9 | 000001 10 | 000001 11 | X 12 | APS: Task type 13 | E 14 | 15 | 16 | 17 | 0001 18 | E 19 | B 20 | Batch Job 21 | 22 | 23 | 0002 24 | E 25 | D 26 | Dialog Task 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_task_type.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_TYPE 7 | E 8 | ZAPS_TASK_TYPE 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: Task type 15 | Task type 16 | TaskType 17 | Task type 18 | Task type 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zaps_wait_until_finished.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_WAIT_UNTIL_FINISHED 7 | E 8 | SAP_BOOL 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: wait until all tasks finished 15 | wait until finished 16 | waitFinish 17 | wait until finished 18 | wait until all tasks finished 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_settings/zcl_aps_settings.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_SETTINGS 7 | E 8 | APS: Settings 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_settings/zcl_aps_settings_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_settings_factory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | provideNew 9 | importing 10 | i_appId type zaps_appid 11 | i_configId type zaps_configid 12 | returning 13 | value(result) type ref to zif_aps_settings 14 | raising 15 | zcx_aps_settings_unknown_app 16 | zcx_aps_settings_unknown_conf 17 | cx_uuid_error, 18 | 19 | provideExisting 20 | importing 21 | i_runId type zaps_run_id 22 | returning 23 | value(result) type ref to zif_aps_settings 24 | raising 25 | zcx_aps_settings_unknown_run 26 | zcx_aps_settings_unknown_app 27 | zcx_aps_settings_unknown_conf. 28 | 29 | protected section. 30 | private section. 31 | 32 | endclass. 33 | 34 | 35 | 36 | class zcl_aps_settings_factory implementation. 37 | 38 | method provideNew. 39 | result = new zcl_aps_settings( ). 40 | 41 | cast zcl_aps_settings( result )->create( 42 | i_appid = i_appid 43 | i_configid = i_configid 44 | ). 45 | endmethod. 46 | 47 | 48 | method provideExisting. 49 | result = new zcl_aps_settings( ). 50 | 51 | cast zcl_aps_settings( result )->load( i_runId ). 52 | endmethod. 53 | 54 | endclass. 55 | -------------------------------------------------------------------------------- /src/zaps_settings/zcl_aps_settings_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_SETTINGS_FACTORY 7 | E 8 | APS: Factory for settings objects 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_app.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_settings_unknown_app definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_settings_unknown_app, 15 | msgid type symsgid value 'ZAPS_SETTINGS', 16 | msgno type symsgno value '001', 17 | attr1 type scx_attrname value 'APPID', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_settings_unknown_app. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_settings_unknown_app 27 | i_previous type ref to cx_root optional 28 | i_appId type zaps_appid. 29 | protected section. 30 | private section. 31 | data: 32 | appId type zaps_appid. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_settings_unknown_app implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | appId = i_appid. 47 | 48 | endmethod. 49 | endclass. 50 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_app.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_SETTINGS_UNKNOWN_APP 7 | E 8 | APS: unknown appID 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_SETTINGS_UNKNOWN_APP 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_conf.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_settings_unknown_conf definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_settings_unknown_conf, 15 | msgid type symsgid value 'ZAPS_SETTINGS', 16 | msgno type symsgno value '002', 17 | attr1 type scx_attrname value 'APPID', 18 | attr2 type scx_attrname value 'CONFIGID', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_settings_unknown_conf. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_settings_unknown_conf 27 | i_previous type ref to cx_root optional 28 | i_appId type zaps_appid 29 | i_configId type zaps_configid. 30 | protected section. 31 | private section. 32 | data: 33 | appId type zaps_appid, 34 | configId type zaps_configid. 35 | endclass. 36 | 37 | 38 | 39 | class zcx_aps_settings_unknown_conf implementation. 40 | 41 | 42 | method constructor ##ADT_SUPPRESS_GENERATION. 43 | super->constructor( previous = i_previous ). 44 | clear textid. 45 | 46 | if_t100_message~t100key = i_textid. 47 | 48 | appId = i_appid. 49 | configid = i_configid. 50 | 51 | endmethod. 52 | endclass. 53 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_conf.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_SETTINGS_UNKNOWN_CONF 7 | E 8 | APS: unknown configID 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_SETTINGS_UNKNOWN_CONF 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_run.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_settings_unknown_run definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_settings_unknown_app, 15 | msgid type symsgid value 'ZAPS_SETTINGS', 16 | msgno type symsgno value '003', 17 | attr1 type scx_attrname value 'RUNID', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_settings_unknown_app. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_settings_unknown_app 27 | i_previous type ref to cx_root optional 28 | i_runId type zaps_run_id. 29 | protected section. 30 | private section. 31 | data: 32 | runId type zaps_run_id. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_settings_unknown_run implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | runId = i_runid. 47 | 48 | endmethod. 49 | endclass. 50 | -------------------------------------------------------------------------------- /src/zaps_settings/zcx_aps_settings_unknown_run.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_SETTINGS_UNKNOWN_RUN 7 | E 8 | APS: unknown run ID 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_SETTINGS_UNKNOWN_RUN 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_settings/ztd_aps_settings.clas.abap: -------------------------------------------------------------------------------- 1 | class ztd_aps_settings definition 2 | public 3 | final 4 | create public 5 | for testing 6 | duration short 7 | risk level harmless. 8 | 9 | public section. 10 | interfaces: 11 | zif_aps_settings. 12 | 13 | methods: 14 | setAppDefinition 15 | importing 16 | i_appDefintion type zaps_paraapp, 17 | 18 | setParallelConfiguration 19 | importing 20 | i_parallelConfiguration type zaps_paraconf, 21 | 22 | setMaxPackageSize 23 | importing 24 | i_maxPackaageSize type zaps_max_package_size, 25 | 26 | setMaxParallelTasks 27 | importing 28 | i_maxParallelTasks type zaps_max_parallel_tasks. 29 | 30 | protected section. 31 | private section. 32 | data: 33 | appDefinition type zaps_paraapp, 34 | parallelizationConfiguration type zaps_paraconf, 35 | runInfo type zaps_runs. 36 | endclass. 37 | 38 | 39 | 40 | class ztd_aps_settings implementation. 41 | 42 | method zif_aps_settings~getmaxpackagesize. 43 | result = parallelizationConfiguration-maxpackagesize. 44 | endmethod. 45 | 46 | 47 | method zif_aps_settings~getmaxparalleltasks. 48 | result = parallelizationConfiguration-maxparalleltasks. 49 | endmethod. 50 | 51 | 52 | method zif_aps_settings~gettasktype. 53 | result = parallelizationConfiguration-parallelizationtype. 54 | endmethod. 55 | 56 | 57 | method zif_aps_settings~getJobNamePrefix. 58 | result = parallelizationconfiguration-jobnameprefix. 59 | endmethod. 60 | 61 | 62 | method zif_aps_settings~gettypeofexecutable. 63 | result = appDefinition-typeOfExecutable. 64 | endmethod. 65 | 66 | 67 | method zif_aps_settings~getnameofexecutable. 68 | result = appDefinition-nameOfExecutable. 69 | endmethod. 70 | 71 | 72 | method zif_aps_settings~getappid. 73 | result = appDefinition-appId. 74 | endmethod. 75 | 76 | 77 | method zif_aps_settings~getconfigid. 78 | result = parallelizationConfiguration-configId. 79 | endmethod. 80 | 81 | 82 | method setappdefinition. 83 | appDefinition = i_appDefintion. 84 | endmethod. 85 | 86 | 87 | method setparallelconfiguration. 88 | parallelizationConfiguration = i_parallelConfiguration. 89 | endmethod. 90 | 91 | 92 | method setmaxpackagesize. 93 | parallelizationConfiguration-maxpackagesize = i_maxPackaageSize. 94 | endmethod. 95 | 96 | 97 | method setmaxparalleltasks. 98 | parallelizationConfiguration-maxparalleltasks = i_maxParallelTasks. 99 | endmethod. 100 | 101 | 102 | method zif_aps_settings~getobjectselectionclassname. 103 | result = appDefinition-objectselectionclass. 104 | endmethod. 105 | 106 | 107 | method zif_aps_settings~shouldwaituntilfinished. 108 | result = parallelizationConfiguration-waituntilfinished. 109 | endmethod. 110 | 111 | 112 | method zif_aps_settings~getrunid. 113 | result = runInfo-runid. 114 | endmethod. 115 | 116 | 117 | method zif_aps_settings~setstatusaborted. 118 | runInfo-status = zif_aps_settings~runstatusaborted. 119 | endmethod. 120 | 121 | 122 | method zif_aps_settings~setstatuscompleted. 123 | runInfo-status = zif_aps_settings~runstatuscompleted. 124 | endmethod. 125 | 126 | 127 | method zif_aps_settings~setstatusrunning. 128 | runInfo-status = zif_aps_settings~runstatusrunning. 129 | endmethod. 130 | 131 | 132 | method zif_aps_settings~setstatusstarted. 133 | runInfo-status = zif_aps_settings~runstatusstarted. 134 | endmethod. 135 | 136 | endclass. 137 | -------------------------------------------------------------------------------- /src/zaps_settings/ztd_aps_settings.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZTD_APS_SETTINGS 7 | E 8 | APS: Test Double Settings 9 | 05 10 | 1 11 | X 12 | X 13 | X 14 | 12 15 | 11 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Task stuff 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_package.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PACKAGE 7 | E 8 | INTTAB 9 | APS: Data of one package 10 | E 11 | 1 12 | 13 | 14 | 15 | SELECTIONS 16 | ZAPS_PARAMETER_SET_LIST 17 | 0 18 | TTYP 19 | TTYPL 20 | L 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_packages.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PACKAGES 7 | E 8 | ZAPS_PACKAGE 9 | S 10 | STRU 11 | T 12 | D 13 | N 14 | APS: Packages each to be assigned to one task 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_parameter_set.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAMETER_SET 7 | E 8 | RSSELECT 9 | S 10 | STRU 11 | T 12 | D 13 | N 14 | APS: Set of filter criteria for one execution 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_parameter_set_list.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAMETER_SET_LIST 7 | E 8 | ZIF_APS_PARAMETERSET 9 | R 10 | REF 11 | T 12 | D 13 | N 14 | APS: List of filter criteria set, one for each execution 15 | I 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_parameter_set_list_func.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAMETER_SET_LIST_FUNC 7 | E 8 | ZIF_APS_PARAMETERSET_FUNC 9 | R 10 | REF 11 | T 12 | D 13 | N 14 | APS: List of func unit parameters, one for each execution 15 | I 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_parameter_set_list_object.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_PARAMETER_SET_LIST_OBJECT 7 | E 8 | ZIF_APS_PARAMETERSET_OBJECT 9 | R 10 | REF 11 | T 12 | D 13 | N 14 | APS: List of object parameters, one for each execution 15 | I 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task.msag.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK 7 | E 8 | APS: Task messages 9 | 10 | 11 | 12 | E 13 | ZAPS_TASK 14 | 001 15 | Executable Class specified in settings does not inherit from ZCL_APS_TASK 16 | 17 | 18 | E 19 | ZAPS_TASK 20 | 002 21 | Could not create instance of the executable class &1. 22 | 23 | 24 | E 25 | ZAPS_TASK 26 | 003 27 | Unknown executable type &1. 28 | 29 | 30 | E 31 | ZAPS_TASK 32 | 004 33 | Job creation error (name &1). RC = &2. 34 | 35 | 36 | E 37 | ZAPS_TASK 38 | 005 39 | Unable to submit runner to job (&1/&2). 40 | 41 | 42 | E 43 | ZAPS_TASK 44 | 006 45 | Error releasing Job (&1/&2). RC = &3. 46 | 47 | 48 | E 49 | ZAPS_TASK 50 | 007 51 | Error raising start event &1. RC = &2. 52 | 53 | 54 | E 55 | ZAPS_TASK 56 | 008 57 | Error creating task (see previous error). 58 | 59 | 60 | E 61 | ZAPS_TASK 62 | 009 63 | Error creating job (see previous error). 64 | 65 | 66 | E 67 | ZAPS_TASK 68 | 010 69 | Error calling the executable. 70 | 71 | 72 | E 73 | ZAPS_TASK 74 | 011 75 | At least one started job aborted. 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Batch Tasks 7 | X 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_batch_job_key.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_BATCH_JOB_KEY 7 | E 8 | INTTAB 9 | APS: key fields of a batch job 10 | E 11 | 1 12 | 13 | 14 | 15 | JOBNAME 16 | BTCJOB 17 | 0 18 | E 19 | 20 | 21 | JOBUNIQUEID 22 | BTCJOBCNT 23 | 0 24 | E 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_batch_job_list.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_BATCH_JOB_LIST 7 | E 8 | ZAPS_BATCH_JOB_KEY 9 | S 10 | STRU 11 | T 12 | D 13 | N 14 | APS: batch job list 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_batch_task_run.prog.abap: -------------------------------------------------------------------------------- 1 | *&---------------------------------------------------------------------* 2 | *& Report zaps_batch_task_run 3 | *&---------------------------------------------------------------------* 4 | *& 5 | *&---------------------------------------------------------------------* 6 | report zaps_batch_task_run. 7 | 8 | parameters: 9 | p_runid type zaps_run_id obligatory, 10 | p_ta type zaps_taskId obligatory. 11 | 12 | try. 13 | data(task) = zcl_aps_task_storage_factory=>provide( )->loadSingleTask( 14 | i_runid = p_runid 15 | i_taskid = p_ta 16 | ). 17 | 18 | 19 | if task is bound. 20 | task->setStatusStarted( ). 21 | task->start( ). 22 | task->setStatusFinished( ). 23 | zcl_aps_task_storage_factory=>provide( )->storeTask( task ). 24 | endif. 25 | catch zcx_aps_executable_call_error 26 | into data(callError). 27 | data(previousError) = callError->previous. 28 | while previousError is bound. 29 | if previousError is instance of if_t100_message. 30 | message callError->previous 31 | type 'I' 32 | display like 'E'. 33 | endif. 34 | 35 | if previousError->previous is bound. 36 | previousError = previousError->previous. 37 | endif. 38 | endwhile. 39 | 40 | if callError is instance of if_t100_message. 41 | message callError 42 | type 'I' 43 | display like 'E'. 44 | endif. 45 | endtry. 46 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_batch_task_run.prog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_BATCH_TASK_RUN 7 | S 8 | 1 9 | X 10 | D$S 11 | X 12 | 13 | 14 | 15 | R 16 | APS: executed generic report for batch job 17 | 42 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_task_chain.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_CHAIN 7 | E 8 | ZIF_APS_TASK 9 | R 10 | REF 11 | T 12 | D 13 | N 14 | APS: Chain of batch tasks 15 | I 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zaps_task_chains.ttyp.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_CHAINS 7 | E 8 | ZAPS_TASK_CHAIN 9 | L 10 | TTYP 11 | T 12 | D 13 | N 14 | APS: List of task chains 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcl_aps_batch_job.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_BATCH_JOB 7 | E 8 | APS: Batch job abstraction 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcl_aps_batch_job_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_batch_job_factory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | provide 9 | importing 10 | i_task type ref to zif_aps_task 11 | i_settings type ref to zif_aps_settings 12 | i_chainNumber type sytabix 13 | i_taskNumberInChain type sytabix 14 | i_testDoubleClassName type classname default space 15 | returning 16 | value(result) type ref to zif_aps_batch_job, 17 | 18 | resetInstanceBuffer. 19 | protected section. 20 | private section. 21 | types: 22 | begin of ty_instanceBufferLine, 23 | chainNumber type sytabix, 24 | taskNumberInChain type sytabix, 25 | instance type ref to zif_aps_batch_job, 26 | end of ty_instanceBufferLine. 27 | 28 | class-data: 29 | instanceBuffer type hashed table 30 | of ty_instanceBufferLine 31 | with unique key chainNumber 32 | taskNumberInChain. 33 | endclass. 34 | 35 | 36 | 37 | class zcl_aps_batch_job_factory implementation. 38 | method provide. 39 | try. 40 | result = instanceBuffer[ 41 | chainNumber = i_chainNumber 42 | taskNumberInChain = i_taskNumberInChain 43 | ]-instance. 44 | catch cx_sy_itab_line_not_found. 45 | if not i_testDoubleClassName is initial. 46 | " We must not create instances of productive classes given by classname here! 47 | " This is only for test double injection! 48 | " As we now define that they must be global classes we can always check against 49 | " ABAP system tables. 50 | select single @abap_true 51 | from seoclassdf 52 | where clsname eq @i_testDoubleClassName 53 | and category eq '05' "Unit Test Class --> FOR TESTING 54 | into @data(isUnitTestClass). 55 | 56 | if sy-subrc eq 0. 57 | create object result 58 | type (i_testDoubleClassName) 59 | exporting 60 | i_task = i_task 61 | i_settings = i_settings 62 | i_chainNumber = i_chainNumber 63 | i_taskNumberInChain = i_taskNumberInChain. 64 | 65 | endif. 66 | else. 67 | result = new zcl_aps_batch_job( 68 | i_task = i_task 69 | i_settings = i_settings 70 | i_chainnumber = i_chainNumber 71 | i_tasknumberinchain = i_taskNumberInChain 72 | ). 73 | endif. 74 | 75 | 76 | if not result is bound 77 | or i_testDoubleClassName is initial. 78 | result = new zcl_aps_batch_job( 79 | i_task = i_task 80 | i_settings = i_settings 81 | i_chainNumber = i_chainNumber 82 | i_taskNumberInChain = i_taskNumberInChain 83 | ). 84 | endif. 85 | 86 | insert value #( 87 | chainNumber = i_chainNumber 88 | taskNumberInChain = i_taskNumberInChain 89 | instance = result 90 | ) 91 | into table instanceBuffer. 92 | endtry. 93 | endmethod. 94 | 95 | 96 | method resetInstanceBuffer. 97 | clear instanceBuffer. 98 | endmethod. 99 | 100 | endclass. 101 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcl_aps_batch_job_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_BATCH_JOB_FACTORY 7 | E 8 | APS: Batch Job Factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcl_aps_task_starter_batch.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STARTER_BATCH 7 | E 8 | APS: Task starter Batch parallelization 9 | 1 10 | X 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_creation.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_job_creation definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_job_creation, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '004', 17 | attr1 type scx_attrname value 'JOBNAME', 18 | attr2 type scx_attrname value 'ERRORCODE', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_job_creation. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_job_creation 27 | i_previous type ref to cx_root optional 28 | i_jobName type btcjob 29 | i_errorCode type sysubrc. 30 | protected section. 31 | private section. 32 | data: 33 | jobName type btcJob, 34 | errorCode type sysubrc. 35 | endclass. 36 | 37 | 38 | 39 | class zcx_aps_task_job_creation implementation. 40 | 41 | 42 | method constructor ##ADT_SUPPRESS_GENERATION. 43 | super->constructor( previous = i_previous ). 44 | clear textid. 45 | 46 | if_t100_message~t100key = i_textid. 47 | 48 | jobName = i_jobName. 49 | errorCode = i_errorCode. 50 | endmethod. 51 | endclass. 52 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_creation.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_JOB_CREATION 7 | E 8 | APS: Error during job creation. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_JOB_CREATION 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_event_raise.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_job_event_raise definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_job_event_raise, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '007', 17 | attr1 type scx_attrname value 'EVENTNAME', 18 | attr2 type scx_attrname value 'ERRORCODE', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_job_event_raise. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_job_event_raise 27 | i_previous type ref to cx_root optional 28 | i_eventName type btcevtid 29 | i_errorCode type sysubrc. 30 | protected section. 31 | private section. 32 | data: 33 | eventName type btcevtid, 34 | errorCode type sysubrc. 35 | endclass. 36 | 37 | 38 | 39 | class zcx_aps_task_job_event_raise implementation. 40 | 41 | 42 | method constructor ##ADT_SUPPRESS_GENERATION. 43 | super->constructor( previous = i_previous ). 44 | clear textid. 45 | 46 | if_t100_message~t100key = i_textid. 47 | 48 | eventName = i_eventName. 49 | errorCode = i_errorCode. 50 | endmethod. 51 | endclass. 52 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_event_raise.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_JOB_EVENT_RAISE 7 | E 8 | APS: Error during job start event raise. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_JOB_EVENT_RAISE 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_release.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_job_release definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_job_release, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '006', 17 | attr1 type scx_attrname value 'JOBNAME', 18 | attr2 type scx_attrname value 'JOBUNIQUEID', 19 | attr3 type scx_attrname value 'ERRORCODE', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_job_release. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_job_release 27 | i_previous type ref to cx_root optional 28 | i_jobName type btcjob 29 | i_jobUniqueId type btcjobcnt 30 | i_errorCode type sysubrc. 31 | protected section. 32 | private section. 33 | data: 34 | jobName type btcJob, 35 | jobUniqueId type btcjobcnt, 36 | errorCode type sysubrc. 37 | endclass. 38 | 39 | 40 | 41 | class zcx_aps_task_job_release implementation. 42 | 43 | 44 | method constructor ##ADT_SUPPRESS_GENERATION. 45 | super->constructor( previous = i_previous ). 46 | clear textid. 47 | 48 | if_t100_message~t100key = i_textid. 49 | 50 | jobName = i_jobName. 51 | jobUniqueId = i_jobUniqueId. 52 | errorCode = i_errorCode. 53 | endmethod. 54 | endclass. 55 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_release.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_JOB_RELEASE 7 | E 8 | APS: Error releasing job. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_JOB_RELEASE 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_submit.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_job_submit definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_job_submit, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '005', 17 | attr1 type scx_attrname value 'JOBNAME', 18 | attr2 type scx_attrname value 'JOBUNIQUEID', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_job_submit. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_job_submit 27 | i_previous type ref to cx_root optional 28 | i_jobName type btcjob 29 | i_jobUniqueId type btcjobcnt. 30 | protected section. 31 | private section. 32 | data: 33 | jobName type btcJob, 34 | jobUniqueId type btcjobcnt. 35 | endclass. 36 | 37 | 38 | 39 | class zcx_aps_task_job_submit implementation. 40 | 41 | 42 | method constructor ##ADT_SUPPRESS_GENERATION. 43 | super->constructor( previous = i_previous ). 44 | clear textid. 45 | 46 | if_t100_message~t100key = i_textid. 47 | 48 | jobName = i_jobName. 49 | jobUniqueId = i_jobUniqueId. 50 | endmethod. 51 | endclass. 52 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zcx_aps_task_job_submit.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_JOB_SUBMIT 7 | E 8 | APS: Error submiting runner to job. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_JOB_SUBMIT 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zif_aps_batch_job.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_batch_job 2 | public. 3 | constants: 4 | c_jobStartEvent type btceventid value 'ZAPS_JOB_START' ##NO_TEXT. 5 | 6 | methods: 7 | getJobName 8 | returning 9 | value(result) type btcjob, 10 | 11 | getJobUniqueId 12 | returning 13 | value(result) type btcjobcnt, 14 | 15 | create 16 | raising 17 | zcx_aps_task_job_creation, 18 | 19 | addStep 20 | raising 21 | zcx_aps_task_job_submit, 22 | 23 | planAsEventTriggered 24 | raising 25 | zcx_aps_task_job_release, 26 | 27 | planAsSuccessor 28 | importing 29 | i_predecessor type ref to zif_aps_batch_job 30 | raising 31 | zcx_aps_task_job_release, 32 | 33 | isAborted 34 | returning 35 | value(result) type abap_bool. 36 | endinterface. 37 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/zif_aps_batch_job.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_BATCH_JOB 7 | E 8 | APS: Batch Job abstraction 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_batch/ztd_aps_batch_job.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZTD_APS_BATCH_JOB 7 | E 8 | APS: test Double Batch Job 9 | 05 10 | 1 11 | X 12 | X 13 | X 14 | 12 15 | 11 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Dialog Tasks 7 | X 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.lzaps_starter_dialogtop.abap: -------------------------------------------------------------------------------- 1 | FUNCTION-POOL ZAPS_STARTER_DIALOG. "MESSAGE-ID .. 2 | 3 | * INCLUDE LZAPS_STARTER_DIALOGD... " Local class definition 4 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.lzaps_starter_dialogtop.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | LZAPS_STARTER_DIALOGTOP 7 | S 8 | D$ 9 | I 10 | S 11 | X 12 | D$S 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.saplzaps_starter_dialog.abap: -------------------------------------------------------------------------------- 1 | ******************************************************************* 2 | * System-defined Include-files. * 3 | ******************************************************************* 4 | INCLUDE LZAPS_STARTER_DIALOGTOP. " Global Declarations 5 | INCLUDE LZAPS_STARTER_DIALOGUXX. " Function Modules 6 | 7 | ******************************************************************* 8 | * User-defined Include-files (if necessary). * 9 | ******************************************************************* 10 | * INCLUDE LZAPS_STARTER_DIALOGF... " Subroutines 11 | * INCLUDE LZAPS_STARTER_DIALOGO... " PBO-Modules 12 | * INCLUDE LZAPS_STARTER_DIALOGI... " PAI-Modules 13 | * INCLUDE LZAPS_STARTER_DIALOGE... " Events 14 | * INCLUDE LZAPS_STARTER_DIALOGP... " Local class implement. 15 | * INCLUDE LZAPS_STARTER_DIALOGT99. " ABAP Unit tests 16 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.saplzaps_starter_dialog.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | SAPLZAPS_STARTER_DIALOG 7 | S 8 | D$ 9 | F 10 | S 11 | E 12 | X 13 | D$S 14 | X 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | APS: Starter for dialog parallelization 6 | 7 | LZAPS_STARTER_DIALOGTOP 8 | SAPLZAPS_STARTER_DIALOG 9 | 10 | 11 | 12 | Z_APS_TASK_STARTER_DIALOG 13 | X 14 | APS: Task starter dialog parallelization 15 | X 16 | 17 | 18 | I_RUNID 19 | ZAPS_RUN_ID 20 | 21 | 22 | I_TASKID 23 | ZAPS_TASKID 24 | 25 | 26 | 27 | 28 | I_RUNID 29 | P 30 | 31 | 32 | I_TASKID 33 | P 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zaps_starter_dialog.fugr.z_aps_task_starter_dialog.abap: -------------------------------------------------------------------------------- 1 | function z_aps_task_starter_dialog. 2 | *"---------------------------------------------------------------------- 3 | *"*"Local Interface: 4 | *" IMPORTING 5 | *" VALUE(I_RUNID) TYPE ZAPS_RUN_ID 6 | *" VALUE(I_TASKID) TYPE ZAPS_TASKID 7 | *"---------------------------------------------------------------------- 8 | 9 | try. 10 | data(task) = zcl_aps_task_storage_factory=>provide( )->loadSingleTask( 11 | i_runId = i_runId 12 | i_taskid = i_taskId 13 | ). 14 | 15 | 16 | if task is bound. 17 | task->setStatusStarted( ). 18 | task->start( ). 19 | task->setStatusFinished( ). 20 | zcl_aps_task_storage_factory=>provide( )->storeTask( task ). 21 | endif. 22 | catch zcx_aps_executable_call_error 23 | zcx_aps_task_storage 24 | zcx_aps_task_serialization 25 | zcx_aps_task_status 26 | into data(callError). 27 | data(previousError) = callError->previous. 28 | while previousError is bound. 29 | if previousError is instance of if_t100_message. 30 | message callError->previous 31 | type 'I' 32 | display like 'E'. 33 | endif. 34 | 35 | if previousError->previous is bound. 36 | previousError = previousError->previous. 37 | endif. 38 | endwhile. 39 | 40 | if callError is instance of if_t100_message. 41 | message callError 42 | type 'I' 43 | display like 'E'. 44 | endif. 45 | endtry. 46 | 47 | 48 | ENDFUNCTION. 49 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_dialog/zcl_aps_task_starter_dialog.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STARTER_DIALOG 7 | E 8 | APS: Task starter Dialog parallelization 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/package.devc.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | APS: Taks Storage 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_task_status.doma.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_STATUS 7 | E 8 | CHAR 9 | 000001 10 | 000001 11 | X 12 | APS: task status 13 | E 14 | 15 | 16 | 17 | 0001 18 | E 19 | C 20 | Created 21 | 22 | 23 | 0002 24 | E 25 | S 26 | Started 27 | 28 | 29 | 0003 30 | E 31 | F 32 | Finished 33 | 34 | 35 | 0004 36 | E 37 | A 38 | Aborted 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_task_status.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_STATUS 7 | E 8 | ZAPS_TASK_STATUS 9 | X 10 | 55 11 | 10 12 | 20 13 | 40 14 | APS: task status 15 | task status 16 | TaskStatus 17 | task status 18 | task status 19 | E 20 | D 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_task_storage.msag.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_STORAGE 7 | E 8 | APS: Task Storage Messages 9 | 10 | 11 | 12 | E 13 | ZAPS_TASK_STORAGE 14 | 001 15 | Error storing or loading the task. 16 | 17 | 18 | E 19 | ZAPS_TASK_STORAGE 20 | 002 21 | Error during serialization or deserialization. 22 | 23 | 24 | E 25 | ZAPS_TASK_STORAGE 26 | 003 27 | Error setting task status. 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_task_storage_key.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASK_STORAGE_KEY 7 | E 8 | INTTAB 9 | APS: Key of a stored task 10 | E 11 | 1 12 | 13 | 14 | 15 | RUNID 16 | ZAPS_RUN_ID 17 | 0 18 | E 19 | 20 | 21 | TASKID 22 | ZAPS_TASKID 23 | 0 24 | E 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_taskstatus.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASKSTATUS 7 | E 8 | TRANSP 9 | X 10 | X 11 | APS: Task status 12 | E 13 | A 14 | 1 15 | 16 | 17 | ZAPS_TASKSTATUS 18 | A 19 | 3 20 | APPL0 21 | X 22 | N 23 | 24 | 25 | 26 | CLIENT 27 | X 28 | 0 29 | C 30 | 000006 31 | X 32 | CLNT 33 | 000003 34 | CLNT 35 | 36 | 37 | .INCLUDE 38 | X 39 | 0 40 | ZAPS_TASK_STORAGE_KEY 41 | X 42 | S 43 | APS: Key of a stored task 44 | S 45 | 46 | 47 | STATUS 48 | ZAPS_TASK_STATUS 49 | 0 50 | X 51 | F 52 | E 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zaps_taskstore.tabl.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASKSTORE 7 | E 8 | TRANSP 9 | X 10 | X 11 | APS: temporary storage of serialized tasks 12 | E 13 | X 14 | L 15 | 1 16 | 17 | 18 | ZAPS_TASKSTORE 19 | A 20 | 0 21 | APPL0 22 | N 23 | 24 | 25 | 26 | MANDT 27 | X 28 | 0 29 | C 30 | 000006 31 | X 32 | CLNT 33 | 000003 34 | CLNT 35 | 36 | 37 | RELID 38 | X 39 | INDX_RELID 40 | 0 41 | X 42 | E 43 | 44 | 45 | .INCLUDE 46 | X 47 | 0 48 | ZAPS_TASK_STORAGE_KEY 49 | X 50 | S 51 | APS: Key of a stored task 52 | S 53 | 54 | 55 | USERID 56 | SYUNAME 57 | 0 58 | E 59 | 60 | 61 | TIMESTAMP 62 | TIMESTAMP 63 | 0 64 | E 65 | 66 | 67 | CLUSTD 68 | INDX_CLUST_BLOB 69 | 0 70 | E 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcl_aps_task_storage_db.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STORAGE_DB 7 | E 8 | APS: Task storage of type DB 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcl_aps_task_storage_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_storage_factory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | "!

Returns the current task storage Object

9 | "! 10 | "! @parameter result |

task storage object

11 | provide 12 | returning 13 | value(result) type ref to zif_aps_task_storage. 14 | protected section. 15 | private section. 16 | class-data: 17 | currentTaskStorage type ref to zif_aps_task_storage. 18 | endclass. 19 | 20 | 21 | 22 | class zcl_aps_task_storage_factory implementation. 23 | 24 | method provide. 25 | if not currentTaskStorage is bound. 26 | currentTaskStorage = new zcl_aps_task_storage_db( ). 27 | endif. 28 | 29 | result = currentTaskStorage. 30 | endmethod. 31 | 32 | endclass. 33 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcl_aps_task_storage_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STORAGE_FACTORY 7 | E 8 | APS: Task storage factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | ZCL_APS_TASK_STORAGE_FACTORY 17 | PROVIDE 18 | E 19 | Returns the current task storage Object 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_serialization.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_serialization definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_serialization, 15 | msgid type symsgid value 'ZAPS_TASK_STORAGE', 16 | msgno type symsgno value '002', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_serialization. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_serialization 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_task_serialization implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_serialization.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_SERIALIZATION 7 | E 8 | APS: Error during task serialization or deserialization. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_SERIALIZATION 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_status.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_status definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_status, 15 | msgid type symsgid value 'ZAPS_TASK_STORAGE', 16 | msgno type symsgno value '003', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_status. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_status 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_task_status implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_status.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_STATUS 7 | E 8 | APS: Error setting task status. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_STATUS 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_storage.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_storage definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_storage, 15 | msgid type symsgid value 'ZAPS_TASK_STORAGE', 16 | msgno type symsgno value '001', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_storage. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_storage 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_task_storage implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zcx_aps_task_storage.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_STORAGE 7 | E 8 | APS: Error during task storage or load. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_STORAGE 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zif_aps_task_storage.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_task_storage 2 | public. 3 | methods: 4 | storeTask 5 | importing 6 | i_task type ref to zif_aps_task 7 | raising 8 | zcx_aps_task_storage 9 | zcx_aps_task_serialization, 10 | 11 | loadSingleTask 12 | importing 13 | i_runId type zaps_run_id 14 | i_taskid type zaps_taskid 15 | i_keepOnDB type abap_bool default abap_false 16 | returning 17 | value(result) type ref to zif_aps_task 18 | raising 19 | zcx_aps_task_storage 20 | zcx_aps_task_serialization, 21 | 22 | loadAllTasks 23 | importing 24 | i_runId type zaps_run_id 25 | returning 26 | value(result) type zaps_task_chain 27 | raising 28 | zcx_aps_task_storage 29 | zcx_aps_task_serialization, 30 | 31 | loadTasksForRetry 32 | importing 33 | i_runId type zaps_run_id 34 | returning 35 | value(result) type zaps_task_chain 36 | raising 37 | zcx_aps_task_storage 38 | zcx_aps_task_serialization, 39 | 40 | loadTasksForResume 41 | importing 42 | i_runId type zaps_run_id 43 | returning 44 | value(result) type zaps_task_chain 45 | raising 46 | zcx_aps_task_storage 47 | zcx_aps_task_serialization, 48 | 49 | settaskstatuscreated 50 | importing 51 | i_runId type zaps_run_id 52 | i_taskid type zaps_taskid 53 | raising 54 | zcx_aps_task_status, 55 | 56 | settaskstatusstarted 57 | importing 58 | i_runId type zaps_run_id 59 | i_taskid type zaps_taskid 60 | raising 61 | zcx_aps_task_status, 62 | 63 | settaskstatusfinished 64 | importing 65 | i_runId type zaps_run_id 66 | i_taskid type zaps_taskid 67 | raising 68 | zcx_aps_task_status, 69 | 70 | settaskstatusaborted 71 | importing 72 | i_runId type zaps_run_id 73 | i_taskid type zaps_taskid 74 | raising 75 | zcx_aps_task_status. 76 | endinterface. 77 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_task_storage/zif_aps_task_storage.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_TASK_STORAGE 7 | E 8 | APS: Storage of tasks and task data 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_tasks/zaps_taskid.dtel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZAPS_TASKID 7 | E 8 | SYSUUID_C 9 | 55 10 | 10 11 | 20 12 | 40 13 | APS: Task ID 14 | TaskID 15 | TaskID 16 | TaskID 17 | TaskID 18 | E 19 | D 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_executable_object.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_executable_object definition 2 | public 3 | abstract 4 | create public. 5 | 6 | public section. 7 | methods: 8 | constructor 9 | importing 10 | i_parameterSet type ref to zif_aps_parameterset_object, 11 | 12 | start abstract. 13 | 14 | protected section. 15 | data: 16 | parameterSet type ref to zif_aps_parameterset_object. 17 | 18 | private section. 19 | endclass. 20 | 21 | 22 | 23 | class zcl_aps_executable_object implementation. 24 | 25 | method constructor. 26 | parameterSet = i_parameterSet. 27 | endmethod. 28 | 29 | endclass. 30 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_executable_object.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_EXECUTABLE_OBJECT 7 | E 8 | APS: abstract superclass of an executable object 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task definition 2 | public 3 | abstract 4 | create protected. 5 | 6 | public section. 7 | interfaces: 8 | zif_aps_task 9 | abstract methods start. 10 | 11 | methods: 12 | constructor 13 | importing 14 | i_settings type ref to zif_aps_settings. 15 | 16 | protected section. 17 | data: 18 | taskId type zaps_taskId, 19 | packageToBeProcessed type zaps_package, 20 | settings type ref to zif_aps_settings. 21 | 22 | private section. 23 | endclass. 24 | 25 | 26 | 27 | class zcl_aps_task implementation. 28 | method zif_aps_task~getappid. 29 | result = settings->getAppId( ). 30 | endmethod. 31 | 32 | method zif_aps_task~getconfigid. 33 | result = settings->getConfigId( ). 34 | endmethod. 35 | 36 | method zif_aps_task~gettaskid. 37 | result = taskId. 38 | endmethod. 39 | 40 | method zif_aps_task~setpackage. 41 | packageToBeProcessed = i_package. 42 | endmethod. 43 | 44 | method constructor. 45 | settings = i_settings. 46 | 47 | try. 48 | taskId = cl_system_uuid=>create_uuid_c32_static( ). 49 | catch cx_uuid_error. 50 | " In a normal running system this should never happen 51 | " Fallback: Timestamp long (27 char) and random number 52 | try. 53 | data(currentTimeStamp) = value timestampl( ). 54 | data(fillUp) = cl_abap_random=>create( )->packedinrange( 55 | min = '10000' 56 | max = '99999' 57 | ). 58 | catch cx_abap_random. 59 | fillUp = '4242'. 60 | endtry. 61 | 62 | taskId = |{ currentTimeStamp }{ fillUp }|. 63 | endtry. 64 | endmethod. 65 | 66 | 67 | method zif_aps_task~setStatusCreated. 68 | zcl_aps_task_storage_factory=>provide( )->settaskstatuscreated( 69 | i_runId = settings->getRunId( ) 70 | i_taskid = taskId 71 | ). 72 | endmethod. 73 | 74 | 75 | method zif_aps_task~setStatusFinished. 76 | zcl_aps_task_storage_factory=>provide( )->settaskstatusFinished( 77 | i_runId = settings->getRunId( ) 78 | i_taskid = taskId 79 | ). 80 | endmethod. 81 | 82 | 83 | method zif_aps_task~setStatusStarted. 84 | zcl_aps_task_storage_factory=>provide( )->settaskstatusStarted( 85 | i_runId = settings->getRunId( ) 86 | i_taskid = taskId 87 | ). 88 | endmethod. 89 | 90 | 91 | method zif_aps_task~setStatusAborted. 92 | zcl_aps_task_storage_factory=>provide( )->settaskstatusAborted( 93 | i_runId = settings->getRunId( ) 94 | i_taskid = taskId 95 | ). 96 | endmethod. 97 | 98 | 99 | method zif_aps_task~getPackage. 100 | result = packageToBeProcessed. 101 | endmethod. 102 | 103 | 104 | method zif_aps_task~getRunId. 105 | result = settings->getRunId( ). 106 | endmethod. 107 | 108 | endclass. 109 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK 7 | E 8 | APS: Task 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_factory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | provide 9 | importing 10 | i_settings type ref to zif_aps_settings 11 | i_packageData type zaps_package 12 | returning 13 | value(result) type ref to zif_aps_task 14 | raising 15 | zcx_aps_task_invalid_class 16 | zcx_aps_task_instanciation_err 17 | zcx_aps_task_unknown_exec_type. 18 | 19 | protected section. 20 | private section. 21 | endclass. 22 | 23 | 24 | 25 | class zcl_aps_task_factory implementation. 26 | method provide. 27 | case i_settings->getTypeOfExecutable( ). 28 | when i_settings->executableTypeReport. 29 | result = new zcl_aps_task_report( i_settings ). 30 | 31 | when i_settings->executableTypeFuncUnit. 32 | result = new zcl_aps_task_functionunit( i_settings ). 33 | 34 | when i_settings->executableTypeObject. 35 | result = new zcl_aps_task_object( i_settings ). 36 | 37 | when others. 38 | raise exception 39 | type zcx_aps_task_unknown_exec_type 40 | exporting 41 | i_executabletype = i_settings->getTypeOfExecutable( ). 42 | endcase. 43 | 44 | result->setPackage( i_packageData ). 45 | 46 | endmethod. 47 | 48 | endclass. 49 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_FACTORY 7 | E 8 | APS: Task factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_functionunit.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_functionunit definition 2 | public 3 | inheriting from zcl_aps_task 4 | final 5 | create private 6 | global friends zcl_aps_task_factory. 7 | 8 | public section. 9 | methods: 10 | zif_aps_task~start redefinition. 11 | 12 | protected section. 13 | private section. 14 | endclass. 15 | 16 | 17 | 18 | class zcl_aps_task_functionunit implementation. 19 | method zif_aps_task~start. 20 | loop at packageToBeProcessed-selections 21 | into data(parameterSet). 22 | 23 | try. 24 | data(funcUnitParameterSet) = cast zif_aps_parameterset_func( parameterSet ). 25 | catch cx_sy_move_cast_error. 26 | continue. 27 | endtry. 28 | 29 | data(functionUnitParameterTable) = funcUnitParameterSet->getParametersTab( ). 30 | data(functionUnitExceptionTable) = funcUnitParameterSet->getExceptionsTab( ). 31 | data(functionUnitToBeCalled) = settings->getNameOfExecutable( ). 32 | 33 | 34 | try. 35 | call function functionUnitToBeCalled 36 | parameter-table functionUnitParameterTable 37 | exception-table functionUnitExceptionTable. 38 | 39 | if sy-subrc <> 0. 40 | raise exception 41 | type zcx_aps_executable_call_error. 42 | endif. 43 | catch cx_sy_dyn_call_illegal_func 44 | cx_sy_dyn_call_illegal_type 45 | cx_sy_dyn_call_param_missing 46 | cx_sy_dyn_call_param_not_found 47 | into data(callError). 48 | raise exception 49 | type zcx_aps_executable_call_error 50 | exporting 51 | i_previous = callError. 52 | endtry. 53 | endloop. 54 | endmethod. 55 | 56 | endclass. 57 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_functionunit.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_FUNCTIONUNIT 7 | E 8 | APS: Task that starts a function unit 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_object.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_object definition 2 | public 3 | inheriting from zcl_aps_task 4 | final 5 | create private 6 | global friends zcl_aps_task_factory. 7 | 8 | public section. 9 | methods: 10 | zif_aps_task~start redefinition. 11 | protected section. 12 | private section. 13 | endclass. 14 | 15 | 16 | 17 | class zcl_aps_task_object implementation. 18 | method zif_aps_task~start. 19 | data: 20 | executableObject type ref to zcl_aps_executable_object. 21 | 22 | data(classnameOfExecutable) = conv classname( settings->getNameOfExecutable( ) ). 23 | 24 | " This one is specified in the customizing. 25 | " We definitely have to be sure it is of the right type 26 | select single @abap_true 27 | from seometarel 28 | where clsname eq @classnameOfExecutable 29 | and refclsname eq 'ZCL_APS_EXECUTABLE_OBJECT' 30 | and reltype eq '2' " inheriting from 31 | into @data(inheritsFromAPSTask). 32 | 33 | if sy-subrc ne 0. 34 | data(errorInvalidClass) = new zcx_aps_task_invalid_class( ). 35 | 36 | raise exception 37 | type zcx_aps_executable_call_error 38 | exporting 39 | i_previous = errorInvalidClass. 40 | endif. 41 | 42 | loop at packageToBeProcessed-selections 43 | into data(parameterSet). 44 | try. 45 | create object executableObject 46 | type (classnameOfExecutable) 47 | exporting 48 | i_parameterSet = cast zif_aps_parameterset_object( parameterSet ). 49 | 50 | executableObject->start( ). 51 | 52 | catch cx_sy_move_cast_error 53 | cx_sy_create_object_error 54 | into data(previousInstanciationError). 55 | data(instanciationError) = new zcx_aps_task_instanciation_err( 56 | i_previous = previousInstanciationError 57 | i_classname = classnameOfExecutable 58 | ). 59 | 60 | raise exception 61 | type zcx_aps_executable_call_error 62 | exporting 63 | i_previous = instanciationError. 64 | endtry. 65 | endloop. 66 | endmethod. 67 | 68 | endclass. 69 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_object.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_OBJECT 7 | E 8 | APS: Task that calls a method of an object 9 | 1 10 | X 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_report.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_report definition 2 | public 3 | inheriting from zcl_aps_task 4 | final 5 | create private 6 | global friends zcl_aps_task_factory. 7 | 8 | public section. 9 | methods: 10 | zif_aps_task~start redefinition. 11 | protected section. 12 | private section. 13 | endclass. 14 | 15 | 16 | 17 | class zcl_aps_task_report implementation. 18 | method zif_aps_task~start. 19 | loop at packageToBeProcessed-selections 20 | into data(parameterSet). 21 | try. 22 | data(reportParameters) = cast zif_aps_parameterset_report( parameterSet ). 23 | catch cx_sy_move_cast_error. 24 | continue. 25 | endtry. 26 | 27 | data(selectionScreenData) = reportParameters->getSelectionsTable( ). 28 | data(reportName) = settings->getNameOfExecutable( ). 29 | 30 | submit (reportName) 31 | with selection-table selectionScreenData 32 | and return. 33 | endloop. 34 | endmethod. 35 | 36 | endclass. 37 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_report.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_REPORT 7 | E 8 | APS: Task that starts a report 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_starter.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_starter definition 2 | public 3 | abstract 4 | create protected. 5 | 6 | public section. 7 | interfaces: 8 | zif_aps_task_starter 9 | all methods abstract. 10 | 11 | methods: 12 | constructor 13 | importing 14 | i_settings type ref to zif_aps_settings. 15 | 16 | protected section. 17 | data: 18 | settings type ref to zif_aps_settings. 19 | 20 | methods: 21 | createTask 22 | importing 23 | taskData type ref to zaps_package 24 | returning 25 | value(result) type ref to zif_aps_task 26 | raising 27 | zcx_aps_task_creation_error. 28 | 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcl_aps_task_starter implementation. 35 | method constructor. 36 | settings = i_settings. 37 | endmethod. 38 | 39 | 40 | method createTask. 41 | try. 42 | result = zcl_aps_task_factory=>provide( 43 | i_settings = settings 44 | i_packagedata = taskdata->* 45 | ). 46 | 47 | result->setstatuscreated( ). 48 | catch zcx_aps_task_invalid_class 49 | zcx_aps_task_instanciation_err 50 | zcx_aps_task_unknown_exec_type 51 | zcx_aps_task_status 52 | into data(detailedError). 53 | raise exception 54 | type zcx_aps_task_creation_error 55 | exporting 56 | i_previous = detailedError. 57 | endtry. 58 | endmethod. 59 | 60 | endclass. 61 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_starter.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STARTER 7 | E 8 | APS: Task starter 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_starter_factory.clas.abap: -------------------------------------------------------------------------------- 1 | class zcl_aps_task_starter_factory definition 2 | public 3 | final 4 | create public. 5 | 6 | public section. 7 | class-methods: 8 | provide 9 | importing 10 | i_settings type ref to zif_aps_settings 11 | returning 12 | value(result) type ref to zif_aps_task_starter 13 | raising 14 | zcx_aps_settings_unknown_app 15 | zcx_aps_settings_unknown_conf. 16 | protected section. 17 | private section. 18 | endclass. 19 | 20 | 21 | 22 | class zcl_aps_task_starter_factory implementation. 23 | method provide. 24 | result = switch #( 25 | i_settings->gettasktype( ) 26 | when i_settings->taskTypeBatch 27 | then new zcl_aps_task_starter_batch( i_settings ) 28 | when i_settings->taskTypeDialog 29 | then new zcl_aps_task_starter_dialog( i_settings ) 30 | ). 31 | endmethod. 32 | 33 | endclass. 34 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcl_aps_task_starter_factory.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_APS_TASK_STARTER_FACTORY 7 | E 8 | APS: Task starter factory 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_executable_call_error.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_executable_call_error definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_executable_call_error, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '010', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_executable_call_error. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_executable_call_error 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_executable_call_error implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_executable_call_error.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_EXECUTABLE_CALL_ERROR 7 | E 8 | APS: The executable could not be executed. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_EXECUTABLE_CALL_ERROR 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_job_creation_error.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_job_creation_error definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_job_creation_error, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '009', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_job_creation_error. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_job_creation_error 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_job_creation_error implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_job_creation_error.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_JOB_CREATION_ERROR 7 | E 8 | APS: The executable class could not be instanciated. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_JOB_CREATION_ERROR 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_jobs_aborted.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_jobs_aborted definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_jobs_aborted, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '011', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_jobs_aborted. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_jobs_aborted 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_jobs_aborted implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_jobs_aborted.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_JOBS_ABORTED 7 | E 8 | APS: The executable could not be executed. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_JOBS_ABORTED 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_creation_error.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_creation_error definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_creation_error, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '008', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_creation_error. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_creation_error 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_task_creation_error implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_creation_error.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_CREATION_ERROR 7 | E 8 | APS: The executable class could not be instanciated. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_CREATION_ERROR 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_instanciation_err.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_instanciation_err definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_invalid_class, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '002', 17 | attr1 type scx_attrname value 'CLASSNAME', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_invalid_class. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_invalid_class 27 | i_previous type ref to cx_root optional 28 | i_className type classname. 29 | protected section. 30 | private section. 31 | data: 32 | className type classname. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_task_instanciation_err implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | className = i_className. 47 | endmethod. 48 | endclass. 49 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_instanciation_err.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_INSTANCIATION_ERR 7 | E 8 | APS: The executable class could not be instanciated. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_INSTANCIATION_ERR 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_invalid_class.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_invalid_class definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_invalid_class, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '001', 17 | attr1 type scx_attrname value '', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_invalid_class. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_invalid_class 27 | i_previous type ref to cx_root optional. 28 | protected section. 29 | private section. 30 | endclass. 31 | 32 | 33 | 34 | class zcx_aps_task_invalid_class implementation. 35 | 36 | 37 | method constructor ##ADT_SUPPRESS_GENERATION. 38 | super->constructor( previous = i_previous ). 39 | clear textid. 40 | 41 | if_t100_message~t100key = i_textid. 42 | endmethod. 43 | endclass. 44 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_invalid_class.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_INVALID_CLASS 7 | E 8 | APS: The class does not inherit from ZCL_APS_TASK 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_INVALID_CLASS 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_unknown_exec_type.clas.abap: -------------------------------------------------------------------------------- 1 | class zcx_aps_task_unknown_exec_type definition 2 | public 3 | inheriting from cx_static_check 4 | final 5 | create public. 6 | 7 | public section. 8 | 9 | interfaces: 10 | if_t100_dyn_msg, 11 | if_t100_message. 12 | 13 | constants: 14 | begin of zcx_aps_task_unknown_exec_type, 15 | msgid type symsgid value 'ZAPS_TASK', 16 | msgno type symsgno value '003', 17 | attr1 type scx_attrname value 'EXECUTABLETYPE', 18 | attr2 type scx_attrname value '', 19 | attr3 type scx_attrname value '', 20 | attr4 type scx_attrname value '', 21 | end of zcx_aps_task_unknown_exec_type. 22 | 23 | methods: 24 | constructor 25 | importing 26 | i_textid type scx_t100key default zcx_aps_task_unknown_exec_type 27 | i_previous type ref to cx_root optional 28 | i_executableType type zaps_executable_type. 29 | protected section. 30 | private section. 31 | data: 32 | executableType type zaps_executable_type. 33 | endclass. 34 | 35 | 36 | 37 | class zcx_aps_task_unknown_exec_type implementation. 38 | 39 | 40 | method constructor ##ADT_SUPPRESS_GENERATION. 41 | super->constructor( previous = i_previous ). 42 | clear textid. 43 | 44 | if_t100_message~t100key = i_textid. 45 | 46 | executableType = i_executableType. 47 | endmethod. 48 | endclass. 49 | -------------------------------------------------------------------------------- /src/zaps_tasks/zcx_aps_task_unknown_exec_type.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCX_APS_TASK_UNKNOWN_EXEC_TYPE 7 | E 8 | APS: The executable class could not be instanciated. 9 | 40 10 | 1 11 | X 12 | X 13 | X 14 | 15 | 16 | 17 | ZCX_APS_TASK_UNKNOWN_EXEC_TYPE 18 | CONSTRUCTOR 19 | E 20 | CONSTRUCTOR 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/zaps_tasks/zif_aps_task.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_task 2 | public. 3 | interfaces: 4 | if_serializable_object. 5 | 6 | 7 | methods: 8 | getAppId 9 | returning 10 | value(result) type zaps_appid, 11 | 12 | getConfigId 13 | returning 14 | value(result) type zaps_configid, 15 | 16 | getRunId 17 | returning 18 | value(result) type zaps_run_id, 19 | 20 | getTaskId 21 | returning 22 | value(result) type zaps_taskid, 23 | 24 | setPackage 25 | importing 26 | i_package type zaps_package, 27 | 28 | getPackage 29 | returning 30 | value(result) type zaps_package, 31 | 32 | start 33 | raising 34 | zcx_aps_executable_call_error, 35 | 36 | setstatuscreated 37 | raising 38 | zcx_aps_task_status, 39 | 40 | setstatusstarted 41 | raising 42 | zcx_aps_task_status, 43 | 44 | setstatusfinished 45 | raising 46 | zcx_aps_task_status, 47 | 48 | setstatusaborted 49 | raising 50 | zcx_aps_task_status. 51 | 52 | endinterface. 53 | -------------------------------------------------------------------------------- /src/zaps_tasks/zif_aps_task.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_TASK 7 | E 8 | APS: Task 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/zaps_tasks/zif_aps_task_starter.intf.abap: -------------------------------------------------------------------------------- 1 | interface zif_aps_task_starter 2 | public. 3 | methods: 4 | "!

Starts a parallel execution

5 | "! 6 | "! @parameter i_packages |

List of packages to be started as tasks

7 | "! @parameter result |

parameter sets containing the results

8 | "! @raising zcx_aps_task_creation_error |

error creating tasks

9 | "! @raising zcx_aps_job_creation_error |

error creating job

10 | "! @raising zcx_aps_jobs_aborted |

at least one job aborted

11 | start 12 | importing 13 | i_packages type ref to zaps_packages 14 | returning 15 | value(result) type zaps_parameter_set_list 16 | raising 17 | zcx_aps_task_creation_error 18 | zcx_aps_job_creation_error 19 | zcx_aps_jobs_aborted, 20 | 21 | "!

Restarts an execution with all aborted and intial tasks

22 | "! @parameter result |

parameter sets containing the results

23 | "! @raising zcx_aps_task_creation_error |

Error creating the tasks

24 | "! @raising zcx_aps_job_creation_error |

Error creating the jobs

25 | "! @raising zcx_aps_jobs_aborted |

at least one job aborted

26 | retry 27 | returning 28 | value(result) type zaps_parameter_set_list 29 | raising 30 | zcx_aps_task_creation_error 31 | zcx_aps_job_creation_error 32 | zcx_aps_jobs_aborted, 33 | 34 | "!

Restarts an execution with only the intial tasks

35 | "! @parameter result |

parameter sets containing the results

36 | "! @raising zcx_aps_task_creation_error |

Error creating the tasks

37 | "! @raising zcx_aps_job_creation_error |

Error creating the jobs

38 | "! @raising zcx_aps_jobs_aborted |

at least one job aborted

39 | resume 40 | returning 41 | value(result) type zaps_parameter_set_list 42 | raising 43 | zcx_aps_task_creation_error 44 | zcx_aps_job_creation_error 45 | zcx_aps_jobs_aborted. 46 | endinterface. 47 | -------------------------------------------------------------------------------- /src/zaps_tasks/zif_aps_task_starter.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_APS_TASK_STARTER 7 | E 8 | APS: Task Starter 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | ZIF_APS_TASK_STARTER 16 | RESUME 17 | E 18 | Restarts an execution with only the intial tasks 19 | 20 | 21 | ZIF_APS_TASK_STARTER 22 | RETRY 23 | E 24 | Restarts an execution with all aborted and intial tasks 25 | 26 | 27 | ZIF_APS_TASK_STARTER 28 | START 29 | E 30 | Starts a parallel execution 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/zaps_tasks/ztd_aps_task_object.clas.abap: -------------------------------------------------------------------------------- 1 | class ztd_aps_task_object definition 2 | public 3 | inheriting from zcl_aps_task 4 | final 5 | create public 6 | for testing 7 | duration short 8 | risk level harmless. 9 | 10 | public section. 11 | methods: 12 | zif_aps_task~start redefinition. 13 | 14 | protected section. 15 | private section. 16 | endclass. 17 | 18 | 19 | 20 | class ztd_aps_task_object implementation. 21 | 22 | method zif_aps_task~start. 23 | 24 | endmethod. 25 | 26 | endclass. 27 | -------------------------------------------------------------------------------- /src/zaps_tasks/ztd_aps_task_object.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZTD_APS_TASK_OBJECT 7 | E 8 | APS: Test Double Task of type object 9 | 05 10 | 1 11 | X 12 | X 13 | X 14 | 12 15 | 11 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/zcl_parallelization_service.clas.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZCL_PARALLELIZATION_SERVICE 7 | E 8 | APS: central parallelization entry point 9 | 1 10 | X 11 | X 12 | X 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/zif_parallelization_service.intf.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ZIF_PARALLELIZATION_SERVICE 7 | E 8 | APS: central parallelization entry point 9 | 2 10 | 1 11 | X 12 | 13 | 14 | 15 | ZIF_PARALLELIZATION_SERVICE 16 | GETFUNCPARAMETERSETS 17 | E 18 | Function Unit parameter sets after execution 19 | 20 | 21 | ZIF_PARALLELIZATION_SERVICE 22 | GETOBJECTPARAMETERSETS 23 | E 24 | Object parameter sets after execution 25 | 26 | 27 | ZIF_PARALLELIZATION_SERVICE 28 | RESUME 29 | E 30 | Restarts an execution with only the intial tasks 31 | 32 | 33 | ZIF_PARALLELIZATION_SERVICE 34 | RETRY 35 | E 36 | Restarts an execution with all aborted and intial tasks 37 | 38 | 39 | ZIF_PARALLELIZATION_SERVICE 40 | START 41 | E 42 | Starts a parallel execution of App with Config 43 | 44 | 45 | 46 | 47 | 48 | --------------------------------------------------------------------------------