‎2020 Mar 17 10:29 AM
DATA: Begin of before_image occurs 10.
include structure prelp.
DATA: end of before_image.
PERFORM update TABLES IT_P0001.
PERFORM update TABLES IT_P0015.
FORM update TABLES old_tab.
MOVE old_tab to before_image.
ENDFORM.
Hi,
The above code worked in the old non-unicode environment, however of course now in unicode
doesn't work. How do I correct this when I don't know what structure will be passed to my
subroutine?
‎2020 Mar 17 1:00 PM
With Unicode, there's a stricter check of operations between structured tables, and between structures. As you can see yourself, PRELP has not the same structure as PA0001, and not the same structure as PA0015. Eventually it fails only on PA0015 because it contains numeric fields which are not authorized to be moved to character fields.
The forum has already answered such question, so I let you search. Hint: FILL_CONTAINER_C.
‎2020 Mar 17 10:37 AM
In UC environments it is not allowed to move one Structure to another when they hav different lengths.
In your case: I suspect your table Definition is the problem. Instead of including a Single Structure declared the Internal table directly with this line type. Please also ensure that the line type of old_tab is also prelp.
Data:
before_Image type Standard table of prelp.
‎2020 Mar 17 1:00 PM
With Unicode, there's a stricter check of operations between structured tables, and between structures. As you can see yourself, PRELP has not the same structure as PA0001, and not the same structure as PA0015. Eventually it fails only on PA0015 because it contains numeric fields which are not authorized to be moved to character fields.
The forum has already answered such question, so I let you search. Hint: FILL_CONTAINER_C.