Hi Karri,
Thanks for the suggestion. However, there is a need to instantiate the ABAP object in the program Y_TEST1.
Let's say, I'm checking all material groups to see if the total cost per unit (Num1) for all materials under a material group exceeds an amount X. If it exceeds, then I would need to trigger workflow Y_TEST2. Assuming that the calculation for Num1 is complex and would require high computation power.
In this case, Num1 is a complex derived attribute. If I place the calculation into the ABAP object method CALC_NUM1, and place this method inside the constructor. Then everytime when workflow calls BI_PERSISTENT~FIND_BY_LPOR, it would perform CALC_NUM1. Am I right here?
Given that Y_TEST1 only checks on past years' material group, the data wouldn't change much. Hence, re-calculation would likely return the same result for Num1.
My objective here is to explore if there's a way that I could make the ABAP object attributes persist from Y_TEST1 until workflow Y_TEST2 completes. I would also like to minimize parameter passing into the workflow data container. This is to facilitate minimal changes in the future. For example, if a new attribute is required, we only need to add a new attribute (probably also a new method) to the ABAP object, but changes to workflow template is not required.
Appreciate your further discussion. Please let me know if my understanding is correct.
Regards,
Kuan Lung