2014 Jul 01 10:45 AM
Hello.
I was toying around a bit creating benchmarks with some code that manipulates mainly internal tables.
In attempt to compile it I got this error:
| Help for Error | Program Z06_TABLE_LINE | 56 | Error |
| "WA_INT-PDAT" and "WA_PA02" are not mutually convertible. In Unicode | |||
| programs, "WA_INT-PDAT" must have the same structure layout as | |||
| "WA_PA02", independent of the length of a Unicode character. |
Which is strange for me, because I just want to copy a structure of table pa0002 into another structure of table pa0002.
So I had to create a rather clumsy workaround.
*-----------------BUGGER ON ----------------------
wa_int-pdat = wa_pa02. "Here's the Problem!
*-----------------BUGGER OFF----------------------
*---------CLUMSY WORKAROUND ON -------------------
* wa_int-pdat-vorna = wa_pa02-vorna.
* wa_int-pdat-nachn = wa_pa02-nachn.
* wa_int-pdat-gbdat = wa_pa02-gbdat.
*---------CLUMSY WORKAROUND OFF-------------------
where wa_int is defined based on type t_itint.
TYPES: BEGIN OF t_itint,
rnum TYPE i,
tstm TYPE i,
pdat TYPE p0002,
END OF t_itint.
DATA it_int TYPE TABLE OF t_itintDATA wa_int TYPE t_itint.
and wa_pa02 is defined as a structure like the table header of the dictionary table pa0002.
DATA: it_pa02 TYPE TABLE OF pa0002,
wa_pa02 TYPE pa0002.
The clumsy workaround works. [Code block 1 lines 7 to 9]
Copying seemingly identical typed variables does not work. [Code block 1 line 2]
I am definitely missing something, just cannot see what.
2014 Jul 01 10:56 AM
Hi,
the structure of Pa0002 is different from P0002.
Please check once.
P0002 has two include structures PSHDR ans PS0002.
Pa0002 has 3 include structures PAKEY,PSHD1,PS0002
Hello.
I was toying around a bit creating benchmarks with some code that manipulates mainly internal tables.
In attempt to compile it I got this error:
| Help for Error | Program Z06_TABLE_LINE | 56 | Error |
| "WA_INT-PDAT" and "WA_PA02" are not mutually convertible. In Unicode | |||
| programs, "WA_INT-PDAT" must have the same structure layout as | |||
| "WA_PA02", independent of the length of a Unicode character. |
Which is strange for me, because I just want to copy a structure of table pa0002 into another structure of table pa0002.
So I had to create a rather clumsy workaround.
*-----------------BUGGER ON ----------------------
wa_int-pdat = wa_pa02. "Here's the Problem!
*-----------------BUGGER OFF----------------------
*---------CLUMSY WORKAROUND ON -------------------
* wa_int-pdat-vorna = wa_pa02-vorna.
* wa_int-pdat-nachn = wa_pa02-nachn.
* wa_int-pdat-gbdat = wa_pa02-gbdat.
*---------CLUMSY WORKAROUND OFF-------------------
where wa_int is defined based on type t_itint.
TYPES: BEGIN OF t_itint,
rnum TYPE i,
tstm TYPE i,
pdat TYPE p0002,
END OF t_itint.
DATA it_int TYPE TABLE OF t_itintDATA wa_int TYPE t_itint.
and wa_pa02 is defined as a structure like the table header of the dictionary table pa0002.
DATA: it_pa02 TYPE TABLE OF pa0002,
wa_pa02 TYPE pa0002.
The clumsy workaround works. [Code block 1 lines 7 to 9]
Copying seemingly identical typed variables does not work. [Code block 1 line 2]
I am definitely missing something, just cannot see what.
2014 Jul 01 10:47 AM
Hi,
didn't you try to put a structure into a variable ?
regards
Fred
2014 Jul 01 10:58 AM
Hi Frédéric,
in my eyes not.
wa_pa02 should be a structure.
wa_int-pdat should be a stucture within the deep structure defined by t_itint.
So
wa_int-pdat = wa_pa02.
should copy a structure into another stucture that is part of a deep structure.
2014 Jul 01 10:56 AM
Hi,
the structure of Pa0002 is different from P0002.
Please check once.
P0002 has two include structures PSHDR ans PS0002.
Pa0002 has 3 include structures PAKEY,PSHD1,PS0002
2014 Jul 01 11:00 AM
Oh my!
It was a simple typo!
Indeed p0002 is different from pa0002.
It simply didn't see it.
Thanks Gowtham!
I apologize for this.
Should have seen it, but ever after some hours didn't.