I am creating a class which is used to create idocs within in the system. I want this object to be dynamic so that the same can be reused. As a part of this class, one of the method would create the segments for the idocs. My idea was to pass the segment name to this method and it should dynamically determine the components of the structure. I was hoping to get this done simply via field symbols and data references instead of using the RTTS process.
The last statement obviously throws an error stating " The data object "<FS_SEGMENT>" has no structure and therefore no component called "COMP_CODE" which makes absolute sense but how do I overcome this without using RTTS?
Thanks,
Vikram.M