‎2009 Nov 25 4:16 AM
HI,
I cannot pass from line type to table type...
REPORT ZTEST_FIRST.
data: itab1 TYPE tdt_docflow,
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
itab1 is filling with docnum.
in second report when i try to import i am not getting values.
REPORT ZTEST_SECOND.
data: itab2 TYPE STANDARD TABLE OF tdt_docflow,
wa_itab2 type tds_docflow.
import itab2 FROM MEMORY ID 'ABCDE'.
BREAK-POINT.
any suggestions?
Giri
‎2009 Nov 25 4:20 AM
HI Giri,
REPORT ZTEST_FIRST.
data: itab1 TYPE tdt_docflow, " This is Like Work Area not Table Type here
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
itab1 is filling with docnum.
in second report when i try to import i am not getting values.
REPORT ZTEST_SECOND.
data: itab2 TYPE STANDARD TABLE OF tdt_docflow, " This is not Work Area type but Internal Table type here
wa_itab2 type tds_docflow.
**
import itab2 FROM MEMORY ID 'ABCDE'. " Hence you need to Change either one of them according to your requirement
BREAK-POINT.
Hope this is clear to you
Cheerz
Ram
‎2009 Nov 25 4:26 AM
Hi ram,
i want to use type standard table in second report....
when i change that in first report... its says not compatible....
how to declare in itab1 in first report and how to pass values?
Giri
‎2009 Nov 25 4:35 AM
Hi Giri,
Try this,
REPORT ZTEST_FIRST.
data: itab1 TYPE TABLE OF tdt_docflow,
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
in the second report :
REPORT ZTEST_SECOND.
data: itab2 TYPE STANDARD TABLE OF tdt_docflow,
wa_itab2 type tds_docflow.
import itab1 to itab2 FROM MEMORY ID 'ABCDE'.
BREAK-POINT.
I tried the above code and it works for me.
‎2009 Nov 25 4:40 AM
Hi vasuki,
i tried with both
REPORT ZTEST_FIRST.
data: itab1 TYPE TABLE OF tdt_docflow,
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
and
REPORT ZTEST_FIRST.
data: itab1 TYPE STANDARD TABLE OF tdt_docflow,
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
i am getting same syntax error - *"WA_ITAB" cannot be converted to the line type of "ITAB1". *
Giri
‎2009 Nov 25 4:44 AM
Change the declaration as follows:
REPORT ZTEST_FIRST.
data: itab1 TYPE TABLE OF tdt_docflow,
wa_itab like line of itab1. "Work area decl changed
REPORT ZTEST_SECOND.
data: itab2 TYPE TABLE OF tdt_docflow,
wa_itab like line of itab2. "Work area decl changed
test this
‎2009 Nov 25 4:49 AM
Hi vasuki,
getting error "WA_ITAB" is a table without a header line and therefore has no component called "DOCNUM".
Giri
‎2009 Nov 25 4:53 AM
‎2009 Nov 25 4:54 AM
Hi,
Did you try Vikranth's suggestion?
data: itab1 TYPE tdt_docflow,
wa_itab2 type tds_docflow.
import itab1 FROM MEMORY ID 'ABCDE'.
‎2009 Nov 25 4:59 AM
HI,
I need to use Type Standard table of in second report, as i am submitting to the standard report..so i cant modify...
i want to export from first report as standard type table .....
vikrant's code is working but i still need this to fix the problem....
Vasuki: code is exactly you pasted....
REPORT ZTEST_FIRST.
data: itab1 TYPE TABLE OF tdt_docflow,
wa_itab like LINE OF itab1.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1.
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
I am expecting like
REPORT ZTEST_FIRST.
data: itab1 TYPE STANDARD TABLE OF tdt_docflow,
wa_itab type tds_docflow.
wa_itab-docnum = '12345'.
APPEND wa_itab to itab1. " this append need to change
export itab1 to MEMORY ID 'ABCDE'.
submit ztest_second and return.
BREAK-POINT.
Giri
‎2009 Nov 25 5:05 AM
sorry Giri, I was trying in my system with a table and not a table type. But in your code tdt_docflow is a table type so it is wrong to declare
data: itab1 TYPE TABLE OF tdt_docflow,
so you will have to use
data: itab1 TYPE tdt_docflow,
‎2009 Nov 25 5:08 AM
In second report can i use STANDARD table of or only Type?
Giri
‎2009 Nov 25 5:12 AM
even in the second you will have to use 'TYPE' and not 'STANDARD TABLE' of .
But why do u want to decalre it as STANDARD TABLE OF ? it will create an internal table, but even its rows would be internal tables. Why would you wnat to do that?
‎2009 Nov 25 5:15 AM
the second report has declared as Type standard table of..... which i am not authorized to modify....
so want to make it same in first report.
if it is not possible then i will close the thread... by end of day...
may be some more ideas guys?
Giri
‎2009 Nov 25 4:21 AM
Hello,
In the second report, declare itab1 and use that in the IMPORT and check.
REPORT ZTEST_SECOND.
data: itab2 TYPE STANDARD TABLE OF tdt_docflow,
itab1 TYPE STANDARD TABLE OF tdt_docflow, "Add this
wa_itab2 type tds_docflow.
import itab1 FROM MEMORY ID 'ABCDE'.
append lines of itab1 to itab2.
BREAK-POINT.
Vikranth
‎2009 Nov 25 4:21 AM
HI,
Declare the both the tables as the standard table.
Try to use the statement
Export T_data from lt_tab1[] to MEMORY iID 'ABCDE'.
IMPORT T_DATA TO lt_tab1 FROM MEMORY ID 'ABCDE'.