‎2006 Jul 11 5:32 AM
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
‎2006 Jul 11 5:39 AM
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.
‎2006 Jul 11 5:39 AM
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.
‎2006 Jul 11 5:44 AM
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
‎2006 Jul 11 5:48 AM
You should do it using EXPORT / IMPORT statements.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 11 5:51 AM
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.
‎2006 Jul 11 5:51 AM
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
‎2006 Jul 11 5:55 AM
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
‎2006 Jul 11 5:57 AM
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.
‎2006 Jul 11 8:00 AM
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