This is quite a complex ABAP question. I suggest it is not suitable for an ABAP beginner. In order to be able to support the solution in future, it really should be handed over to someone who knows what they are doing.
As an ABAP developer in a BW environment, I know the harm that can be caused by inexperienced programmers .