2007 Feb 14 5:20 PM
Hello,
i am trying to transfer a table from one function to another and i am getting a run time error saying that:
although the currently specified field 'tempdraw' is the correct type, its length is incorrect.
so what seems to be the problem?
here is a code sample.
i have to transfer table from function1 to function2. here is what i am doing:
function function1
DATA: tempdraw like draw occurs 0.
data: wa like line of tdraw.
loop at tdraw into wa.
append wa to tempdraw.
endloop.
call function function2
exporting tempdraw.
.....
endfunction
function function2
""Local Interface:
*" IMPORTING
*" REFERENCE(TL) LIKE DRAW STRUCTURE DRAW
......
endfunction.
so here i am getting the above stated runtime error.
I even tried to export the table to a memory id in functio1 and then import it in functio2 but this also does not seem to work.
any ideas ?
regards
2007 Feb 14 5:33 PM
Hi,
The tables aren't declared in the function as import to receive a table. You need to declare it in the tables tab.
The error says that you have the same type, but in the import it's an workarea and the table tries to send more than one set of informations at a call.
Award with points the answers that helps you out.
Hi,
The tables aren't declared in the function as import to receive a table. You need to declare it in the tables tab.
The error says that you have the same type, but in the import it's an workarea and the table tries to send more than one set of informations at a call.
Award with points the answers that helps you out.
2007 Feb 14 5:25 PM
2007 Feb 14 5:31 PM
Hi rob
yes, they are of the same type sorry i might have missed the following
code for functio1 starts with
function function1
*"----
""Local Interface:
*" TABLES
*" TDRAW STRUCTURE DRAW OPTIONAL
*"----
.....
......
endfunction
Do you know rob why this is happening ?
2007 Feb 14 5:33 PM
Hi,
The tables aren't declared in the function as import to receive a table. You need to declare it in the tables tab.
The error says that you have the same type, but in the import it's an workarea and the table tries to send more than one set of informations at a call.
Award with points the answers that helps you out.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |