Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Probelem with submit program

former_member842213
Participant
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

I didnt find any difference between your code and my code