Avoid accessing in-correct run-control parameters in the AE programs

Run control parameters are accessed at the first step in all the AE programs. It will be stored in AET record and will be processed across different steps and sections. If the run control parameters are stored in the multiple records with parent child relations ships. Eg:- list of the job codes , Departments & Business units. Since we cannot store multiple rows in the AET/State record, we access these records in the sql directly where it is required to access the parameters. It method works fine until same user runs the same process with same run control id again with different run-control parameters before the earlier process completes its execution.

Problems :- first process will end up using the incorrect parameters that is assigned for the second process.
Result can be unexpected, based on the run-control parameters changed by the user. Accessing the run control parameters in the AE program other than beginning step can always create problem.

Solution :-
User training can be one of the solution, but it will be better if the program can handle it without any additional user training.

Create an additional table with keys OPRID, RUN_CNTRL_ID  and other keys and fields specific to the run-control parameters of the AE process. In the beginning step, insert all the multi-row runcontrol parameters in to this record and level zero parameters in the AET record. In the process, where ever you need to use the multi-row runcontrol parameters use the new record created , instead of the actual runcontrol table used on the page/component. Delete these rows from this new record at the end of the process. Access and deletion of the rows from the table should be based on the key fields OPRID,RUN_CNTRL_ID.