I recently had the problem to use polymorphy in two structures which had
to be bound depending on the user type. They both needed to be testet
on a common component. At first i did a dynamic way assigning the
structure to TYPE ANY TABLE and then using components assigns.
This is always kind of depressing because dynamic allocations in large
projects may have severe failure impacts, if they are changed a year
later due to some requests. A less finesse but sturdier way is to use a
superstructure, move everything in it, do your tests in a loop, and then
use the sy-index for the target itabs.
An Example:
User Paul shall only see a structure with components A and B
User Andy shall only see B and C
You do a superstructure A B C for all your Methods and internal behaviour.
Just before you are ready for presentation you declare the corresponding
itab for your user type and then MOVE-CORRESPONDING all from source to
target.
Serkan AKKAVAK Computer Engineer SAP Department Deputy Manager Contact : serkurumsal@yandex.com
Social Plugin