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

passing values in report program

RavishShettyR
Product and Topic Expert
Product and Topic Expert
0 Likes
798

Hi,

I need to pass an internal table from one report to another report program. I do it via a submit statement. Is it possible by any means.

Thanks

Ravis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
772

Hi Ravish ,

It is possible through SUBMIT statement...

The statement is

SUBMIT prog_name VIA SELECTION-SCREEN

WITH SELECTION-TABLE tab_name

AND RETURN.

Go through these link.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm

Regards,

SP.

8 REPLIES 8
Read only

Former Member
0 Likes
773

Hi Ravish ,

It is possible through SUBMIT statement...

The statement is

SUBMIT prog_name VIA SELECTION-SCREEN

WITH SELECTION-TABLE tab_name

AND RETURN.

Go through these link.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm

Regards,

SP.

Read only

RavishShettyR
Product and Topic Expert
Product and Topic Expert
0 Likes
772

Hi Prasad,

I tried it, since my table content has a field which of length 3000 char and the selection screen of a report cannot provide a lenght of 3000. ( it provides a max input length of 45 char ).

Is it possible to store it as a global field and then retrieve it

i tried the SPA/GPA using SAP memory, but i think, it too has the length of the field as a constraint.

Regards

Ravish

Read only

0 Likes
772

You should do it using EXPORT / IMPORT statements.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
772

Hi Ravish,

You can export the internal table using

EXPORT Statement

export int_tab to memory id 'MID'.

Then you call submit statement

SUBMIT prg_name and return.

From the other program , you can IMPORT the table using IMPORT Statement

Regards,

SP.

Read only

dani_mn
Active Contributor
0 Likes
772

HI,

You can use 'EXPORT' & 'IMPORT' to save tables and then retrive them.

Look in to this simple example.

REPORT ZWA_TEST2 .

data: it_bkpf type table of bkpf with header line.

SELECT * FROM bkpf into table it_bkpf.

EXPORT it_bkpf TO DATABASE indx(dn) ID 'ZCA'.

refresh it_bkpf.

IMPORT it_bkpf from DATABASE indx(dn) ID 'ZCA'.

LOOP AT It_bkpf.

write:/ it_bkpf-belnr.

ENDLOOP.

REgards,

WAsim Ahmed

Read only

Former Member
0 Likes
772

Use Import export statement

report zkis1.

data: imara type table of mara with header line.

start-of-selection.

select * into table imara from mara up to 10 rows.

export imara to memory id 'YOURID'.

submit zkis2 and return.

The submitted program.

report zkis2 .

data: imara type table of mara with header line.

import imara from memory id 'YOURID'.

loop at imara.

write:/ imara-matnr.

endloop

Read only

Former Member
0 Likes
772

Hi Ravish,

Think import/export might help you.

Here is a sample code :-

Calling program

-


data: i_tab type table of mara with header line.

start-of-selection.

select * into table i_tab from mara up to 10 rows.

<b>export i_tab to memory id 'YOURID'.</b>

submit <called_program> and return.

Called program

-


data: i_tab type table of mara with header line.

<b>import i_tab from memory id 'YOURID'.</b>

loop at i_tab.

write:/ i_tab-matnr.

endloop.

Hope this will help you.

Cheers,

Anirban.

Read only

Former Member
0 Likes
772

Hi,

I don't think length of a table will be a problem when you are using export & import.what is the error you are getting.Try in the same it is specified in this threaad. Hope it will work.

Regards,

Karthik.k