07-31-2008 11:03 AM
Hi All,
Im facing problem in the following code kindly help me to debug the same.
Internal table ( itab1 )in ZSAN_TEST_102 program is not filled
Report ZSAN_TEST_101.
data:itab type table of scarr,
id(100) TYPE c .
select * from scarr into table itab.
export itab to MEMORY ID 'ZID'.
break-point.
REPORT ZSAN_TEST_102.
data:itab1 type table of scarr,
itab type table of scarr,
wa type scarr,
id(100) type c.
SUBMIT ZSAN_TEST_101 AND RETURN.
FREE: itab1.
import itab1 from MEMORY ID 'ZID'.
if sy-subrc eq 0.
endif.
loop at itab1 into wa.
write:wa-carrid,wa-carrname.
endloop.
07-31-2008 11:19 AM
Hi Friend,
Please use the below code. Its just the modification of your code.
Instead of ZID use PID. I am not sure but I guess there is a table(Not sure of the table name) where the memory Ids are maintained. we shd be using those memory Ids only. Please anyone correct me if I am wrong.
use this your code will work.
REPORT ZSAN_TEST_101.
data:itab type table of scarr.
select * from scarr into table itab.
export itab to MEMORY ID 'PID'.
break-point.
REPORT ZSAN_TEST_102.
data:itab type table of scarr,
wa type scarr,
SUBMIT ZSAN_TEST_101 AND RETURN.
*FREE: itab1.
import itab from MEMORY ID 'PID'.
if sy-subrc eq 0.
endif.
loop at itab into wa.
write:wa-carrid,wa-carrname.
endloop.
Reward points if useful.
Thanks & Regards
Rajini Rajuladevi
07-31-2008 11:26 AM
do it this way:
REPORT ZSAN_TEST_102.
data:
itab type table of scarr,
wa type scarr,
id(100) type c.
SUBMIT REPORT ZSAN_TEST_101 AND RETURN.
*FREE: itab1.
import itab from MEMORY ID 'ZID'.
if sy-subrc eq 0.
endif.
loop at itab into wa.
write:wa-carrid,wa-carrname.
endloop.
REPORT ZSAN_TEST_101
data:itab type table of scarr,
id(100) TYPE c .
select * from scarr into table itab.
export itab to MEMORY ID 'ZID'.
With luck,
Pritam.
07-31-2008 12:04 PM