Application Development and Automation 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: 
Read only

Generating List within the same ABAP Report Program

Former Member
0 Likes
653

Hello,

I have this program that requires me to generate a list of a report.

Normally I would use the "Submit ... Exporting list to Memory" command but the list has to be created at the same program that generates the report.

Is there a way to do this? If so how?

Thanks guys and take care.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
636

Hi

You Can Use Export Import Command in this case,,,...See the example below and change your Program accordingly...

Data: it001 type table of t001.

data: xt001 type t001.

select * into table it001 from t001.

export it001 = it001 to memory id 'ZRICHTEST'.

clear it001. refresh it001.

import it001 = it001 from memory id 'ZRICHTEST'.

loop at it001 into xt001.

write:/ xt001-bukrs, xt001-butxt.

endloop.

Reward All Helpfull Answers..........

5 REPLIES 5
Read only

Former Member
0 Likes
636

Hi Chad,

You can submit the output table to memory and read the same from this program.

Hope this helps.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
636

Use Export command first

now use submit command ,this will go next program and it creates list there.

here you need to use Import command .

Example :

data : itab like mara occurs 0 with header line.

start-of-selection.

get the data from mara.

use export command

submit report2.

report2.

use import

display.

Reward Points if it is helpful

Thanks

Seshu

Read only

Former Member
0 Likes
637

Hi

You Can Use Export Import Command in this case,,,...See the example below and change your Program accordingly...

Data: it001 type table of t001.

data: xt001 type t001.

select * into table it001 from t001.

export it001 = it001 to memory id 'ZRICHTEST'.

clear it001. refresh it001.

import it001 = it001 from memory id 'ZRICHTEST'.

loop at it001 into xt001.

write:/ xt001-bukrs, xt001-butxt.

endloop.

Reward All Helpfull Answers..........

Read only

0 Likes
636

Hi guys,

Your solutions are alright but I was hoping for one that involves sending the entire list (including headers/footers) to an internal table with the structure:

i_tab-lines(255).

I was also hoping to do this in just one program. Thanks!

Read only

Former Member
0 Likes
636

Hi just tried the stuff you guys mentioned and used it. Pretty much works fine. Thanks Points awarded accordingly.