(unicode) dynamic assign
I created a program for remote (RFC) comparison of table contents, especially to check for diefferenced in Customizing. A consutant puts all customizing tables to be compared over systems and clients into the selection variant. This enables quick check for any differences. And it can be repeated anytime.
FUNCTION 'RFC_GET_TABLE_ENTRIES' DESTINATION p_rfc
gets the table entries into a 1000 char wide unstructured table. To get the components entries, I tried to transfer the unstructured char data to structured component:
ps_struc is DDIC structure of table entries
<fts> and <ft> are untyped field symbols
create a data object of the actual DDIC type:
CREATE DATA lr_ref TYPE (ps_struc).
assign the structured component to field-symbol
ASSIGN lr_ref->* TO <fts>.
Loop at 1000 char table ASSIGNING untype field.symbol
LOOP AT pt_tab ASSIGNING <ft>.
move unstructured to structured
<fts> = <ft>.
ASSIGN COMPONENT sy-index OF STRUCTURE <fts> TO <fs>.
IF sy-subrc = 0.
Now the component's contents are assigned to <fs>
This works fine as long as the data are strictly CHAR type. In a unicode-compatible environment (starting with 4.7) dumps are created when there is any numeric component in the structure.
Now I'm looking for a solution. Three options are visible:
1. - check the structure type and ignore tables with non-char components
2. - get (and compare) only char components
3. - get and compare all kind of components
I could find a solution for option 1
For 2 or even 3 I'd be glad to find a way.
Thanks in Advance!